-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
154 lines (143 loc) · 4.74 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<project name="jbones_schedule" default="builditDebug" basedir=".">
<property file="${ant.project.name}_build.properties" />
<description>jbones_core build file</description>
<!--Set up classpath-->
<path id="project.class.path">
<fileset dir="${appLibDir}">
<include name="*.*" />
</fileset>
<pathelement path="${buildDir}" />
</path>
<!--Build the default javadocs-->
<target name="doc" depends="cleanDoc, createDocDir" description="generate javadocs">
<javadoc
sourcePath="${javaSrcDir}"
destdir="${javaDocDir}"
classpath= "project.class.path"
packagenames="${projectPackages}"/>
</target>
<!--Build the private javadocs-->
<target name="docprivate" depends="cleanDoc, createDocDir" description="generate javadocs">
<javadoc
private = "true"
sourcePath="${javaSrcDir}"
destdir="${javaDocDir}"
classpath= "project.class.path"
packagenames="${projectPackages}"/>
</target>
<!--Clean up all the created files-->
<target name="cleanDoc" description="clean javadocs">
<delete dir="${javaDocDir}" />
</target>
<!--Create javadoc directory-->
<target name="createDocDir" >
<mkdir dir="${javaDocDir}" />
</target>
<!--Create all the build directories-->
<target name="createBuildArea" >
<mkdir dir="${buildDir}" />
<mkdir dir="${buildDir}/test" />
</target>
<!--Copy the files to build area-->
<target name="copyFilesToBuildArea" depends="createBuildArea" >
<copy todir="${buildDir}/META-INF">
<fileset dir="${METAINFDir}">
<exclude name="**/*.db"/>
</fileset>
</copy>
</target>
<!--Compile the java source files-->
<target name="compile" depends="createBuildArea">
<javac srcdir="${javaSrcDir}" destdir="${buildDir}">
<classpath refid="project.class.path" />
</javac>
</target>
<!--Compile the java source files with debug statements-->
<target name="compileDebug" depends="clean,createBuildArea,copyFilesToBuildArea">
<echo message="using java version:${ant.java.version}" />
<javac srcdir="${javaSrcDir}" destdir="${buildDir}" debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path" />
</javac>
</target>
<!--Clean up all the created files-->
<target name="clean" description="clean up">
<delete dir="${buildDir}" />
</target>
<!--Jar the class files-->
<target name="createJar" depends="cleanJar,compile">
<jar
jarfile="${deployDir}/${ant.project.name}.jar"
update="no"
basedir="${buildDir}" >
<include name="META-INF/**" />
<include name="**/*.class" />
<exclude name="**/*.java" />
</jar>
</target>
<!--Jar the config files-->
<target name="createJarConfig" depends="cleanJarConfig">
<jar
jarfile="${deployDir}/${ant.project.name}-config.jar"
update="no"
basedir="${configDir}" >
<include name="**/*" />
</jar>
</target>
<!--Clean up the config Jar-->
<target name="cleanJarConfig" >
<delete>
<fileset dir="${deployDir}">
<patternset>
<include name="${ant.project.name}-config.jar"/>
</patternset>
</fileset>
</delete>
</target>
<!--Jar the debug enabled class files -->
<target name="createJarDebug" depends="cleanJar,compileDebug">
<jar
jarfile="${deployDir}/${ant.project.name}.jar"
update="no"
basedir="${buildDir}"
manifest="${METAINFDir}/MANIFEST.MF" >
<include name="**/*.class" />
<exclude name="**/*.java" />
</jar>
</target>
<!--Clean up the Jar-->
<target name="cleanJar" >
<delete>
<fileset dir="${deployDir}">
<patternset>
<include name="${ant.project.name}.jar"/>
</patternset>
</fileset>
</delete>
</target>
<!--Build the jar-->
<target name="buildit" description="builds all components" depends="compile" >
<antcall target="createJar" />
</target>
<!--Build the jar with debug enabled classes-->
<target name="builditDebug" description="builds all components" depends="compileDebug" >
<antcall target="createJarDebug" />
<antcall target="createJarConfig" />
</target>
<target name="help">
<echo>
usage:
ant -help display ant help screen
ant help display this message
ant compile compile the .java files
ant clean deletes the build directory
ant deployJAR build the deployable jar (default)
ant doc generate javadocs
ant docPrivate generate javadocs -private
ant cleandoc delete the javadocs
ant default
example:
ant
ant clean
</echo>
</target>
</project>