-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
70 lines (59 loc) · 2.28 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
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="FtlDoc" default="jar" basedir=".">
<property name="lib.dir" value="lib" />
<property name="build.classes.dir" value="build/classes"/>
<property name="build.dir" value="build"/>
<property name="src.dir" value="src" />
<property name="lib.freemarker" value="${lib.dir}/freemarker.jar" />
<property name="lib.jcmdline" value="${lib.dir}/jcmdline-1.0.1.jar" />
<path id="compile.classpath">
<pathelement path="${lib.freemarker}"/>
<pathelement path="${lib.jcmdline}"/>
<pathelement path="${java.class.path}"/>
</path>
<target name="init">
<available property="freemarker-src" file="../../freemarker/build.xml"/>
</target>
<target depends="compile" name="jar" description="Create the ftldoc.jar">
<jar basedir="${build.classes.dir}" jarfile="${lib.dir}/ftldoc.jar" />
</target>
<target depends="init" name="compile"
description="Compile Java source files">
<mkdir dir="${build.dir}"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<javac deprecation="off" destdir="${build.classes.dir}" debug="on" optimize="off">
<src path="${src.dir}"/>
<classpath refid="compile.classpath"/>
</javac>
<copy toDir="${build.classes.dir}">
<fileset dir="${src.dir}" includes="**/*.ftl"/>
</copy>
</target>
<!--
<target name="update-jar" depends="init" if="freemarker-src">
<ant dir="../../freemarker" target="jar"/>
<copy file="../../freemarker/lib/freemarker.jar" toDir="lib"/>
</target>
-->
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="assemble" depends="jar">
<copydir dest="build/lib" src="lib">
<include name="*.jar" />
</copydir>
<copydir dest="build" src=".">
<include name="ftldoc.sh" />
<include name="ftldoc.bat" />
</copydir>
</target>
<target name="zip" depends="assemble">
<zip destfile="build/ftldoc.zip">
<zipfileset dir="build">
<include name="**/*.jar" />
<include name="ftldoc.*" />
</zipfileset>
</zip>
</target>
</project>