source: trunk/makeFiles/build.xml@ 265

Last change on this file since 265 was 265, checked in by ra33, 16 years ago
File size: 4.2 KB
Line 
1<!--
2
3ANT build script for both the Apollo and Expeditee project.
4
5Originally created for the apollo project - but can be used for
6creating expeditee distributions.
7
8This does not include the lib jars within the distributed jar -
9such resources would have to be handled specially in code
10(i.e. jar loaders...).
11
12-->
13<project name="Expeditee" default="fresh_dist_apollo">
14
15 <property name="sourcelevel" value="1.5" />
16 <property name="targetlevel" value="1.5" />
17
18 <property name="src.dir.exp" location="src" /> <!-- source files for expeditee -->
19 <property name="src.dir.apollo" location="src_apollo" /> <!-- source files for apollo -->
20
21 <property name="build.dir" location="bin" /> <!-- compiled class files directory -->
22
23 <property name="lib.dir.exp" location="jars" /> <!-- external dependencies -->
24 <property name="lib.dir.apollo" location="jars_apollo" /> <!-- external dependencies -->
25
26 <property name="dist.dir.exp" location="expeditee" /> <!-- Put the output jar file into the same directory as the others. The manifest file needs to be edited with relative dependencies if another directory structure is desired. -->
27 <property name="dist.dir.apollo" location="releases/apollo" /> <!-- Put the output jar file into the same directory as the others. The manifest file needs to be edited with relative dependencies if another directory structure is desired. -->
28
29
30 <property name="dist.filename.exp" value="Expeditee.jar" />
31 <property name="dist.filename.apollo" value="Apollo_jvm${targetlevel}.jar" />
32
33 <property name="manifest.path.exp" value="expeditee/Manifest.txt" />
34 <property name="manifest.path.apollo" value="${lib.dir.apollo}/dist_manifest.mf" />
35
36 <property name="resources.dir.apollo" location="resources_apollo" /> <!-- resources files for apollo -->
37
38
39 <path id="classpath.exp">
40 <!-- link with all jar files we can find in our defined lib directory -->
41 <fileset dir="${lib.dir.exp}">
42 <include name="*.jar" />
43 </fileset>
44 </path>
45
46 <path id="classpath.apollo">
47 <!-- link with all jar files we can find in our defined lib directory -->
48 <fileset dir="${lib.dir.exp}">
49 <include name="*.jar" />
50 </fileset>
51 <fileset dir="${lib.dir.apollo}">
52 <include name="*.jar" />
53 </fileset>
54 </path>
55
56
57 <!-- TARGETS -->
58 <target name="clean" description="Deletes contents of build directory.">
59 <delete dir="${build.dir}" />
60 <mkdir dir="${build.dir}" />
61 </target>
62
63
64 <!-- Set up directories that are needed for building." -->
65 <target name="init_expeditee">
66 <mkdir dir="${build.dir}" />
67 <mkdir dir="${lib.dir.exp}" />
68 </target>
69
70 <target name="init_apollo" depends="init_expeditee">
71 <mkdir dir="${lib.dir.apollo}" />
72 </target>
73
74
75 <!-- Do the actual compilation." -->
76 <target name="compile_exp" depends="init_expeditee">
77 <javac srcdir="${src.dir.exp}"
78 destdir="${build.dir}"
79 debug="off"
80 optimize="on"
81 source="${sourcelevel}"
82 target="${targetlevel}"
83 compiler="modern"
84 excludes="org/expeditee/items/widgets/charts/**"
85 listfiles="true">
86 <classpath refid="classpath.exp" />
87 <compilerarg value="-Xlint:unchecked"/>
88 </javac>
89 </target>
90
91 <target name="compile_apollo" depends="init_apollo, compile_exp">
92 <javac srcdir="${src.dir.apollo}"
93 destdir="${build.dir}"
94 debug="off"
95 optimize="on"
96 source="${sourcelevel}"
97 target="${targetlevel}"
98 compiler="modern"
99 listfiles="true">
100 <classpath refid="classpath.apollo" />
101 <compilerarg value="-Xlint:unchecked"/>
102 </javac>
103 </target>
104
105
106 <!-- Jaring up the projects." -->
107 <target name="lazy_dist_exp" depends="compile_exp" description="Warning: Does not clean before compile.">
108 <jar destfile="${dist.dir.exp}/${dist.filename.exp}" manifest="${manifest.path.exp}">
109 <fileset dir="${build.dir}"/>
110 </jar>
111 </target>
112
113 <target name="fresh_dist_exp" depends="clean, lazy_dist_exp"/>
114
115 <target name="lazy_dist_apollo" depends="compile_apollo" description="Warning: Does not clean before compile.">
116 <jar destfile="${dist.dir.apollo}/${dist.filename.apollo}" manifest="${manifest.path.apollo}">
117 <fileset dir="${build.dir}"/>
118 <fileset dir="${resources.dir.apollo}"/>
119 </jar>
120 </target>
121
122 <target name="fresh_dist_apollo" depends="clean, lazy_dist_apollo"/>
123
124</project>
Note: See TracBrowser for help on using the repository browser.