This repository has been archived by the owner on May 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
build.xml
executable file
·58 lines (55 loc) · 2.04 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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xml>
<project basedir="." default="build" name="WebApp">
<property environment="env" />
<property name="srcDir" value="." />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property name="ARCHIVE_DIR" value="output" />
<property name="LIB_DIR" value="./lib" />
<property name="WEB_INF_LIB_DIR" value="./WebContent/WEB-INF/lib" />
<property name="warname" value="webApp.war" />
<path id="classpathDir">
<pathelement location="build/bin" />
<fileset dir="${LIB_DIR}">
<include name="*.jar" />
</fileset>
<fileset dir="${WEB_INF_LIB_DIR}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="build" />
<mkdir dir="build/bin" />
</target>
<target name="clean">
<delete dir="build" />
<delete file="${ARCHIVE_DIR}/${warname}" />
</target>
<target name="build" depends="build-project,build-war" />
<target name="cleanall" depends="clean" />
<target name="build-project" depends="clean,init">
<copy todir="${ARCHIVE_DIR}">
<fileset file="manifest.yml" />
</copy>
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="build/bin" source="${source}" target="${target}" includeantruntime="false">
<src path="src" />
<classpath refid="classpathDir" />
</javac>
</target>
<target name="build-war" depends="build-project">
<war destfile="${ARCHIVE_DIR}/${warname}" webxml="WebContent/WEB-INF/web.xml">
<webinf dir="WebContent/WEB-INF" />
<zipfileset dir="src" prefix="WEB-INF/src" />
<fileset dir="WebContent">
<include name="**/*" />
</fileset>
<lib dir="WebContent/WEB-INF/lib" />
<classes dir="build/bin" />
<classes dir="src/com/ibm/cloudoe/samples" includes="mobydick.txt" prefix="WEB-INF/classes/com/ibm/cloudoe/samples"/>
<classes dir="src/com/ibm/cloudoe/samples/i18n" includes="*.properties*" prefix="WEB-INF/classes/com/ibm/cloudoe/samples/i18n"/>
</war>
</target>
</project>