-
Notifications
You must be signed in to change notification settings - Fork 0
/
javac.xml
86 lines (78 loc) · 2.54 KB
/
javac.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- standard call to javac for main and test -->
<project>
<import file="util.xml"/>
<macrodef name="do-javac">
<attribute name="classpathref" default="empty-classpath"/>
<sequential>
<set-javac-cp classpathref="@{classpathref}"/>
<do-javac-helper srcdir="src"
dstdir="build/classes"
classpathref="javac-cp"/>
</sequential>
</macrodef>
<macrodef name="do-javac-tests">
<attribute name="classpathref" default="empty-classpath"/>
<sequential>
<set-javac-tests-cp classpathref="@{classpathref}"/>
<do-javac-helper srcdir="tests/src"
dstdir="build/test-classes"
classpathref="javac-tests-cp"/>
</sequential>
</macrodef>
<macrodef name="do-copy-conf">
<sequential>
<copy todir="build/classes">
<fileset dir="src/conf" />
</copy>
</sequential>
</macrodef>
<macrodef name="set-javac-cp">
<attribute name="classpathref"/>
<sequential>
<path id="javac-cp">
<path refid="@{classpathref}"/>
<pathelement location="build/classes"/>
<fileset erroronmissingdir="false"
dir="libs" includes="**/*.jar"/>
</path>
</sequential>
</macrodef>
<macrodef name="set-javac-tests-cp">
<attribute name="classpathref"/>
<sequential>
<set-javac-cp classpathref="@{classpathref}"/>
<path id="javac-tests-cp">
<path refid="javac-cp"/>
<pathelement location="build/test-classes"/>
<pathelement location="${junit.jar}"/>
<fileset erroronmissingdir="false"
dir="tests/libs" includes="**/*.jar"/>
</path>
</sequential>
</macrodef>
<macrodef name="do-javac-helper">
<attribute name="srcdir" />
<attribute name="classpathref"/>
<attribute name="dstdir"/>
<sequential>
<!-- set in main build.xml to preempty this setting -->
<property name="project.java.version" value="1.7"/>
<mkdir dir="@{dstdir}"/>
<javac srcdir="@{srcdir}"
classpathref="@{classpathref}"
destdir="@{dstdir}"
listfiles="no"
fork="true"
debug="true"
includeantruntime="false"
deprecation="true"
>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg line="-Xmaxerrs 10"/>
<patternset includes="**/*.java"
excludes="**/package-info.java"/>
</javac>
</sequential>
</macrodef>
</project>