-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
41 lines (34 loc) · 1.09 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
<?xml version="1.0" ?>
<!-- Configuration of the Ant build system to generate a Jar file -->
<project name="Cluster">
<property name="main-class" value="io.CommandLineInterface"/>
<property name="jar.dir" value="build/jar"/>
<property name="jar.name" value="cluster"/>
<path id="classpath">
<fileset dir="lib" includes="*.jar"/>
</path>
<target name="clean">
<delete dir="build" />
</target>
<target name="compile">
<mkdir dir="build/classes" />
<javac srcdir="src" destdir="build/classes" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="jar">
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${jar.name}.jar" basedir="build/classes">
<zipgroupfileset dir="lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${jar.name}.jar"/>
</classpath>
</java>
</target>
</project>