lucene/contrib/gdata-server/build.xml

90 lines
3.8 KiB
XML

<?xml version="1.0"?>
<project name="gdata-server" default="default" >
<description>
Serverside Google Data API implementation
</description>
<property name="javac.source" value="1.5" />
<property name="javac.target" value="1.5" />
<property name="gdata.war.name" value="gdata-server" />
<property name="gdata.lib.dir" value="lib" />
<property name="db4o.jar" value="db4o-5.2-java5.jar" />
<!-- set property for third party jars -->
<available property="db4o.jar.present" type="file" file="${gdata.lib.dir}/${db4o.jar}" value="test"/>
<condition property="junit.excludes" value="**/TestDb4o*.java">
<not>
<isset property="db4o.jar.present"/>
</not>
</condition>
<path id="additional.dependencies">
<fileset dir="${gdata.lib.dir}">
<include name="easymock.jar" />
<include name="servlet-api.jar" />
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
<include name="${db4o.jar}" if="db4o.jar.present" />
</fileset>
</path>
<!-- redefine compile-core and compile-test to exclude 3rd party dependend sources -->
<target name="compile-core" depends="init">
<echo>Use gdata - compile-core task </echo>
<compile srcdir="src/java" destdir="${build.dir}/classes/java">
<classpath refid="classpath" />
<exclude name="org/apache/lucene/gdata/storage/db4o/**" unless="db4o.jar.present" />
</compile>
</target>
<target name="compile-test" depends="compile-core">
<echo>Use gdata - compile-test task </echo>
<compile srcdir="src/test" destdir="${build.dir}/classes/test">
<classpath refid="test.classpath" />
<exclude name="org/apache/lucene/gdata/storage/db4o/**" unless="db4o.jar.present" />
</compile>
<copy todir="${build.dir}/classes/test">
<fileset dir="src/test" excludes="**/*.java" />
</copy>
</target>
<pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies" />
<import file="../contrib-build.xml" />
<target name="prepare-dist" depends="jar-core">
<echo>Prepare dist directory</echo>
<delete dir="${dist.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="war-gdata" depends="prepare-dist">
<echo>Distributing GData War </echo>
<war destfile="${dist.dir}/${gdata.war.name}.war" webxml="webroot/WEB-INF/web.xml">
<metainf dir="webroot/meta-inf" />
<fileset dir="webroot" defaultexcludes="true">
<exclude name="meta-inf/context.xml" />
<exclude name="meta-inf/" />
<exclude name="WEB-INF/web.xml" />
</fileset>
<lib dir="${gdata.lib.dir}">
<include name="commons-logging-1.1.jar" />
<include name="gdata-client-1.0.jar" />
<include name="commons-digester-1.7.jar" />
<include name="commons-beanutils.jar" />
<include name="commons-collections-3.2.jar" />
<include name="nekohtml.jar" />
<include name="xercesImpl.jar" />
<include name="${db4o.jar}" if="db4o.jar.present" />
</lib>
<lib dir="${build.dir}" includes="${final.name}.jar" />
<lib file="${lucene.jar}" />
</war>
</target>
</project>