forked from chriskchew/restexpress-storm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
79 lines (69 loc) · 2.57 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build-all" name="restexpress-storm">
<property environment="env"/>
<property file="build.properties"/>
<property name="dir.src" value="${basedir}/src"/>
<property name="dir.src.java" value="${dir.src}/java"/>
<property name="dir.build" value="${basedir}/build"/>
<property name="dir.compile" value="${dir.build}/classes/main"/>
<property name="dir.lib" value="${basedir}/lib"/>
<property name="dir.dist" value="${basedir}/dist"/>
<path id="compile.classpath">
<pathelement location="${dir.compile}"/>
<fileset dir="${dir.lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="runtime.classpath">
<pathelement location="${dir.compile}"/>
<fileset dir="${dir.lib}">
<include name="**/*.jar"/>
<exclude name="**/sources/*"/>
</fileset>
</path>
<target name="_init">
<mkdir dir="${dir.compile}"/>
<mkdir dir="${dir.dist}"/>
</target>
<target name="clean">
<delete dir="${dir.build}"/>
<delete dir="${dir.dist}"/>
<delete dir="bin"/>
</target>
<!-- ======================================================================
target: compile
====================================================================== -->
<target name="compile" depends="_init">
<javac destdir="${dir.compile}"
failonerror="yes"
fork="yes"
source="${javac.source}"
debug="${javac.debug}">
<classpath>
<path refid="compile.classpath"/>
</classpath>
<src>
<pathelement location="${dir.src.java}"/>
</src>
</javac>
</target>
<!-- ======================================================================
target: build
====================================================================== -->
<target name="build" depends="compile"/>
<!-- ======================================================================
target: build-all
====================================================================== -->
<target name="build-all" depends="clean, compile"/>
<!-- ======================================================================
target: release
====================================================================== -->
<target name="release" depends="_init, compile" description="Release a distro">
<jar destfile="${dir.dist}/${ant.project.name}-${version}.jar">
<fileset dir="${dir.compile}"/>
</jar>
<jar destfile="${dir.dist}/${ant.project.name}-${version}-src.jar">
<fileset dir="${dir.src.java}"/>
</jar>
</target>
</project>