-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.xml
54 lines (45 loc) · 1.64 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
<?xml version="1.0" ?>
<project name="Duck Website" default="war">
<property name="secret_dir" value="${basedir}/secret"/>
<property name="ext_secret_dir" value="../secrets"/>
<path id="compile.classpath">
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="libs">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="dist" />
<delete dir="build" />
</target>
<target name="copy-secrets" description="Copies secrets in" depends="clean">
<copyfile forceoverwrite="true" dest="${secret_dir}/AwsCredentials.properties" src="${ext_secret_dir}/aws/AwsCredentials.properties"/>
<copyfile forceoverwrite="true" dest="${secret_dir}/secrets.properties" src="${ext_secret_dir}/jetty/secrets.properties"/>
<copyfile forceoverwrite="true" dest="${secret_dir}/environment.properties" src="${ext_secret_dir}/jetty/environment.properties"/>
</target>
<target name="init" depends="copy-secrets">
<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="war" depends="compile">
<war destfile="dist/duckdns.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent">
<exclude name="**/lib/**"/>
</fileset>
<classes dir="build/classes"/>
</war>
</target>
<target name="war-complete" depends="compile">
<war destfile="dist/duckdns.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent"/>
<classes dir="build/classes"/>
</war>
</target>
</project>