forked from fcoury/jfilehelpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
66 lines (58 loc) · 2.39 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
<project name="JFileHelpers" basedir="." default="junit">
<property name="version" value="0.3" />
<property name="dist" value="${basedir}/dist" />
<property name="build" value="${basedir}/bin" />
<property name="lib" value="${basedir}/lib" />
<tstamp>
<format property="TODAY" pattern="yyyyMMdd"/>
</tstamp>
<target name="init">
<mkdir dir="${dist}" />
<mkdir dir="${build}" />
</target>
<target name="src" depends="init">
<zip file="${dist}/jfilehelpers-src-${version}-${TODAY}.zip">
<zipfileset dir="${basedir}" includes="Source/**/*"></zipfileset>
<zipfileset dir="${basedir}" includes="Tests/**/*"></zipfileset>
<zipfileset dir="${basedir}" includes="Samples/**/*"></zipfileset>
<zipfileset dir="${basedir}" includes="Resources/**/*"></zipfileset>
<zipfileset dir="${basedir}" includes="lib/*"></zipfileset>
<zipfileset dir="${basedir}" includes=".classpath"></zipfileset>
<zipfileset dir="${basedir}" includes=".project"></zipfileset>
<zipfileset dir="${basedir}" includes="build.xml"></zipfileset>
<zipfileset dir="${basedir}" includes="jfilehelpers.jardesc"></zipfileset>
<zipfileset dir="${basedir}" includes="port-differences.txt"></zipfileset>
</zip>
</target>
<target name="compile" depends="init">
<javac destdir="${build}" classpath="${lib}/commons-lang-2.3.jar:${lib}/junit-4.4.jar">
<src path="${basedir}/Source/src" />
<src path="${basedir}/Tests/src" />
<src path="${basedir}/Samples/src" />
</javac>
</target>
<target name="jars" depends="compile">
<jar destfile="${dist}/jfilehelpers-${version}-${TODAY}.jar">
<manifest>
</manifest>
<fileset dir="bin" includes="**/*.class" />
<fileset dir="Resources" includes="**/*" />
</jar>
</target>
<target name="junit" depends="jars">
<junit printsummary="on" fork="false">
<formatter type="brief" />
<classpath path="${dist}/jfilehelpers-${version}-${TODAY}.jar:${lib}/junit-4.4.jar" />
<batchtest>
<fileset dir="${build}">
<include name="org/coury/jfilehelpers/tests/**/*Test.class" />
</fileset>
</batchtest>
</junit>
<junitreport>
<fileset dir=".">
<include name="TEST-*.log"/>
</fileset>
</junitreport>
</target>
</project>