forked from kgb1001001/RedbookLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
52 lines (49 loc) · 1.73 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="Redbook Library">
<property environment="env"/>
<property name="srcDir" value="."/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<condition property="ARCHIVE_DIR" value="${env.ARCHIVE_DIR}" else="./output/">
<isset property="env.ARCHIVE_DIR" />
</condition>
<property name="warname" value= "RedbookLibrary.war"/>
<path id="classpathDir">
<pathelement location="bin"/>
<pathelement location="WebContent/WEB-INF/lib/derby.jar"/>
<pathelement location="dep-jar/com.ibm.ws.javaee.servlet.3.1_1.0.9.jar"/>
<pathelement location="WebContent/WEB-INF/lib/cf-java-app-tracker-client-0.1.0.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
</target>
<target name="clean">
<delete dir="bin"/>
<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="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">
<include name="resources"/>
</webinf>
<fileset dir="WebContent">
<include name="**/*"/>
</fileset>
<classes dir="bin"/>
</war>
</target>
</project>