-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
108 lines (93 loc) · 3.55 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<project name="htmlJgen" default="jar">
<property name="version" value="2.0"/>
<!-- Set cobertura.libdir in your .ant.properties file. If you don't
want to run the test coverage, you don't need this.
-->
<loadproperties srcFile="${user.home}/.ant.properties"/>
<include file="src/ant-macros/cobertura.xml"/>
<include file="src/ant-macros/javac.xml"/>
<path id="compile-classpath">
<fileset dir="libs/build" includes="**/*.jar"/>
</path>
<target name="setup">
<mkdir dir="build/classes"/>
</target>
<target name="compile" depends="setup">
<do-compile srcdir="src/java"
dstdir="build/classes"
classpathref="compile-classpath" />
</target>
<target name="compile-tests">
<path id="test-cp">
<fileset dir="libs/build" includes="*.jar"/>
<pathelement path="build/classes"/>
</path>
<do-compile srcdir="test/src/java"
dstdir="build/test/classes"
classpathref="test-cp"/>
</target>
<target name="test-coverage" depends="compile, compile-tests">
<do-cobertura-init cobertura.libdir="${cobertura.libdir}"/>
<do-cobertura-instrument/>
<delete dir="build/junit"/>
<mkdir dir="build/junit"/>
<junit fork="yes">
<sysproperty key="net.sourceforge.cobertura.datafile"
value="${cobertura.data}"/>
<classpath>
<pathelement location="build/cobertura/classes"/>
<pathelement location="build/classes"/>
<pathelement location="build/test/classes"/>
<path refid="cobertura.classpath"/>
<fileset dir="libs/build" includes="*.jar"/>
</classpath>
<formatter type="xml" usefile="true" />
<formatter type="plain" usefile="false"/>
<batchtest fork="yes" todir="build/junit">
<fileset dir="test/src/java" includes="**/*Test.java"/>
</batchtest>
</junit>
<cobertura-report datafile="${cobertura.data}"
destdir="build/coverage-report"
srcdir="src/java"
/>
</target>
<target name="javadoc">
<javadoc sourcepath="src/java"
destdir="build/${ant.project.name}-javadoc"
classpathref="compile-classpath"
packagenames="de.*"
Use="true"
stylesheetfile="src/style.css"
Windowtitle="htmlJgen"
Overview="src/java/overview.html"
Header="version ${version}">
<link href="http://docs.oracle.com/javase/7/docs/api/"
packageListURL="http://docs.oracle.com/javase/7/docs/api/package-list"
/>
<bottom><a target="github" href="https://github.com/HaraldKi/htmlJgen">Source code on github<a></bottom>
</javadoc>
</target>
<target name="jar" depends="clean, compile">
<jar destfile="build/${ant.project.name}-${version}.jar">
<fileset dir="build/classes"/>
</jar>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="docjar" depends="javadoc">
<jar destfile="build/${ant.project.name}-javadoc-${version}.jar">
<zipfileset dir="build/${ant.project.name}-javadoc/"
prefix="${ant.project.name}-javadoc-${version}"/>
</jar>
</target>
<target name="package" depends="jar, docjar, test-coverage">
</target>
<target name="ivy" xmlns:ivy="antlib:org.apache.ivy.ant">
<ivy:configure settingsId="ivyconf" file="./ivysettings.xml"/>
<ivy:resolve />
<ivy:retrieve pattern="libs/build/[artifact]-[revision].[ext]" />
</target>
</project>