forked from knowledgejunkie/Project-X
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
1 lines (1 loc) · 1.77 KB
/
build.xml
1
<?xml version="1.0"?><project name="projectx" default="jar"> <!-- some properties --> <property name="src.dir" value="src" /> <property name="build.dir" value="build" /> <property name="docs.dir" value="apidocs" /> <property name="dist.dir" value="dist" /> <property name="lib.dir" value="lib" /> <property name="resources.dir" value="resources" /> <property name="jarfile" value="${ant.project.name}.jar" /> <property name="target.jdk" value="1.4" /> <!-- classpath --> <path id="refcp"> <fileset dir="${lib.dir}"> <include name="**/*.jar" /> </fileset> </path> <!-- init --> <target name="init"> <mkdir dir="${dist.dir}" /> <mkdir dir="${build.dir}" /> <mkdir dir="${docs.dir}" /> </target> <!-- compile everything --> <target name="compile" depends="init"> <mkdir dir="${build.dir}" /> <javac srcdir="${src.dir}" destdir="${build.dir}" source="${target.jdk}" target="${target.jdk}" classpathref="refcp"/> <copy todir="${build.dir}"> <fileset dir="${resources.dir}" /> </copy> </target> <!-- build the jar file --> <target name="jar" depends="compile"> <jar jarfile="${jarfile}" basedir="${build.dir}"> <manifest> <attribute name="Main-Class" value="net.sourceforge.dvb.projectx.common.Start" /> <attribute name="Class-Path" value="lib/commons-net-1.3.0.jar lib/jakarta-oro-2.0.8.jar" /> </manifest> </jar> </target> <!-- generate javadocs --> <target name="docs" depends="init"> <javadoc sourcepath="${src.dir}" packagenames="net.*, edu.*" destdir="${docs.dir}" author="true" version="true" use="true" windowtitle="${ant.project.name} API" /> </target> <!-- clean up --> <target name="clean"> <delete dir="${build.dir}" /> <delete dir="${docs.dir}" /> <delete dir="${dist.dir}" /> </target></project>