-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.xml
executable file
·33 lines (28 loc) · 1.15 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="java-ping" default="all" basedir=".">
<property name="dir.main.src" value="src" />
<property name="dir.main.build" value="target/java/classes" />
<property name="dir.main.dist" value="target/dist" />
<target name="clean" description="Remove the generated files">
<delete dir="target" />
</target>
<target name="prepare">
<mkdir dir="${dir.main.build}" />
</target>
<target name="build" depends="prepare" description="Build main source code">
<javac destdir="${dir.main.build}" includeAntRuntime="false" debug="true" nowarn="true">
<src path="${dir.main.src}" />
</javac>
</target>
<target name="dist" depends="build" description="Build a distribution">
<jar basedir="${dir.main.build}" destfile="${dir.main.dist}/lib/java-ping.jar" manifest='resources/MANIFEST.MF'/>
<mkdir dir="${dir.main.dist}" />
<copydir src="scripts" dest="${dir.main.dist}" />
<chmod perm="a+x" file="${dir.main.dist}/*.sh"/>
<zip destfile="target/java-ping.zip">
<fileset dir="${dir.main.dist}">
</fileset>
</zip>
</target>
<target name="all" depends="clean, build, dist" />
</project>