-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
140 lines (122 loc) · 3.96 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
139
140
<?xml version="1.0"?>
<project name="Approdictio" default="compile" basedir=".">
<!--
Run 'ant ivy' first to download dependencies.
If you don't have ivy, you need to fetch the dependencies in
ivy.xml by hand and place the *.jar files into libs/build.
-->
<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>
<path id="test-classpath">
<fileset dir="libs/build" includes="**/*.jar"/>
</path>
<target name="compile" description="compiles java classes">
<mkdir dir="build/classes"/>
<javac srcdir="src/java"
destdir="build/classes"
source="1.6"
target="1.6"
listfiles="yes"
fork="false"
debug="true"
deprecation="true"
includeantruntime="false"
>
<compilerarg value="-Xlint:unchecked"/>
<patternset includes="approdictio/**/*.java"
excludes="**/package-info.java"/>
</javac>
</target>
<target name="javadoc" depends="ivyvalues"
description="run javadoc to create api docs">
<javadoc sourcepath="src/java"
packagenames="*"
destdir="build/ApprodictioDoc"
windowtitle="Approximate Lookup Dictionaries"
header="<span class='approheader'>Approdictio v${release}</span>"
overview="src/java/overview.html"
Bottom="<div class="approlink">download: <a
href='https://github.com/HaraldKi/approdictio/releases' target='_top'>github.com/HaraldKi/approdictio/releases</a><br/>home page: <a href="https://github.com/HaraldKi/approdictio" target='_top'>github.com/HaraldKi/approdictio</a></div>"
>
</javadoc>
</target>
<target name="jar" depends="cleanClasses, compile, ivyvalues">
<mkdir dir="build"/>
<jar destfile="build/Approdictio-${release}.jar"
basedir="build/classes"
includes="**/*.class"
excludes="**/Test*.class">
<manifest>
<attribute name="release" value="${release}" />
<attribute name="timestamp" value="${time.now}" />
</manifest>
</jar>
</target>
<target name="docjar" depends="cleanDoc, javadoc">
<mkdir dir="build"/>
<zip destfile="build/ApprodictioDoc-${release}.zip"
basedir="build" includes="ApprodictioDoc/**">
</zip>
</target>
<target name="release" depends="jar, docjar"
description="create release for upload">
</target>
<target name="cleanClasses">
<delete dir="build/classes" />
</target>
<target name="cleanDoc">
<delete dir="build/ApprodictioDoc"/>
</target>
<target name="compiletests">
<javac srcdir="testsrc"
destdir="build/classes"
classpathref="test-classpath"
source="1.6"
listfiles="no"
fork="false"
debug="true"
deprecation="true"
includeantruntime="true"
>
<compilerarg value="-Xlint:unchecked"/>
<patternset includes="**/*.java" />
</javac>
</target>
<target name="unitest" depends="compile, compiletests"
description="run unit test with junit4">
<junit fork="yes"> <!-- printsummary="withOutAndErr" -->
<classpath>
<path refid="test-classpath"/>
<pathelement location="build/classes"/>
</classpath>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes">
<fileset dir="build/classes">
<include name="**/Test*.class"/>
<exclude name="**/*$*.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="ivyvalues">
<loadfile property="release" srcFile="ivy.xml">
<filterchain>
<linecontainsregexp>
<regexp pattern="revision=.[0-9]+"/>
</linecontainsregexp>
<replaceregex pattern=".*revision=.([0-9]+).*"
replace="\1"/>
<striplinebreaks/>
</filterchain>
</loadfile>
</target>
<tstamp>
<format property="time.now" pattern="yyyy-MM-dd hh:mm:ss"/>
</tstamp>
<target name="e">
<echoproperties/>
</target>
</project>