source: build.xml

Last change on this file was 260, checked in by Tim Baarslag, 5 years ago

9.1.12 build for Southampton

File size: 2.3 KB
Line 
1<project name="Genius" default="zip" basedir=".">
2 <description>
3 ANT build script for Genius. Creates ZIP file for distribution.
4 </description>
5
6
7 <property name="version" value="9.1.12"/>
8
9 <!-- path contains all jars in the dep directory -->
10 <path id="class.path">
11 <fileset dir="dep">
12 <include name="**/*.jar" />
13 </fileset>
14 </path>
15
16
17 <!-- Compile Genius without the test stuff. -->
18 <target name="compile" description="compile the source">
19 <delete dir="classes/" />
20 <mkdir dir="classes/" />
21 <!-- We compile (ignore eclipse's build result) because we now have to exclude the junit test codes .
22 includeantruntime disables a misfeature introduced in Ant 1.8.
23 We fork so that we can set language options for the compiler.
24 We need the options to set ISO character encoding to allow chinese characters. -->
25
26 <javac destdir="classes/" includeantruntime="false" fork="true">
27 <compilerarg line="-encoding ISO-8859-1" />
28 <src path="src/main/java/" />
29 <classpath refid="class.path" />
30 </javac>
31 </target>
32
33
34 <!-- Build the genius main application: fat jar file, set manifest and include all dependencies. -->
35 <target name="jar" depends="compile">
36 <jar destfile="genius-${version}.jar" basedir="classes/">
37 <!-- include the resources -->
38 <fileset dir="src/main/resources" includes="**" />
39 <fileset dir="src/main/java" includes="genius/core/**" />
40 <!-- include all dependencies -->
41 <zipgroupfileset dir="dep" includes="**/*.jar" />
42 <manifest>
43 <attribute name="Main-Class" value="genius.Application" />
44 <attribute name="Implementation-Version" value="${version}" />
45 </manifest>
46 </jar>
47 </target>
48
49 <!-- Create zip file with the standard contents: genius.jar, doc, examples -->
50 <target name="zip" depends="jar" description="build genius zip">
51 <zip destfile="genius-${version}.zip">
52 <fileset dir="." includes="genius-${version}.jar" />
53 <fileset dir="doc" includes="userguide.pdf" />
54 <fileset dir="src/test/java" includes="multipartyexample/**" />
55 <fileset dir="src/test/java" includes="storageexample/**" />
56 <fileset dir="src/test/java" includes="bilateralexamples/**" />
57 <fileset dir="src/test/resources" includes="multilateraltournament.xml" />
58 <fileset dir="." includes="javadoc/**" />
59 </zip>
60 </target>
61
62
63</project>
Note: See TracBrowser for help on using the repository browser.