-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
51 lines (51 loc) · 2.27 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
<project name="linulator" default="dist" basedir=".">
<description>Linulator ant build file</description>
<property name="author" value="Lloyd Dilley" />
<property name="version" value="0.1.0" />
<property name="pkg" value="org${file.separator}linulator" />
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="jdocs" location="jdocs" />
<property name="tools" location="tools" />
<echo>Thank you for using Linulator!</echo>
<target name="init">
<tstamp />
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compiles the Linulator software">
<javac srcdir="${src}" destdir="${build}" includeAntRuntime="false" />
</target>
<target name="doc" description="creates javadocs">
<mkdir dir="${jdocs}" />
<javadoc sourcepath="${src}" destdir="${jdocs}" packagenames="org.linulator">
</javadoc>
</target>
<target name="dist" depends="compile" description="creates jarball for distribution">
<mkdir dir="${dist}" />
<mkdir dir="${dist}${file.separator}cfg" />
<mkdir dir="${dist}${file.separator}lib" />
<mkdir dir="${dist}${file.separator}log" />
<copy file="cfg${file.separator}linulator.properties" todir="${dist}${file.separator}cfg" />
<copy file="cfg${file.separator}linulator.policy" todir="${dist}${file.separator}cfg" />
<copy file="lib${file.separator}derby.jar" todir="${dist}${file.separator}lib" />
<jar jarfile="${dist}${file.separator}linulator-${version}-${DSTAMP}.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org${file.separator}linulator${file.separator}Linulator" />
<attribute name="Class-Path" value="lib${file.separator}derby.jar" />
</manifest>
</jar>
</target>
<target name="all" depends="compile, doc, dist" description="builds everything">
</target>
<target name="clean" description="cleans up">
<delete>
<fileset dir="${src}${file.separator}${pkg}" includes="*.class" />
<fileset dir="${tools}" includes="*.class derby.log" />
</delete>
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${jdocs}" />
<delete dir="${tools}${file.separator}linulator" />
</target>
</project>