-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
51 lines (48 loc) · 1.78 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="Java Cloudant Web Starter">
<property environment="env"/>
<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=".">
<isset property="env.ARCHIVE_DIR" />
</condition>
<property name="warname" value="JavaCloudantApp.war"/>
<path id="classpathDir">
<pathelement location="bin"/>
<pathelement location="WebContent/WEB-INF/lib/cloudant-client-2.0.0.jar"/>
<pathelement location="WebContent/WEB-INF/lib/gson-2.2.4.jar"/>
<fileset dir="dep-jar">
<include name="*.jar"/>
</fileset>
</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">
<classes dir="bin"/>
<fileset dir="WebContent">
<include name="**/*"/>
<exclude name="**/*.class"/>
</fileset>
</war>
</target>
</project>