-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
56 lines (47 loc) · 1.64 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="unique" basedir="." default="dist">
<fileset id="libs" dir="lib" erroronmissingdir="false">
<include name="*.jar"/>
</fileset>
<path id="classpath">
<fileset refid="libs"/>
</path>
<target name="check-target-dir">
<available file="target" property="target-present"/>
</target>
<target name="create-target-dir-if-needed"
depends="check-target-dir"
unless="target-dir-present">
<mkdir dir="target"/>
</target>
<target name="clean" depends="create-target-dir-if-needed">
<delete dir="target/classes" failonerror="false"/>
<delete dir="target/dist" failonerror="false"/>
</target>
<target name="build" depends="clean">
<mkdir dir="target/classes"/>
<javac srcdir="src/java" includes="**/*.java"
destdir="target/classes"
source="1.7" target="1.7" debug="true">
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<target name="prepare-dist-dir" depends="clean">
<mkdir dir="target/dist"/>
<mkdir dir="target/dist/libs-exploded"/>
<unjar dest="target/dist/libs-exploded">
<patternset>
<exclude name="META-INF/MANIFEST.MF"/>
</patternset>
<fileset refid="libs"/>
</unjar>
</target>
<target name="dist" depends="build, prepare-dist-dir">
<jar destfile="target/dist/${ant.project.name}.jar" manifest="src/manifest.txt">
<fileset dir="target/classes" includes="**"/>
<fileset dir="target/dist/libs-exploded" includes="**"/>
</jar>
</target>
</project>