xidyn/build.xml

166 lines
4.8 KiB
XML
Raw Normal View History

2007-01-12 06:35:01 +01:00
<?xml version="1.0"?>
<!DOCTYPE project>
<!-- Builds the XID Framework. -->
2007-01-12 06:35:01 +01:00
<project name="xid" default="all" basedir=".">
2013-06-23 01:29:28 +02:00
<buildnumber file="build.num" description="Id of the build"/>
<property name="version" value="0.2.${build.number}" /> <!-- AUTOMATIC MANAGEMENT -->
2007-01-12 06:35:01 +01:00
<property name="targetjar" value="xid.jar"/>
<property name="zip_file" value="xid.zip"/> <!-- Release zip file -->
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="doc" value="doc"/>
<property name="dist" value="dist"/>
<property name="resources" value="resources"/>
<property name="debug" value="on"/>
2007-02-05 06:10:27 +01:00
<target name="all" depends="build_xid,dist_xid,build_test,dist_test,build_demo,dist_demo" />
2007-01-12 06:35:01 +01:00
<!-- ******* Init ******* -->
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
2007-02-05 06:10:27 +01:00
<mkdir dir="build_demo/classes"/>
2007-01-18 13:11:47 +01:00
<mkdir dir="build_test/classes"/>
2007-01-12 06:35:01 +01:00
<mkdir dir="${build}/classes"/>
<mkdir dir="${dist}"/>
</target>
2007-01-18 13:11:47 +01:00
<!-- ******* build ******* -->
2007-01-23 18:43:32 +01:00
<target name="build_xid" depends="init">
2013-06-21 02:55:52 +02:00
<javac srcdir="${src}" destdir="${build}/classes" debug="${debug}" deprecation="on" includeantruntime="false">
2007-01-12 06:35:01 +01:00
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
</javac>
</target>
2007-01-18 13:11:47 +01:00
2007-01-23 18:43:32 +01:00
<!-- ****** dist_xid ****** -->
<target name="dist_xid" depends="build_xid">
2007-01-12 06:35:01 +01:00
<jar update="no" jarfile="dist/xid.jar">
2013-06-21 02:55:52 +02:00
<fileset dir="build/classes" />
<fileset dir="resources" />
2007-01-12 06:35:01 +01:00
</jar>
</target>
2007-01-18 13:11:47 +01:00
<!-- ******* build_test ******* -->
2007-01-23 18:43:32 +01:00
<target name="build_test" depends="dist_xid">
2013-06-21 02:55:52 +02:00
<javac srcdir="test" destdir="build_test/classes" debug="${debug}" deprecation="on" includeantruntime="false">
2007-01-18 13:11:47 +01:00
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
2007-01-23 18:43:32 +01:00
<pathelement path="dist/xid.jar"/>
2013-06-21 02:55:52 +02:00
</classpath>
2007-01-18 13:11:47 +01:00
</javac>
</target>
2007-01-23 18:43:32 +01:00
<!-- ****** dist_test ****** -->
<target name="dist_test" depends="build_test">
2007-01-18 13:11:47 +01:00
<jar update="no" jarfile="dist/test.jar">
2013-06-21 02:55:52 +02:00
<fileset dir="build_test/classes" />
<fileset dir="resources" />
2007-01-18 13:11:47 +01:00
</jar>
</target>
2007-01-23 18:43:32 +01:00
<!-- *********** runtest ******** -->
<target name="test" depends="dist_test">
2007-01-18 13:11:47 +01:00
<java classname="xid.test.Test" maxmemory="20m" fork="true">
<classpath>
<fileset dir="lib" includes="**/*.jar" />
2007-01-23 18:43:32 +01:00
<fileset dir="resources" includes="**" />
2007-01-18 13:11:47 +01:00
<pathelement path="dist/xid.jar"/>
<pathelement path="dist/test.jar"/>
</classpath>
</java>
</target>
2007-02-05 06:10:27 +01:00
<!-- ******* build_demo ******* -->
<target name="build_demo" depends="dist_xid">
2013-06-21 02:55:52 +02:00
<javac srcdir="demo" destdir="build_demo/classes" debug="${debug}" deprecation="on" includeantruntime="false">
2007-02-05 06:10:27 +01:00
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
<pathelement path="dist/xid.jar"/>
</classpath>
</javac>
</target>
<!-- ****** dist_demo ****** -->
<target name="dist_demo" depends="build_demo">
<jar update="no" jarfile="dist/demo.jar">
2013-06-21 02:55:52 +02:00
<fileset dir="build_demo/classes" />
<fileset dir="resources" />
2007-02-05 06:10:27 +01:00
</jar>
</target>
<!-- *********** dodemo ******** -->
<target name="demo" depends="dist_demo">
2007-02-05 06:10:27 +01:00
<java classname="Demo" maxmemory="20m" fork="true">
<classpath>
<fileset dir="lib" includes="**/*.jar" />
<fileset dir="resources" includes="**" />
<pathelement path="dist/xid.jar"/>
<pathelement path="dist/demo.jar"/>
</classpath>
</java>
</target>
2007-01-12 06:35:01 +01:00
<!-- ******* Examples (the webapp). ******* -->
2007-01-23 18:43:32 +01:00
<target name="examples" depends="dist_xid">
2007-01-12 06:35:01 +01:00
<copy todir="webapp-examples/WEB-INF/lib">
<fileset dir="lib" includes="*.jar" excludes="servlet-api.jar"/>
<fileset dir="dist" includes="*.jar"/>
</copy>
<copy file="${dist}/xid.jar" todir="webapp-examples/WEB-INF/lib" overwrite="yes" preservelastmodified="yes"/>
<delete>
<fileset dir="webapp-examples/WEB-INF/classes/" includes="**.class"/>
<fileset dir="webapp-examples/WEB-INF/classes/" includes="**/**.class"/>
</delete>
<javac srcdir="webapp-examples/WEB-INF/classes/" destdir="webapp-examples/WEB-INF/classes/" debug="${debug}" deprecation="on">
<classpath>
<fileset dir="webapp-examples/WEB-INF/lib" includes="**.jar"/>
</classpath>
</javac>
</target>
<!-- ****** JavaDoc ****** -->
2007-01-23 18:43:32 +01:00
<target name="javadoc" depends="build_xid">
2007-01-12 06:35:01 +01:00
<javadoc sourcepath="${src}" packageNames="xid.*" destdir="${doc}">
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
</javadoc>
</target>
<!-- *************** Clean ***********************-->
<target name="clean">
<delete dir="${build}"/>
2007-01-18 13:11:47 +01:00
<delete dir="build_test"/>
<delete dir="build_demo"/>
2007-01-12 06:35:01 +01:00
</target>
<!-- *********** Produce ZIP release file ******** -->
<target name="zip">
<zip update="no" zipfile="../${zip_file}" basedir=".">
<include name=".project" />
<include name=".classpath" />
<include name="build.xml" />
<include name="src/**" />
<include name="resources/**" />
<include name="lib/*.jar" />
</zip>
</target>
</project>