-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
67 lines (53 loc) · 1.98 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="rd4j" default="jar" basedir=".">
<property name="dir.src" value="src" />
<property name="dir.src.java" value="src/java"/>
<property name="dir.lib" value="lib" />
<property name="dir.build" value="build" />
<property name="dir.build.classes" value="build/classes" />
<property name="dir.build.artifacts" value="build/artifacts" />
<property name="build.jar" value="${dir.build.artifacts}/${ant.project.name}.jar" />
<property name="dir.src.resources" value="src/resource" />
<target name="define-build-classpath">
<path id="build.classpath">
<fileset dir="${dir.lib}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${dir.src.resources}" />
</path>
<property name="build.classpath" refid="build.classpath" />
</target>
<target name="clean">
<delete dir="${dir.build}" />
</target>
<target name="compile" depends="define-build-classpath" description="Compiles the java files.">
<mkdir dir="${dir.build.classes}" />
<javac source="1.5" deprecation="on" optimize="off" debug="on"
destdir="${dir.build.classes}">
<classpath refid="build.classpath"/>
<src path="${dir.src}/java" />
<src path="sample_src/java" />
<src path="test_src/java" />
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${dir.build.artifacts}" />
<jar destfile="${build.jar}">
<fileset dir="${dir.build.classes}">
</fileset>
<fileset dir="${dir.src.resources}">
</fileset>
</jar>
</target>
<target name="demo" depends="jar">
<echo message="Starting jetty server with trivial blog sample application. Ctrl-C to kill. Point browser to http://localhost:8080/context to see pages"/>
<path id="sample.app.classpath">
<fileset dir="${dir.lib}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${build.jar}"/>
</path>
<java fork="true" classname="com.github.rd4j.sample.Launcher" classpathref="sample.app.classpath">
</java>
</target>
</project>