-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
91 lines (79 loc) · 2.78 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
<project name="freemarker3" default="jar" basedir=".">
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<target name="init">
<uptodate property="parser.uptodate" targetfile="src/freemarker3/core/parser/FMParser.java">
<srcfiles dir="src/parser" includes="*.ccc"/>
</uptodate>
<path id="class.path">
<fileset dir="libs">
<include name="*.jar" />
<exclude name="minimal-ant-classes.jar"/>
</fileset>
</path>
</target>
<target name="parser-gen" depends="init" unless="parser.uptodate">
<java jar="bootstrap/congocc.jar" fork="true" failonerror="true">
<assertions><enable/></assertions>
<arg value="src/parser/FM.ccc"/>
</java>
</target>
<target name="compile" depends="parser-gen">
<mkdir dir="build"/>
<javac srcdir="src"
destdir="build"
deprecation="off"
debug="on"
optimize="off"
failonerror="true"
fork="true"
release="8"
includeantruntime="false"
>
<classpath refid="class.path"/>
</javac>
</target>
<target name="jar" depends="compile">
<jar jarfile="freemarker3.jar" basedir="build" compress="true" excludes="freemarker3/testcase/**">
<manifest>
<attribute name="Main-Class" value="freemarker3.core.CommandLine"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Build-Date" value="${timestamp}"/>
</manifest>
</jar>
</target>
<target name="clean">
<delete file="src/freemarker3/core/parser/FMParser.java"/>
<delete file="src/freemarker3/core/parser/FMLexer.java"/>
<delete file="src/freemarker3/core/parser/TokenSource.java"/>
<delete file="src/freemarker3/core/parser/InvalidToken.java"/>
<delete file="src/freemarker3/core/parser/Token.java"/>
<delete file="src/freemarker3/core/parser/Node.java"/>
<delete file="src/freemarker3/core/parser/NonTerminalCall.java"/>
<delete file="src/freemarker3/core/parser/ParseException.java"/>
<delete dir="build"/>
<delete dir="src/freemarker3/core/nodes/generated"/>
<delete file="freemarker3.jar"/>
<delete>
<fileset dir="src/freemarker3/testcase/reference" includes="*.out"/>
</delete>
</target>
<target name="test" depends="jar">
<junit fork="true">
<classpath>
<pathelement location="libs/junit4.jar"/>
<pathelement location="freemarker3.jar"/>
<dirset dir="src"/>
<dirset dir="build"/>
</classpath>
<formatter type="plain" />
<formatter type="xml" />
<test
name="freemarker3.testcase.TemplateTestSuite"
todir="build"
/>
<assertions><enable/></assertions>
</junit>
</target>
</project>