-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
93 lines (80 loc) · 3.16 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="war" name="dashboard">
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="tomcat.home" value="${env.CATALINA_HOME}"/>
<property name="deploy.home" value="${tomcat.home}/webapps/${app.name}"/>
<property name="deploy.classes" value="${deploy.home}/WEB-INF/classes"/>
<property name="deploy.lib" value="${deploy.home}/WEB-INF/lib"/>
<path id="compile.classpath">
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${tomcat.home}/lib/servlet-api.jar"/>
</path>
<target name="init">
<mkdir dir="build/classes" />
<mkdir dir="dist" />
</target>
<target name="compile" depends="init">
<javac destdir="build/classes" debug="true" srcdir="src">
<classpath refid="compile.classpath" />
</javac>
</target>
<target name="clean">
<delete dir="dist" />
<delete dir="build" />
</target>
<target depends="clean" name="cleanall" />
<target depends="build-subprojects,build-project" name="build" />
<target name="build-subprojects" />
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="build/classes" includeantruntime="false" source="${source}" target="${target}">
<src path="src" />
<classpath refid="dashboard.classpath" />
</javac>
</target>
<target name="war" depends="compile">
<war destfile="dist/dashboard.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent" />
<lib dir="WebContent/WEB-INF/lib" />
<classes dir="build/classes" />
</war>
</target>
<target name="web_deploy" depends="compile" description="deploy code to dashboard.war">
<!-- Make the root. -->
<mkdir dir="${deploy.home}"/>
<!-- Delete the old code -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${deploy.home}"/>
<fileset dir="${tomcat.home}/work/Catalina/localhost/${app.name}"/>
</delete>
<!-- Copy all the *.jsp, *.xsl, *.html, pixmaps, etc. -->
<copy todir="${deploy.home}">
<fileset dir="web/jsp"/>
</copy>
<copy todir="${deploy.home}">
<fileset file="web/simple.css"/>
</copy>
<copy todir="${deploy.home}/pixmaps">
<fileset dir="web/pixmaps"/>
</copy>
<copy todir="${deploy.home}/lib">
<fileset file="${basedir}/lib/*.jar" />
</copy>
<!-- Create WEB-INF/classes/ and copy all the loose classes to it. -->
<mkdir dir="${deploy.classes}"/>
<copy todir="${deploy.classes}">
<fileset dir="${build.classes}"/>
</copy>
<!-- Create WEB-INF/lib/ and copy over the needed jar files. -->
<mkdir dir="${deploy.lib}"/>
<copy todir="${deploy.lib}">
<fileset dir="${basedir}/lib" />
</copy>
</target>
</project>