Code Search for Developers
 
 
  

build.xml from Kneobase at Krugle


Show build.xml syntax highlighted

<?xml version="1.0" encoding="ISO-8859-1"?>

<project name="Kneobase AdminWebapp" basedir="." default="ws-war">

<!--
	Configuraciones y seteos a tener en cuenta a la hora de empaquetar el producto
	
	- deploy.properties define la variable de entorno ${context.name} la cual se emplea para nomenclar el .war!
	- tambien importante es el KneobaseCommons/kneobase.properties a partir de lo cual se arma el tag de version.
-->
	<property file="../KneobaseCommons/system.properties"/>
	<import file="../KneobaseCommons/tasks.xml" />
	<property file="../KneobaseCommons/kneobase.properties"/>
    <property file="project.properties"/>
    <property file="deploy.properties"/>

    <property name="src.dir"   value="src"/>
    <property name="conf.dir"   value="config"/>
    <property name="web.dir"   value="war"/>
    <property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
    <property name="name"      value="${context.name}"/>
    <property name="lib.temp.dir"      value="${dist.dir}/temp"/>

    <path id="master-classpath">
        <fileset dir="${web.dir}/WEB-INF/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../Core/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../Core/lib">
            <include name="*.jar"/>
        </fileset> 
        <fileset dir="../API/dist">
            <include name="*.jar"/>
        </fileset> 
        <fileset dir="../SPI/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../SPI/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../TreeDriver/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../BodyExtractors/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../Server/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../RdbmsDriver/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../RdbmsDriver/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../FileSystemDriver/dist">
            <include name="*.jar"/>
        </fileset>        
<!--
        <fileset dir="../OpenCmsDriver/lib">
            <include name="*.jar"/>
        </fileset>        
        <fileset dir="../CvsDriver/lib">
            <include name="*.jar"/>
        </fileset>        
        <fileset dir="../CvsDriver/dist">
            <include name="*.jar"/>
        </fileset>        
-->
        <fileset dir="../FtpDriver/lib">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../FtpDriver/dist">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="../CompressedSources/dist">
            <include name="*.jar"/>
        </fileset>

        <!-- We need the servlet API classes:        -->
        <!--   for Tomcat 4.1 use servlet.jar        -->
        <!--   for Tomcat 5.0 use servlet-api.jar    -->
        <!--   for Other app server - check the docs -->
        <fileset dir="${tomcat.home}/common/lib">
            <include name="servlet*.jar"/>
        </fileset>
        <pathelement path="${build.dir}"/>
    </path>

    <target name="info">
        <echo message=""/>
        <echo message="deploy path = ${deploy.path}"/>
        <echo message=""/>
    </target>

    <target name="usage">
        <echo message=""/>
        <echo message="${name} build file"/>
        <echo message="-----------------------------------"/>
        <echo message=""/>
        <echo message="Available targets are:"/>
        <echo message=""/>
        <echo message="build     --> Build the application"/>
        <echo message="deploy    --> Deploy application as directory"/>
        <echo message="deploywar --> Deploy application as a WAR file"/>
        <echo message="install   --> Install application in Tomcat"/>
        <echo message="reload    --> Reload application in Tomcat"/>
        <echo message="start     --> Start Tomcat application"/>
        <echo message="stop      --> Stop Tomcat application"/>
        <echo message="list      --> List Tomcat applications"/>
        <echo message=""/>
    </target>

	<target name="initdist" description="Initialize the distribution directory">
		<mkdir dir="${dist.dir}"/>
		<mkdir dir="${lib.temp.dir}"/>
	</target>

    <target name="build" description="Compile main source tree java files"  >
        <mkdir dir="${build.dir}"/>
        <javac destdir="${build.dir}" target="1.4" source="1.4" debug="true"
               deprecation="false" optimize="false" failonerror="true">
            <src path="${src.dir}"/>
            <classpath refid="master-classpath"/>
        </javac>
        <copy todir="${build.dir}" preservelastmodified="true">
            <fileset dir="${conf.dir}">
                <include name="**/*.*"/>
            </fileset>
        </copy>
    </target>

	<target name="coreJar" description="KneoBase Core jar construction" >
		<ant dir="../Core" inheritall="false" target="jars" />
	</target>
	
	<target name="apiJar" description="KneoBase API jar construction" >
		<ant dir="../API" inheritall="false" target="jars" />
	</target>
	
	<target name="treeDriverJar" description="KneoBase Tree Driver jar construction" >
		<ant dir="../TreeDriver" inheritall="false" target="jars" />
	</target>
	
	<target name="spiJar" description="KneoBase SPI jar construction" >
		<ant dir="../SPI" inheritall="false" target="jars" />
	</target>

	<target name="serverJar" description="KneoBase Server jar construction" >
		<ant dir="../Server" inheritall="false" target="jars" />
	</target>

	<target name="bodyBuildersJar" description="KneoBase Body Builders jar construction" >
		<ant dir="../BodyExtractors" inheritall="false" target="jars" />
	</target>

	<target name="compressedBuildersJar" description="KneoBase Compressed Sources jar construction" >
		<ant dir="../CompressedSources" inheritall="false" target="jars" />
	</target>

	<target name="rdbmsDriverJar" description="KneoBase RdbmsDriver jar construction" >
		<ant dir="../RdbmsDriver" inheritall="false" target="jars" />
	</target>

	<target name="fileSystemDriver" description="KneoBase FileSystemDriver jar construction" >
		<ant dir="../FileSystemDriver" inheritall="false" target="jars" />
	</target>

	<target name="ftpDriver" description="KneoBase FtpDriver jar construction" >
		<ant dir="../FtpDriver" inheritall="false" target="jars" />
	</target>

	<target name="webServiceJar" description="KneoBase Webservice jar construction" >
		<ant dir="../WebService" inheritall="false" target="build" />
	</target>

	<target name="allJars" 
		description="Kneobase jar construction" 
		depends="coreJar,apiJar,spiJar,treeDriverJar,serverJar,bodyBuildersJar,compressedBuildersJar,rdbmsDriverJar,fileSystemDriver,ftpDriver,webServiceJar" >
        <delete failonerror="false">
            <fileset dir="${dist.dir}">
                <include name="**/*.jar"/>
            </fileset>
        </delete>
	</target>

	<target name="deployJars" depends="copyJars" description="copy jars to context" >
		<copy todir="${deploy.path}/${name}/WEB-INF/lib">
		    <fileset dir="${lib.temp.dir}">
		        <include name="*.jar"/>
			</fileset>
		</copy>
	</target>

	<target name="copyJars" depends="allJars" description="copy jars" >
		<copy todir="${lib.temp.dir}">
			<!-- non/obfuscated jars -->
		    <fileset dir="../Core/dist">
		        <include name="*.jar"/>
			</fileset>
			<fileset dir="../Core/lib">
			    <include name="*.jar"/>
		    </fileset> 
		    <fileset dir="../API/dist">
		        <include name="*.jar"/>
			</fileset>
		    <fileset dir="../Server/dist">
		        <include name="*.jar"/>
			</fileset>
		    <fileset dir="../SPI/lib">
			    <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../SPI/dist">
			    <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../TreeDriver/dist">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../BodyExtractors/dist">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../BodyExtractors/lib">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../RdbmsDriver/lib">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../RdbmsDriver/dist">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../FileSystemDriver/dist">
		        <include name="*.jar"/>
		    </fileset>
		<!--
		    <fileset dir="../OpenCmsDriver/lib">
		        <include name="*.jar"/>
		    </fileset>        
		    <fileset dir="../CvsDriver/lib">
		        <include name="*.jar"/>
		    </fileset>        
		    <fileset dir="../CvsDriver/dist">
		        <include name="*.jar"/>
		    </fileset>        
		-->
		    <fileset dir="../FtpDriver/lib">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../FtpDriver/dist">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../CompressedSources/dist">
		        <include name="*.jar"/>
		    </fileset>
		    <fileset dir="../CompressedSources/lib">
		        <include name="*.jar"/>
		    </fileset>        
		    <fileset dir="../WebService/build/dist">
		        <include name="kneobase-webservice.jar"/>
		    </fileset>
		    <fileset dir="../WebService/lib">
		        <include name="*.jar"/>
		    </fileset>
		</copy>
	</target>
	
	<target name="deploy" depends="copyJars,build" description="Deploy application" >
        <copy todir="${deploy.path}/${name}" preservelastmodified="true">
            <fileset dir="${web.dir}">
                <include name="**/*.*"/>
            </fileset>
        </copy>
        <copy todir="${deploy.path}/${name}/WEB-INF/lib" preservelastmodified="true">
        	<fileset dir="build/temp" />
        </copy>
    </target>

    <target name="pack" description="Pack application binaries" depends="javadoc">

		<mkdir dir="${dist.dir}"/>

        <zip destfile="${dist.dir}/${tag.binarios}.zip" duplicate="preserve">
        	<fileset dir="${lib.temp.dir}" />
        </zip>

        <zip destfile="${dist.dir}/${tag.docs}.zip" duplicate="preserve">
	        <fileset dir="${javadocs.dir}">
	            <include name="**"/>
	        </fileset>
        </zip>
    </target>
	
	<target name="copy-licenses" description="Copy licenses" >
		<copy todir="${web.dir}/WEB-INF/licenses">
		    <fileset dir="../KneobaseCommons/licenses">
		        <include name="*.txt"/>
			</fileset>
		</copy>
    </target>

	<target name="ws-war" description="Generate webservice war" depends="copyJars,build,copy-licenses">

        <echo message="Recuerde verificar la configuracion adecuada en deploy.properties para el nombre del WAR....."/>

		<delete file="${dist.dir}/${name}.war" failonerror="false"/>

		<!-- copy spring bean for webservice -->
		<copy todir="${web.dir}/WEB-INF/kneobase/config/" >
			<fileset dir="../WebService/src/web/" >
				<include name="webservice.xml"/>
			</fileset>
		</copy>

		<war destfile="${dist.dir}/${name}.war" webxml="${web.dir}/WEB-INF/web.xml" duplicate="preserve" >
			<!-- Include the JSPs and other documents -->
			<fileset dir="${web.dir}" excludes="WEB-INF/**"/>

			<fileset dir="${contenidos.dir}">
				<include name="contenidos/**"/>
			</fileset>

			<!-- Bring in Spring-specific XML configuration files -->
			<webinf dir="${web.dir}/WEB-INF">
				<!-- We've already included this -->
				<exclude name="web.xml"/>
				<exclude name=".cvsignore"/>
			</webinf>

			<webinf file="../WebService/build/dist/server-config.wsdd" />
			
			<!-- Include the compiled classes -->
<!--
			<classes dir="${build.dir}"/>
-->
			<lib dir="${lib.temp.dir}" />

		</war>
	</target>

	<target name="javadoc" description="Generate framework Javadocs.">
		<mkdir dir="${javadocs.dir}"/>
		<javadoc  
			destdir="${javadocs.dir}" 
			windowtitle="Kneobase SPI"
			defaultexcludes="yes"	
			author="true" version="true" use="true">
			<doctitle><![CDATA[<h1>Kneobase Packages</h1>]]></doctitle>
			<bottom><![CDATA[<i>Copyright (C) 2006 Colaborativa.net</i>]]></bottom>
			<classpath refid="master-classpath"/>
			<packageset dir="../SPI/src">
				<include name="com/kneobase/**"/>
			</packageset>
<!--
			<packageset dir="../Server/src">
				<include name="com/kneobase/**"/>
			</packageset>
-->
			<packageset dir="../RdbmsDriver/src">
				<include name="com/kneobase/**"/>
			</packageset>
			<packageset dir="../FileSystemDriver/src">
				<include name="com/kneobase/**"/>
			</packageset>
			<packageset dir="../FtpDriver/src">
				<include name="com/kneobase/**"/>
			</packageset>
<!--
			<packageset dir="../CompressedSources/src">
				<include name="com/kneobase/**"/>
			</packageset>
			<packageset dir="../BodyExtractors/src">
				<include name="com/kneobase/**"/>
			</packageset>
-->
		</javadoc>
	</target>


    <target name="re-deploy" depends="stop,build,deploy,start" description="Re Deploy application (from stop to start)">
    </target>

    <target name="install" description="Install application in Tomcat">
        <install url="${tomcat.manager.url}"
                 username="${tomcat.manager.username}"
                 password="${tomcat.manager.password}"
                 path="/${name}"
                 war="${name}"/>
    </target>

    <target name="reload" description="Reload application in Tomcat">
        <reload url="${tomcat.manager.url}"
                 username="${tomcat.manager.username}"
                 password="${tomcat.manager.password}"
                 path="/${name}"/>
    </target>

    <target name="start" description="Start Tomcat application">
        <start url="${tomcat.manager.url}"
                 username="${tomcat.manager.username}"
                 password="${tomcat.manager.password}"
                 path="/${name}"/>
    </target>

    <target name="stop" description="Stop Tomcat application">
        <stop url="${tomcat.manager.url}"
                 username="${tomcat.manager.username}"
                 password="${tomcat.manager.password}"
                 path="/${name}"/>
    </target>

    <target name="list" description="List Tomcat applications">
        <list url="${tomcat.manager.url}"
                 username="${tomcat.manager.username}"
                 password="${tomcat.manager.password}"/>
    </target>

<!-- End Tomcat tasks -->
 <target name="clean" description="Clean output directories">
        <delete failonerror="false">
            <fileset dir="${build.dir}">
                <include name="**/*.class"/>
            </fileset>
        </delete>
        <delete dir="${dist.dir}" failonerror="false"/>
    </target>

    <target name="undeploy" description="Un-Deploy application">
        <delete failonerror="false">
            <fileset dir="${deploy.path}/${name}">
                <include name="**/*.*"/>
            </fileset>
        </delete>
    </target>

    <target name="delete_classes" description="Delete .class files">
        <delete failonerror="false">
        	<fileset dir="${build.dir}" includes="**/*" />
        </delete>
    </target>

    <target name="delete_dist_files" description="Delete .class and .jar files in subprojects">

    	<ant dir="../Core" inheritall="false" target="delete_dist_files" />
    	<ant dir="../API" inheritall="false" target="delete_dist_files" />
    	<ant dir="../TreeDriver" inheritall="false" target="delete_dist_files" />
    	<ant dir="../SPI" inheritall="false" target="delete_dist_files" />
    	<ant dir="../Server" inheritall="false" target="delete_dist_files" />
    	<ant dir="../BodyExtractors" inheritall="false" target="delete_dist_files" />
    	<ant dir="../CompressedSources" inheritall="false" target="delete_dist_files" />
    	<ant dir="../RdbmsDriver" inheritall="false" target="delete_dist_files" />
    	<ant dir="../FileSystemDriver" inheritall="false" target="delete_dist_files" />
    	<ant dir="../FtpDriver" inheritall="false" target="delete_dist_files" />
    	<ant dir="../WebService" inheritall="false" target="clean" />

    	<delete failonerror="false">
			<fileset dir="${build.dir}">
				<include name="**/*"/>
			</fileset>
		</delete>

    	<delete failonerror="false">
			<fileset dir="${dist.dir}">
				<include name="kneobase-*.jar"/>
			</fileset>
		</delete>

    </target>
	
</project>




See more files for this project here

Kneobase

Kneobase is an enterprise search engine, based upon the Lucene search engine and the Spring framework. It allows to perform full-text search across many different content sources. It is highly adaptable out-of-the-box and has a pluggable architecture.

Project homepage: http://sourceforge.net/projects/kneobase
Programming language(s): Java,XML
License: other

  config/
    kneodemo.properties
    kneodemo_en.properties
    kneodemo_es.properties
    log4j.xml
  lib/
    servlet.jar
  src/
    com/
      kneobase/
        web/
          logs/
            LogsCommand.java
            LogsController.java
          robots/
            MessageKeyRaramPair.java
            RobotIndexBean.java
            RobotsCommand.java
            RobotsController.java
          search/
            DocBean.java
            SearchCommand.java
            SearchController.java
          util/
            RelativePathConfigurator.java
            RobotLoggerPathConfigurator.java
            ZipContentServlet.java
  war/
    META-INF/
    WEB-INF/
      jsp/
        config.jsp
        drivers_en.htm
        drivers_es.htm
        include.jsp
        index.jsp
        index_en.htm
        index_es.htm
        logs.jsp
        logs_en.htm
        logs_es.htm
        robots.jsp
        search.jsp
        search_en.htm
        search_es.htm
        top.jsp
      kneobase/
        config/
          lib/
            builders.xml
            conditions.xml
          sources/
            fs-contents.xml
          body_parsers.xml
          content_factories.xml
          languages.xml
          meta_data.xml
          mimetype.xml
          server.xml
          webservice.xml
        index/
          flag.txt
      lib/
        highlighter.jar
        jstl.jar
        log4j-1.2.8.jar
        standard.jar
      licenses/
        HighLigther.txt
        Kneobase.txt
        Lucene.txt
        Nutch.txt
        PDFBox.txt
        Snowball.txt
        Spring.txt
        ant.txt
        jakarta-poi.txt
        log4j.txt
        mysql-connector-java.txt
        opencms-lucene.txt
        quartz.txt
        text-mining.txt
      c.tld
      fmt.tld
      pager-taglib.tld
      spring.tld
      springapp-servlet.xml
      web.xml
    design/
      images/
        kneo_logo.gif
        kneo_logo_en.gif
      stylesheet/
        kneobase.css
    kneobase-logs/
      sources/
    home.htm
  .classpath
  .project
  build.xml
  deploy.properties
  project.properties