forked from anthonyu/Sizzle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
116 lines (104 loc) · 3.76 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
<?xml version="1.0" ?>
<project name="sizzle" default="package">
<property name="src.proto" location="src/proto" />
<path id="classpath">
<pathelement location="build/classes" />
<pathelement location="build/testclasses" />
<fileset dir="lib" includes="*.jar" />
</path>
<target name="init">
<mkdir dir="build/java/sizzle/parser" />
<mkdir dir="build/javacc" />
<mkdir dir="build/classes" />
<mkdir dir="build/testclasses" />
<mkdir dir="dist" />
</target>
<target name="translate-proto" depends="init">
<apply executable="protoc" parallel="true">
<arg value="--proto_path=${src.proto}" />
<arg value="--java_out=src/compiled-proto" />
<srcfile />
<fileset dir="${src.proto}" includes="*.proto" />
</apply>
</target>
<target name="tree" depends="init">
<java jar="lib/jtb132.jar" fork="true" dir="build/java/sizzle/parser">
<arg value="-o" />
<arg value="../../../javacc/sizzle.jj" />
<arg value="-p" />
<arg value="sizzle.parser" />
<arg value="../../../../src/jtb/sizzle.jtb" />
</java>
</target>
<target name="parser" depends="tree">
<javacc target="build/javacc/sizzle.jj" outputdirectory="build/java/sizzle/parser" javacchome="lib" static="true" />
</target>
<target name="compile-generated" depends="parser">
<javac includeantruntime="true" srcdir="build/java" destdir="build/classes" debug="on" debuglevel="lines,vars,source">
<classpath refid="classpath" />
</javac>
<javac includeantruntime="true" srcdir="src/compiled-proto" destdir="build/classes" debug="on" debuglevel="lines,vars,source">
<classpath refid="classpath" />
</javac>
</target>
<target name="compile" depends="compile-generated">
<javac includeantruntime="true" srcdir="src/java" destdir="build/classes" debug="on" debuglevel="lines,vars,source">
<classpath refid="classpath" />
</javac>
</target>
<target name="compile-tests" depends="compile">
<javac includeantruntime="true" srcdir="src/test" destdir="build/testclasses" debug="on" debuglevel="lines,vars,source">
<classpath refid="classpath" />
</javac>
</target>
<target name="test" depends="compile-tests">
<junit fork="yes" haltonfailure="yes">
<classpath refid="classpath" />
<batchtest>
<formatter type="plain" usefile="false" />
<fileset dir="build/testclasses" includes="**/Test*.class" />
</batchtest>
</junit>
<delete file="SecurityAuth.audit" />
</target>
<target name="doc" depends="init">
<javadoc destdir="build/classes" sourcepath="src/java" packagenames="sizzle.*">
<classpath refid="classpath" />
</javadoc>
</target>
<target name="package" depends="test,doc">
<jar destfile="dist/sizzle-runtime.jar">
<fileset dir="build/classes">
<patternset>
<include name="sizzle/" />
<exclude name="**/compiler/" />
<exclude name="**/types/" />
</patternset>
</fileset>
</jar>
<jar destfile="dist/sizzle-compiler.jar">
<manifest>
<attribute name="Main-Class" value="sizzle.compiler.SizzleCompiler" />
</manifest>
<fileset dir="build/classes">
<patternset>
<exclude name="**/io/" />
<exclude name="**/runtime/" />
</patternset>
</fileset>
<fileset dir="conf" />
<fileset dir="src/antlr" />
<zipfileset excludes="META-INF/" src="lib/commons-logging-1.1.1.jar" />
<zipfileset excludes="META-INF/" src="lib/hadoop-common-0.21.0.jar" />
<zipfileset excludes="META-INF/" src="lib/log4j-1.2.15.jar" />
<zipfileset excludes="META-INF/" src="lib/commons-cli-1.2.jar" />
<zipfileset excludes="META-INF/" src="lib/scannotation-1.0.2.jar" />
<zipfileset excludes="META-INF/" src="lib/javassist-3.8.0.GA.jar" />
<zipfileset excludes="META-INF/" src="lib/antlr-3.2.jar" />
</jar>
</target>
<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>
</project>