source: trunk/build.xml@ 351

Last change on this file since 351 was 351, checked in by bjn8, 16 years ago

Fixed build issues with new expeditee packages.

File size: 4.5 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_exp">
14
15 <property name="sourcelevel" value="1.6" />
16 <property name="targetlevel" value="1.6" />
17
18 <property name="resources.dir.apollo" location="resources_apollo" /> <!-- resources files for apollo -->
19
20 <property name="src.dir.exp" location="src" /> <!-- source files for expeditee -->
21 <property name="src.dir.apollo" location="src_apollo" /> <!-- source files for apollo -->
22
23 <property name="build.dir" location="bin" /> <!-- compiled class files directory -->
24
25 <property name="lib.dir.exp" location="jars" /> <!-- external dependencies -->
26 <property name="lib.dir.apollo" location="jars_apollo" /> <!-- external dependencies -->
27
28 <property name="dist.dir.exp" location="releases" /> <!-- 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. -->
29 <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. -->
30
31 <property name="dist.filename.exp" value="Expeditee.jar" />
32 <property name="dist.filename.apollo" value="Apollo_jvm${targetlevel}${TODAY}.jar" />
33
34 <property name="manifest.path.exp" value="makeFiles/Manifest.txt" />
35 <property name="manifest.path.apollo" value="makeFiles/apollo_manifest.mf" />
36
37 <path id="classpath.exp">
38 <!-- link with all jar files we can find in our defined lib directory -->
39 <fileset dir="${lib.dir.exp}">
40 <include name="*.jar" />
41 <exclude name="jnmp2p.jar"/> <!-- This is a zero-sized file! Its totally invalid and will fail any builds - omitting !-->
42 <exclude name="jxta.jar"/> <!-- Ditto !-->
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 <exclude name="jnmp2p.jar"/> <!-- This is a zero-sized file! Its totally invalid and will fail any builds - omitting !-->
51 <exclude name="jxta.jar"/> <!-- Ditto !-->
52 </fileset>
53 <fileset dir="${lib.dir.apollo}">
54 <include name="*.jar" />
55 </fileset>
56 </path>
57
58
59 <!-- TARGETS -->
60 <target name="clean" description="Deletes contents of build directory.">
61 <delete dir="${build.dir}" />
62 <mkdir dir="${build.dir}" />
63 </target>
64
65
66 <!-- Set up directories that are needed for building." -->
67 <target name="init_expeditee">
68 <mkdir dir="${build.dir}" />
69 <mkdir dir="${lib.dir.exp}" />
70 </target>
71
72 <target name="init_apollo" depends="init_expeditee">
73 <mkdir dir="${lib.dir.apollo}" />
74 </target>
75
76
77 <!-- Do the actual compilation." -->
78 <target name="compile_exp" depends="init_expeditee">
79 <javac srcdir="${src.dir.exp}"
80 destdir="${build.dir}"
81 debug="off"
82 optimize="on"
83 source="${sourcelevel}"
84 target="${targetlevel}"
85 compiler="modern"
86 excludes="org/expeditee/items/widgets/charts/**"
87 listfiles="true">
88 <classpath refid="classpath.exp" />
89 <compilerarg value="-Xlint:unchecked"/>
90 </javac>
91 </target>
92
93 <target name="compile_apollo" depends="init_apollo, compile_exp">
94 <javac srcdir="${src.dir.apollo}"
95 destdir="${build.dir}"
96 debug="off"
97 optimize="on"
98 source="${sourcelevel}"
99 target="${targetlevel}"
100 compiler="modern"
101 listfiles="true">
102 <classpath refid="classpath.apollo" />
103 <compilerarg value="-Xlint:unchecked"/>
104 </javac>
105 </target>
106
107
108 <!-- Jaring up the projects." -->
109 <target name="lazy_dist_exp" depends="compile_exp" description="Warning: Does not clean before compile.">
110 <jar destfile="${dist.dir.exp}/${dist.filename.exp}" manifest="${manifest.path.exp}">
111 <fileset dir="${build.dir}"/>
112 </jar>
113 </target>
114
115 <target name="fresh_dist_exp" depends="clean, lazy_dist_exp"/>
116
117 <target name="lazy_dist_apollo" depends="compile_apollo" description="Warning: Does not clean before compile.">
118 <jar destfile="${dist.dir.apollo}/${dist.filename.apollo}" manifest="${manifest.path.apollo}">
119 <fileset dir="${build.dir}"/>
120 <fileset dir="${resources.dir.apollo}"/>
121 </jar>
122 </target>
123
124 <target name="fresh_dist_apollo" depends="clean, lazy_dist_apollo"/>
125
126</project>
Note: See TracBrowser for help on using the repository browser.