-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
59 lines (52 loc) · 1.75 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="voidstats" basedir=".">
<property name="name" value="voidstats"/>
<property name="version" value="0.1-dev"/>
<property name="src.dir" value="src"/>
<property name="build.dir" location="build" />
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<property name="docs.dir" value="javadoc"/>
<property name="main-class" value="org.deri.voidstats.Main"/>
<!-- Add lib folder to build path -->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${docs.dir}" />
<delete dir="${dist.dir}" />
</target>
<!-- Creates the build, docs and dist directory-->
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${docs.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<!-- Compiles the java code -->
<target name="compile" depends="clean, makedir">
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" debug="true" debuglevel="lines,source">
<classpath refid="classpath"/>
</javac>
</target>
<!--Creates the deployable jar file -->
<target name="dist" depends="compile">
<jar destfile="${dist.dir}/${name}-${version}.jar" basedir="${build.dir}">
<!-- <zipfileset src="${lib.dir}/commons-cli-1.1.jar" /> -->
<zipfileset src="${lib.dir}/nxparser-1.2.3.jar" />
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
</target>
<!-- Creates Javadocs -->
<target name="docs" depends="dist" >
<javadoc destdir="${docs.dir}" author="true" version="true">
<fileset dir="${src.dir}" />
<classpath refid="classpath"/>
</javadoc>
</target>
</project>