-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
44 lines (38 loc) · 1.43 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
<?xml version="1.0" ?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="Jersey Sample App" default="war">
<property name="target" location="target" />
<property name="classes" location="${target}/classes" />
<property name="lib" location="${target}/lib" />
<property name="sources" location="src" />
<property name="java-sources" location="${sources}/main/java" />
<property name="webapp-sources" location="${sources}/main/webapp" />
<property name="web.xml-file" location="${webapp-sources}/WEB-INF/web.xml" />
<property name="war-file" location="${target}/SampleApp.war" />
<path id="compile-classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${target}" />
</target>
<target name="resolve">
<ivy:retrieve type="jar" pattern="${lib}/[artifact]-[revision].[ext]" log="quiet" />
</target>
<target name="compile" depends="init, resolve">
<mkdir dir="${classes}" />
<javac destdir="${classes}" debug="true" srcdir="${java-sources}" includeantruntime="false">
<classpath refid="compile-classpath" />
</javac>
</target>
<target name="war" depends="compile">
<war destfile="${war-file}" webxml="${web.xml-file}">
<fileset dir="${webapp-sources}" />
<lib dir="${lib}" />
<classes dir="${classes}" />
</war>
</target>
<target name="clean">
<delete dir="${target}" />
</target>
</project>