-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·80 lines (67 loc) · 2.33 KB
/
build.xml
File metadata and controls
executable file
·80 lines (67 loc) · 2.33 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0"?>
<project name="coderwall-java" default="dist" basedir=".">
<property name="prjname" value="${ant.project.name}"/>
<property name="jarfile" value="coderwall.jar"/>
<property name="main.class" value="net.caseydunham.coderwall.CoderWallDemo"/>
<property name="lib" value="lib"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="main" value="src/main"/>
<property name="src" value="${main}/java"/>
<property name="config" value="${main}/config"/>
<property name="resources" value="${main}/resources"/>
<property name="test" value="src/test"/>
<property name="test-src" value="${test}/java"/>
<property name="test-config" value="${test}/config"/>
<property name="test-resources" value="${test}/resources"/>
<path id="build.classpath">
<fileset id="app.libs" dir="${lib}">
<include name="gson-2.1.jar"/>
</fileset>
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="build.classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="clean">
<delete dir="${build}" quiet="yes"/>
<delete dir="${dist}" quiet="yes"/>
</target>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init">
<copy todir="${build}">
<fileset dir="${config}"/>
<fileset dir="${resources}"/>
</copy>
<javac srcdir="${src}" destdir="${build}" debug="yes" target="1.6">
<classpath refid="build.classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<jar jarfile="${build}/${jarfile}" update="no">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Build-Date" value="${DSTAMP}"/>
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
<fileset dir="${build}"/>
</jar>
</target>
<target name="dist" depends="clean, jar">
<mkdir dir="${dist}/${lib}"/>
<copy file="${build}/${jarfile}" todir="${dist}" overwrite="true"/>
<copy todir="${dist}/${lib}">
<fileset refid="app.libs"/>
</copy>
</target>
</project>