1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<?xml version="1.0"?>
<project basedir="." default="jibx">
<property name="classes" value="${basedir}/classes"/>
<property name="site-lib" value="${basedir}/lib"/>
<property name="jibx-home" value="${basedir}/../.."/>
<property name="jibx-lib" value="${jibx-home}/lib/"/>
<property name="jar-name" value="site"/>
<!-- binding task definition -->
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
<classpath>
<pathelement location="${jibx-lib}/bcel.jar"/>
<pathelement location="${jibx-lib}/jibx-bind.jar"/>
<pathelement location="${jibx-lib}/jibx-run.jar"/>
<pathelement location="${jibx-lib}/xpp3.jar"/>
</classpath>
</taskdef>
<!-- delete old class files -->
<target name="clean">
<delete dir="${classes}" quiet="true"/>
<delete file="${basedir}/velocity.log" quiet="true"/>
<delete file="${site-lib}/${jar-name}.jar" quiet="true"/>
</target>
<!-- build and bind code -->
<target name="build" depends="clean">
<delete dir="${classes}" quiet="true"/>
<mkdir dir="${classes}"/>
<echo message="Compiling the java source files..."/>
<javac srcdir="src" destdir="${classes}" debug="on" includes="**/*.java" source="1.3" target="1.3">
<classpath>
<pathelement location="${classes}"/>
<pathelement location="${jibx-lib}/jibx-run.jar"/>
<pathelement location="${jibx-lib}/junit.jar"/>
<pathelement location="${site-lib}/velocity-dep.jar"/>
</classpath>
</javac>
<echo message="Running binding compiler..."/>
<bind load="true" binding="${basedir}/binding.xml">
<classpathset dir="${classes}"/>
<classpathset dir="${jibx-lib}/jibx-run.jar"/>
</bind>
</target>
<!-- build the site jar -->
<target name="jar" depends="build">
<delete file="${site-lib}/${jar-name}.jar" quiet="true"/>
<jar jarfile="${site-lib}/${jar-name}.jar" basedir="${classes}"/>
</target>
<!-- run the site building process -->
<target name="jibx">
<echo message="Building the site..."/>
<delete>
<fileset dir="${jibx-home}/docs" includes="**/*.html" excludes="api/**/*,schema-library/**/*,maven-jibx-plugin/**/*"/>
</delete>
<java classname="com.sosnoski.site.Builder" fork="true">
<classpath>
<pathelement location="${jibx-lib}/jibx-run.jar"/>
<fileset dir="${site-lib}" includes="*.jar"/>
</classpath>
<arg value="jibx-site.xml"/>
<arg value="jibx-template.vm"/>
<arg value="${jibx-home}/docs"/>
</java>
</target>
</project>
|