-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
98 lines (87 loc) · 2.88 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="build" name="jSuneido Ant build file">
<property name="target.classes" value="target/ant/classes"/>
<property name="test.classes" value="target/ant/test-classes"/>
<property name="test.output" value="target/ant/test-output"/>
<property name="target.jar" value="target/jsuneido.jar"/>
<path id="main.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="build" description="Build jsuneido.jar" depends="compile">
<echo message="${java.home}" level="info"/>
<jar destfile="${target.jar}">
<manifest>
<attribute name="Main-Class" value="suneido.Suneido" />
<section name="Built">
<attribute name="By" value="${user.name}"/>
<attribute name="When" value="${when}"/>
</section>
</manifest>
<fileset dir="${target.classes}">
<patternset>
<include name="**/*.class*"/>
</patternset>
</fileset>
<zipgroupfileset dir="lib" includes="asm-6.2.1.jar,
asm-analysis-6.2.1.jar, asm-commons-6.2.1.jar,
asm-tree-6.2.1.jar, asm-util-6.2.1.jar,
guava-26.0-jre.jar, lucene-analyzers-common-7.4.0.jar,
lucene-core-7.4.0.jar, lucene-highlighter-7.4.0.jar,
lucene-queryparser-7.4.0.jar, lucene-memory-7.4.0.jar,
trove-3.0.3.jar" />
</jar>
<copy file="${target.jar}" todir="."/>
</target>
<target name="clean" description="Delete all outputs">
<delete dir="target/ant" />
</target>
<target name="rebuild" description="clean and build"
depends="clean,build"/>
<target name="compile">
<mkdir dir="${target.classes}"/>
<!-- specifying debug="true" without debuglevel
should result in -g i.e. all debug info vars,file,line -->
<javac srcdir="src" destdir="${target.classes}"
classpathref="main.classpath"
includeAntRuntime="false"
release="19"
debug="true"/>
</target>
<path id="test.classpath">
<pathelement location="${target.classes}"/>
<pathelement location="${test.classes}"/>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="compile-tests">
<mkdir dir="${test.classes}"/>
<!-- specifying debug="true" without debuglevel
should result in -g i.e. all debug info vars,file,line -->
<javac srcdir="test" destdir="${test.classes}"
classpathref="test.classpath"
includeAntRuntime="false"
release="19"
debug="true"/>
</target>
<target name="test" depends="build,compile-tests">
<mkdir dir="${test.output}"/>
<junit fork="yes" forkmode="once" haltonfailure="yes">
<formatter type="brief" usefile="no" />
<jvmarg line="-ea"/>
<classpath refid="test.classpath"/>
<batchtest todir="${test.output}">
<fileset dir="test">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
<delete>
<fileset dir=".">
<include name="sutmp*" />
</fileset>
</delete>
</target>
</project>