-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
79 lines (68 loc) · 2.82 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<project name="JACSS" default="dist" basedir=".">
<description>
main build file for JACSS
</description>
<property file="build.properties"/>
<property name="lib" location="lib"/>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="reports" location="reports"/>
<path id="project.class.path">
<pathelement location="${lib}/args4j-2.0.17.jar"/>
<pathelement location="${lib}/guava-15.0.jar"/>
<pathelement location="${lib}/testng-6.8.jar"/>
<pathelement path="${java.class.path}/"/>
</path>
<path id="testing.path">
<pathelement location="${lib}/args4j-2.0.17.jar"/>
<pathelement location="${lib}/guava-15.0.jar"/>
<pathelement location="${lib}/testng-6.8.jar"/>
<pathelement location="${build}"/>
</path>
<taskdef name="testng" classpathref="testing.path" classname="org.testng.TestNGAntTask"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="build" depends="init" description="compile the source">
<javac srcdir="${src}" destdir="${build}" debug="true">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="dist" depends="build" description="generate the distribution">
<buildnumber file="build.num"/>
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/jacss-${version}-${build.number}-no-deps.jar"
basedir="${build}"
excludes="**/*Test,**/Test*">
<manifest>
<attribute name="Main-Class" value="com.wickedspiral.jacss.JACSS"/>
<attribute name="Implementation-Version" value="${version}-${build.number}"/>
</manifest>
</jar>
<jar jarfile="${dist}/jacss-${version}-${build.number}.jar"
basedir="${build}"
excludes="**/*Test,**/Test*">
<zipfileset includes="**/*.class" src="${lib}/args4j-2.0.17.jar"/>
<zipfileset includes="**/*.class" src="${lib}/guava-15.0.jar"/>
<manifest>
<attribute name="Main-Class" value="com.wickedspiral.jacss.JACSS"/>
<attribute name="Implementation-Version" value="${version}-${build.number}"/>
</manifest>
</jar>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${reports}"/>
</target>
<target name="test" depends="build" description="run tests">
<testng classpathref="testing.path"
outputdir="${reports}"
haltonfailure="true"
listeners="com.wickedspiral.jacss.TestReporter">
<classfileset dir="${build}" includes="**/JACSSTest.class"/>
</testng>
</target>
</project>