-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
69 lines (56 loc) · 2.29 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
<project>
<property name="main.build.dir" value="build/main" />
<property name="main.src.dir" value="src/main" />
<property name="test.build.dir" value="build/test" />
<property name="test.src.dir" value="src/test" />
<property name="resources.src.dir" value="resources" />
<property name="resources.build.dir" value="build/resources" />
<path id="build.classpath">
<pathelement location="lib/junit-4.12.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
<pathelement location="${main.build.dir}"/>
<pathelement location="${resources.build.dir}" />
</path>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile">
<mkdir dir="${main.build.dir}"/>
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false" />
</target>
<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/RssFeedActivity.jar" basedir="${main.build.dir}">
<manifest>
<attribute name="Main-Class" value="dev.oneeb.rssfeedactivity.EntryPoint" />
</manifest>
</jar>
</target>
<target name="run">
<java jar="build/jar/RssFeedActivity.jar" fork="true"/>
</target>
<target name="resource-compile">
<mkdir dir="${resources.build.dir}"/>
<javac srcdir="${resources.src.dir}" destdir="${resources.build.dir}" includeantruntime="false">
<classpath refid="build.classpath"/>
</javac>
</target>
<target name="test-compile" depends="compile,resource-compile">
<mkdir dir="${test.build.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false">
<classpath refid="build.classpath"/>
</javac>
</target>
<target name="test" depends="test-compile">
<junit printsummary="on" haltonfailure="yes" fork="true">
<classpath>
<path refid="build.classpath"/>
<pathelement location="${test.build.dir}"/>
</classpath>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${test.build.dir}" includes="**/*Test.class" />
</batchtest>
</junit>
</target>
</project>