-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
59 lines (47 loc) · 1.92 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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="asl-fall16-project" basedir="." default="jar">
<description>ANT Build File for ASL Fall 2017 Project</description>
<!-- Define global properties for this build -->
<property name="nethz-id" value="fmorath" />
<property name="jarfile" value="middleware-fmorath.jar"/>
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="lib" location="lib" />
<property name="src" location="src" />
<!-- Define classpath for this build -->
<path id="classpath">
<fileset dir="${lib}">
<include name="log4j-core-2.11.1.jar"/>
<include name="log4j-api-2.11.1.jar"/>
</fileset>
</path>
<target name="init" description="Initialization">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpathref="classpath" includeantruntime="false" />
</target>
<target name="jar" depends="compile" description="generate the distribution">
<!-- Put everything in ${build} and ${lib} into the jar file -->
<!-- Manifest classpath -->
<manifestclasspath property="manifest.classpath" jarfile="${jarfile}">
<classpath refid="classpath"/>
</manifestclasspath>
<jar destfile="${dist}/middleware-${nethz-id}.jar" basedir="${build}">
<manifest>
<attribute name="Class-Path" value="${manifest.classpath}" />
<attribute name="Main-Class" value="ch.ethz.asl.RunMW"/>
</manifest>
<zipgroupfileset dir="${lib}" includes="**/*.jar" />
<fileset file="log4j2.xml" />
</jar>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>