-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.xml
138 lines (124 loc) · 3.99 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<project name="lzmajio" default="jar" basedir=".">
<path id="test-path">
<pathelement location="build" />
<pathelement location="/usr/share/junit/junit.jar" />
<pathelement location="/opt/local/share/java/cobertura.jar" />
<pathelement location="/opt/local/share/java/jakarta-log4j.jar" />
<pathelement location="/opt/local/share/java/jakarta-oro.jar" />
<pathelement location="/opt/local/share/java/javancss.jar" />
<pathelement location="/opt/local/share/java/objectweb-asm.jar" />
<pathelement location="/opt/local/share/java/ccl.jar" />
<pathelement path="${java.class.path}" />
<pathelement path="${gentoo.classpath}" />
</path>
<property name="major" value="0" />
<property name="minor" value="95" />
<property name="version" value="${major}.${minor}" />
<property name="package" value="net/contrapunctus/lzma" />
<property name="jarfile" value="lzmajio.jar" />
<property name="debug" value="no" />
<property name="build.coverage.dir" value="ibuild" />
<taskdef resource="tasks.properties">
<classpath>
<path refid="test-path" />
</classpath>
</taskdef>
<uptodate srcfile="${package}/Version.template"
targetfile="${package}/Version.java"
property="version-stamp-exists" />
<target name="version-stamp" unless="version-stamp-exists">
<exec executable="git" outputproperty="context">
<arg value="describe" />
</exec>
<filter token="major" value="${major}" />
<filter token="minor" value="${minor}" />
<filter token="context" value="${context}" />
<copy file="${package}/Version.template"
tofile="${package}/Version.java"
filtering="on" />
</target>
<target name="init">
<mkdir dir="build"/>
<mkdir dir="docs"/>
</target>
<target name="compile" depends="init,version-stamp">
<javac srcdir="." destdir="build" debug="${debug}">
<classpath>
<path refid="test-path" />
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<copy file="CPL.html" todir="build" />
<copy file="LGPL.txt" todir="build" />
<jar jarfile="${jarfile}" basedir="build"/>
</target>
<target name="javadoc" depends="init,version-stamp">
<javadoc destdir="docs">
<classpath>
<path refid="test-path" />
</classpath>
<fileset dir=".">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="dist" depends="clean,version-stamp">
<tar destfile="lzmajio-${version}.tar.gz" compression="gzip">
<tarfileset dir="." prefix="lzmajio-${version}">
<exclude name="lzmajio*.gz" />
<exclude name="lzmajio*.jar" />
<exclude name="lzmajio*.tar" />
<exclude name=".git/**" />
<exclude name="SevenZip/**" />
</tarfileset>
</tar>
</target>
<target name="test" depends="compile">
<echo>Base dir is ${basedir}</echo>
<cobertura-instrument todir="${build.coverage.dir}">
<fileset dir="build">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
<junit printsummary="yes" showoutput="yes" haltonfailure="yes"
fork="yes" dir="${basedir}">
<classpath>
<pathelement location="${build.coverage.dir}" />
<path refid="test-path" />
</classpath>
<formatter type="plain"/>
<batchtest>
<fileset dir=".">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="coverage" depends="test">
<cobertura-report srcdir="." destdir="${build.coverage.dir}" />
</target>
<target name="clean">
<delete dir="build" />
<delete dir="docs" />
<delete dir="${build.coverage.dir}" />
<delete file="cobertura.ser" />
<delete>
<fileset dir="." includes="TEST-*.txt" />
</delete>
</target>
<target name="distclean" depends="clean">
<delete file="${jarfile}" />
<delete file="${package}/Version.java" />
<delete>
<fileset dir="." includes="lzmajio*.gz" />
<fileset dir="." includes="lzmajio*.jar" />
<fileset dir="." includes="lzmajio*.tar" />
</delete>
</target>
</project>
<!-- Local variables: -->
<!-- indent-tabs-mode: t -->
<!-- tab-width: 2 -->
<!-- End: -->