forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
96 lines (85 loc) · 3.99 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
94
95
96
<project name="aws-sdk-for-java-on-gae" default="build" basedir=".">
<property name="third-party.root" location="${basedir}/third-party" />
<property name="src.main.dir" location="${basedir}/src/main/java" />
<property name="src.test.dir" location="${basedir}/src/test/java" />
<property name="resources.dir" location="${basedir}/src/main/resources" />
<property name="build.classes.dir" location="${basedir}/build/classes" />
<property name="build.test-classes.dir" location="${basedir}/build/test-classes" />
<property name="build.test-reports.dir" location="${basedir}/build/test-reports" />
<property name="app.name" value="gae-aws-sdk" />
<!-- Read version number -->
<property file="${resources.dir}/com/amazonaws/sdk/versionInfo.properties" />
<path id="third-party.main.path">
<pathelement location="${third-party.root}/appengine-1.3.8/appengine-api-1.0-sdk-1.3.8.jar" />
<pathelement location="${third-party.root}/commons-codec-1.3/commons-codec-1.3.jar" />
<pathelement location="${third-party.root}/commons-httpclient-3.0.1/commons-httpclient-3.0.1.jar" />
<pathelement location="${third-party.root}/commons-logging-1.1.1/commons-logging-1.1.1.jar" />
<pathelement location="${third-party.root}/jackson-1.4/jackson-core-asl-1.4.3.jar" />
<pathelement location="${third-party.root}/stax-api-1.0.1/stax-api-1.0.1.jar" />
<pathelement location="${third-party.root}/stax-ri-1.2.0/stax-1.2.0.jar" />
</path>
<path id="third-party.test.path">
<path refid="third-party.main.path" />
<pathelement location="${third-party.root}/junit-4.0/junit-4.0.jar" />
</path>
<target name="compile">
<mkdir dir="${build.classes.dir}" />
<javac srcdir="${src.main.dir}"
destdir="${build.classes.dir}"
debug="on"
includeantruntime="false"
classpathref="third-party.main.path"
/>
<mkdir dir="${build.test-classes.dir}" />
<javac srcdir="${src.test.dir}"
destdir="${build.test-classes.dir}"
debug="on"
includeantruntime="false">
<classpath>
<path refid="third-party.test.path" />
<pathelement location="${build.classes.dir}" />
</classpath>
</javac>
</target>
<target name="test" depends="compile">
<taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
<pathelement location="${third-party.root}/junit-4.0/junit-4.0.jar" />
<pathelement location="${third-party.root}/ant-junit-1.8.1/ant-junit.jar" />
</classpath>
</taskdef>
<mkdir dir="${build.test-reports.dir}" />
<fileset id="src.test.files" dir="${src.test.dir}">
<include name="**/*Test.java"/>
</fileset>
<junit forkMode="perBatch"
printsummary="yes"
haltonerror="true"
haltonfailure="true"
dir="${basedir}">
<formatter type="xml"/>
<batchtest fork="yes" todir="${build.test-reports.dir}">
<fileset refid="src.test.files"/>
</batchtest>
<classpath>
<path refid="third-party.test.path" />
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.test-classes.dir}" />
</classpath>
</junit>
</target>
<target name="jar" depends="test">
<copy todir="${build.classes.dir}">
<fileset dir="${resources.dir}" />
</copy>
<delete file="${build.classes.dir}/${app.name}-${version}.jar" />
<jar jarfile="${build.classes.dir}/${app.name}-${version}.jar">
<fileset dir="${build.classes.dir}" />
</jar>
</target>
<target name="build" depends="jar" />
<target name="clean">
<delete dir="${build.classes.dir}" />
</target>
</project>