165 lines
4.8 KiB
XML
165 lines
4.8 KiB
XML
<?xml version="1.0"?>
|
|
<!DOCTYPE project>
|
|
<!-- Builds the XID Framework. -->
|
|
<project name="xid" default="all" basedir=".">
|
|
<buildnumber file="build.num" description="Id of the build"/>
|
|
<property name="version" value="0.2.${build.number}" /> <!-- AUTOMATIC MANAGEMENT -->
|
|
<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"/>
|
|
|
|
<target name="all" depends="build_xid,dist_xid,build_test,dist_test,build_demo,dist_demo" />
|
|
|
|
<!-- ******* Init ******* -->
|
|
<target name="init">
|
|
<tstamp/>
|
|
<mkdir dir="${build}"/>
|
|
<mkdir dir="build_demo/classes"/>
|
|
<mkdir dir="build_test/classes"/>
|
|
<mkdir dir="${build}/classes"/>
|
|
<mkdir dir="${dist}"/>
|
|
</target>
|
|
|
|
|
|
<!-- ******* build ******* -->
|
|
<target name="build_xid" depends="init">
|
|
<javac srcdir="${src}" destdir="${build}/classes" debug="${debug}" deprecation="on" includeantruntime="false">
|
|
<classpath>
|
|
<fileset dir="lib" includes="**/*.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
</target>
|
|
|
|
|
|
<!-- ****** dist_xid ****** -->
|
|
<target name="dist_xid" depends="build_xid">
|
|
<jar update="no" jarfile="dist/xid.jar">
|
|
<fileset dir="build/classes" />
|
|
<fileset dir="resources" />
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<!-- ******* build_test ******* -->
|
|
<target name="build_test" depends="dist_xid">
|
|
<javac srcdir="test" destdir="build_test/classes" debug="${debug}" deprecation="on" includeantruntime="false">
|
|
<classpath>
|
|
<fileset dir="lib" includes="**/*.jar"/>
|
|
<pathelement path="dist/xid.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
</target>
|
|
|
|
|
|
<!-- ****** dist_test ****** -->
|
|
<target name="dist_test" depends="build_test">
|
|
<jar update="no" jarfile="dist/test.jar">
|
|
<fileset dir="build_test/classes" />
|
|
<fileset dir="resources" />
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<!-- *********** runtest ******** -->
|
|
<target name="test" depends="dist_test">
|
|
<java classname="xid.test.Test" maxmemory="20m" fork="true">
|
|
<classpath>
|
|
<fileset dir="lib" includes="**/*.jar" />
|
|
<fileset dir="resources" includes="**" />
|
|
<pathelement path="dist/xid.jar"/>
|
|
<pathelement path="dist/test.jar"/>
|
|
</classpath>
|
|
</java>
|
|
</target>
|
|
|
|
|
|
<!-- ******* build_demo ******* -->
|
|
<target name="build_demo" depends="dist_xid">
|
|
<javac srcdir="demo" destdir="build_demo/classes" debug="${debug}" deprecation="on" includeantruntime="false">
|
|
<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">
|
|
<fileset dir="build_demo/classes" />
|
|
<fileset dir="resources" />
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<!-- *********** dodemo ******** -->
|
|
<target name="demo" depends="dist_demo">
|
|
<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>
|
|
|
|
|
|
<!-- ******* Examples (the webapp). ******* -->
|
|
<target name="examples" depends="dist_xid">
|
|
|
|
<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 ****** -->
|
|
<target name="javadoc" depends="build_xid">
|
|
<javadoc sourcepath="${src}" packageNames="xid.*" destdir="${doc}">
|
|
<classpath>
|
|
<fileset dir="lib" includes="**/*.jar"/>
|
|
</classpath>
|
|
</javadoc>
|
|
</target>
|
|
|
|
|
|
<!-- *************** Clean ***********************-->
|
|
<target name="clean">
|
|
<delete dir="${build}"/>
|
|
<delete dir="build_test"/>
|
|
<delete dir="build_demo"/>
|
|
</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>
|