-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
107 lines (98 loc) · 3.32 KB
/
build.xml
File metadata and controls
107 lines (98 loc) · 3.32 KB
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
97
98
99
100
101
102
103
104
105
106
107
<?xml version="1.0" encoding="UTF-8"?>
<project name="datawiki" basedir="." default="war">
<property environment="env"/>
<fail message="Error: must set environment variable GAE_HOME" unless="env.GAE_HOME"/>
<property name="appengine.sdk" value="${env.GAE_HOME}"/>
<property name="appname" value="datawiki"/>
<property name="classes" value="build/classes"/>
<property name="srcDir" value="${basedir}/java"/>
<import file="${appengine.sdk}/config/user/ant-macros.xml" />
<target name="init">
<mkdir dir="build"/>
<mkdir dir="${classes}"/>
<mkdir dir="build/lib"/>
<copy toDir="build/lib" failonerror="true" flatten="true">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="war/WEB-INF/appengine-generated"/>
<delete dir="war/WEB-INF/lib"/>
<delete dir="build"/>
<delete verbose="true">
<fileset dir="java" includes="**/*.class" />
<fileset dir="test" includes="**/*.class" />
<fileset dir="." defaultexcludes="no" includes="**/*~" />
</delete>
</target>
<path id="classpath">
<fileset dir="build/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${appengine.sdk}/lib">
<include name="impl/*.jar"/>
<include name="shared/**/*.jar"/>
<include name="user/**/*.jar"/>
<include name="testing/appengine-testing.jar"/>
</fileset>
</path>
<target name="classpath" depends="init">
<property name="cp" refid="classpath"/>
<echo message="export CLASSPATH=${cp}:${basedir}/java"></echo>
</target>
<target name="compile" depends="init">
<javac debug="on" fork="true" destdir="${classes}" includeantruntime="false">
<compilerarg value="-Xlint"/>
<classpath refid="classpath"/>
<src path="java"/>
<src path="test"/>
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="build/lib/${appname}.jar" basedir="${classes}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="Google"/>
<attribute name="Implementation-Title" value="{$appname}"/>
<attribute name="Implementation-Version" value="0.1"/>
</manifest>
</jar>
</target>
<target name="test" depends="jar">
<junit fork="true" showoutput="true" haltonfailure="true">
<classpath>
<path>
<path refid="classpath"/>
<pathelement location="${classes}"/>
</path>
</classpath>
<formatter type="brief" usefile="false"/>
<test name="AllTests"/>
</junit>
</target>
<target name="war" depends="jar">
<mkdir dir="war/WEB-INF/appengine-generated"/>
<mkdir dir="war/WEB-INF/lib"/>
<copy toDir="war/WEB-INF/lib" failonerror="true">
<fileset dir="build/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="build">
<include name="${ant.project.name}.jar"/>
</fileset>
<fileset dir="${appengine.sdk}/lib/user">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="server" depends="war"
description="Starts the development server.">
<dev_appserver war="war" address="0.0.0.0">
<options>
<arg value="--disable_update_check"/>
</options>
</dev_appserver>
</target>
</project>