-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (64 loc) · 2.46 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
<project name="pubby" default="classes" basedir=".">
<property name="version" value="0.3.3"/>
<property name="src" value="${basedir}/src"/>
<property name="webroot" value="${basedir}"/>
<property name="webinf" value="${webroot}/WEB-INF"/>
<property name="webinf.lib" value="${webinf}/lib"/>
<property name="webinf.classes" value="${webinf}/classes"/>
<property name="distname" value="${ant.project.name}-${version}"/>
<property name="zip" value="${basedir}/${distname}.zip"/>
<property name="war" value="${basedir}/${ant.project.name}.war" />
<property name="jetty.lib" value="${basedir}/jetty"/>
<property name="javac.debug" value="true" />
<property name="javac.optimize" value="true" />
<property name="javac.deprecation" value="true" />
<property name="javac.target" value="1.6" />
<property name="javac.source" value="1.6" />
<target name="classpath">
<mkdir dir="${webinf.lib}"/>
<path id="classpath">
<fileset dir="${webinf.lib}">
<include name="*.jar"/>
</fileset>
<pathelement location="${jetty.lib}/javax.servlet.jar"/>
</path>
<property name="expanded.classpath" refid="classpath"/>
</target>
<target name="clean" description="Remove generated files">
<delete file="${war}" quiet="false"/>
<delete file="${zip}" quiet="false"/>
<delete quiet="false" includeemptydirs="true">
<fileset dir="${webinf.classes}"/>
</delete>
</target>
<target name="classes" depends="classpath" description="Compile classes">
<mkdir dir="${webinf.classes}"/>
<javac srcdir="${src}"
destdir="${webinf.classes}"
debug="${javac.debug}"
optimize="${javac.optimize}"
deprecation="${javac.deprecation}"
source="${javac.target}"
target="${javac.target}"
includeantruntime="false"
>
<classpath>
<path refid="classpath"/>
</classpath>
<include name="**/*.java"/>
</javac>
</target>
<target name="war" depends="classes" description="build WAR">
<war destfile="${war}"
webxml="${webinf}/web.xml"
basedir="${webroot}">
<exclude name="WEB-INF/web.xml"/>
<exclude name="**/CVS/**"/>
</war>
</target>
<target name="zip" depends="classes">
<zip destfile="${zip}">
<zipfileset prefix="${distname}" dir="." excludes=".git/** .gitignore"/>
</zip>
</target>
</project>