| 3 | | <property environment="env"/> |
| 4 | | <property file="planetsim.properties"/> |
| | 3 | <property name="ajtools" value="C:/Programme/Java/aspectj1.5/lib/aspectjtools.jar" /> |
| | 4 | |
| | 5 | <property name="ajruntime" value="C:/Programme/Java/aspectj1.5/lib/aspectjrt.jar" /> |
| | 6 | |
| | 7 | <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> |
| | 8 | <classpath> |
| | 9 | <pathelement location="${ajtools}" /> |
| | 10 | </classpath> |
| | 11 | </taskdef> |
| | 12 | <property environment="env" /> |
| | 13 | <property file="planetsim.properties" /> |
| 15 | | <target name="jar"> |
| 16 | | <delete dir="../out"/> |
| 17 | | <mkdir dir="../out"/> |
| 18 | | <delete file="../lib/planetsim.jar"/> |
| 19 | | <echo message="Compiling only with 1.4 compatibility (without debug options)"/> |
| 20 | | <javac srcdir="../src" |
| 21 | | destdir="../out" |
| 22 | | source="1.4" |
| 23 | | target="1.4"> |
| 24 | | <classpath refid="base.path"/> |
| 25 | | </javac> |
| 26 | | <jar jarfile="../lib/planetsim.jar" |
| 27 | | basedir="../out" > |
| 28 | | </jar> |
| | 28 | |
| | 29 | |
| | 30 | |
| | 31 | |
| | 32 | <target name="jar_debug"> |
| | 33 | <delete dir="../out" /> |
| | 34 | <mkdir dir="../out" /> |
| | 35 | <delete file="../lib/planetsim.jar" /> |
| | 36 | <echo message="Compiling only with 1.4 compatibility (with activated debug options)" /> |
| | 37 | <javac srcdir="../src" destdir="../out" source="1.4" target="1.4" debug="yes" debuglevel="lines,vars,source"> |
| | 38 | <classpath refid="base.path" /> |
| | 39 | </javac> |
| | 40 | <jar jarfile="../lib/planetsim.jar" basedir="../out"> |
| | 41 | </jar> |
| 32 | | <target name="jar_debug"> |
| 33 | | <delete dir="../out"/> |
| 34 | | <mkdir dir="../out"/> |
| 35 | | <delete file="../lib/planetsim.jar"/> |
| 36 | | <echo message="Compiling only with 1.4 compatibility (with activated debug options)"/> |
| 37 | | <javac srcdir="../src" |
| 38 | | destdir="../out" |
| 39 | | source="1.4" |
| 40 | | target="1.4" |
| 41 | | debug="yes" |
| 42 | | debuglevel="lines,vars,source"> |
| 43 | | <classpath refid="base.path"/> |
| 44 | | </javac> |
| 45 | | <jar jarfile="../lib/planetsim.jar" basedir="../out"></jar> |
| 46 | | </target> |
| | 45 | <target name="api"> |
| | 46 | <delete dir="../docs/api" /> |
| | 47 | <javadoc destdir="../docs/api" author="true" version="true" use="true" windowtitle="PlanetSim"> |
| | 48 | <fileset dir="../src"> |
| | 49 | <include name="planet/**" /> |
| | 50 | <exclude name="**/*.lst" /> |
| | 51 | </fileset> |
| | 52 | <classpath refid="base.path" /> |
| | 53 | </javadoc> |
| | 54 | </target> |
| 73 | | <target name="test"> |
| 74 | | <mkdir dir="reports"/> |
| 75 | | <junit printsummary="yes" fork="yes" haltonfailure="no" haltonerror="no"> |
| 76 | | <formatter type="xml" /> |
| 77 | | <test name="planet.test.SimpleTest" todir="./reports"/> |
| 78 | | <classpath> |
| 79 | | <path refid="base.path" /> |
| 80 | | <pathelement path="../lib/planetsim.jar" /> |
| 81 | | <pathelement path="../lib/junit.jar" /> |
| 82 | | </classpath> |
| 83 | | </junit> |
| 84 | | |
| 85 | | <junitreport todir="./reports"> |
| 86 | | <fileset dir="./reports"> |
| 87 | | <include name="TEST-*.xml"/> |
| 88 | | </fileset> |
| 89 | | <report format="frames" todir="./reports"/> |
| 90 | | </junitreport> |
| 91 | | <echo> |
| | 87 | <junitreport todir="./reports"> |
| | 88 | <fileset dir="./reports"> |
| | 89 | <include name="TEST-*.xml" /> |
| | 90 | </fileset> |
| | 91 | <report format="frames" todir="./reports" /> |
| | 92 | </junitreport> |
| | 93 | <echo> |
| 94 | | </target> |
| 95 | | |
| 96 | | |
| 97 | | <!-- =============================== Help =============================== --> |
| 98 | | <target name="targets"> |
| 99 | | <echo message=""/> |
| 100 | | <echo message="ANT build targets for P2P simulator"/> |
| 101 | | <echo message=""/> |
| 102 | | <echo message="The following targets are available:"/> |
| 103 | | <echo message=" jar Compile and create distribution, without debug options"/> |
| 104 | | <echo message=" jar_debug Compile and create distribution with activated debug options"/> |
| 105 | | <echo message=" api Generate api docs "/> |
| 106 | | <echo message=" run Run one simple command line test"/> |
| 107 | | <echo message=" test Execute a JUnit test. The output is in HTML format in 'reports' directory."/> |
| 108 | | </target> |
| | 96 | </target> |
| | 97 | |
| | 98 | |
| | 99 | <!-- =============================== Help =============================== --> |
| | 100 | <target name="targets"> |
| | 101 | <echo message="" /> |
| | 102 | <echo message="ANT build targets for P2P simulator" /> |
| | 103 | <echo message="" /> |
| | 104 | <echo message="The following targets are available:" /> |
| | 105 | <echo message=" jar Compile and create distribution, without debug options" /> |
| | 106 | <echo message=" jar_debug Compile and create distribution with activated debug options" /> |
| | 107 | <echo message=" api Generate api docs " /> |
| | 108 | <echo message=" run Run one simple command line test" /> |
| | 109 | <echo message=" test Execute a JUnit test. The output is in HTML format in 'reports' directory." /> |
| | 110 | </target> |
| | 111 | |
| | 112 | |
| | 113 | <target name="ajcompile"> |
| | 114 | <delete dir="../out" /> |
| | 115 | <mkdir dir="../out" /> |
| | 116 | <delete file="../lib/planetsimaj.jar" /> |
| | 117 | <iajc source="1.5" target="1.5" sourceroots="../src" classpath="${ajruntime};../lib/junit.jar;${ajtools}" outjar="../lib/planetsimaj.jar" /> |
| | 118 | |
| | 119 | </target> |