-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
64 lines (50 loc) · 2.47 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
<?xml version="1.0"?>
<project name="app.server.base" default="release">
<property name="app.folder.name" value="app"/>
<property environment="env"/>
<property name="env.BUILD_NUMBER" value="UNSTABLE"/>
<property name="build.number" value=".${env.BUILD_NUMBER}"/>
<property name="app.version" value="1.0.0${build.number}"/>
<echo message="Building ${ant.project.name} version ${app.version}"/>
<property name="build.home" value="${basedir}/build"/>
<property name="app.home" value="${build.home}/${ant.project.name}"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="build.classes" value="${build.home}/${ant.project.name}.jar.build"/>
<property name="build.lib.dir" value="${app.home}/webapps/root/WEB-INF/lib"/>
<property name="build.jarfile" value="${build.lib.dir}/${ant.project.name}.jar"/>
<property name="dist.home" value="${basedir}/build/dist"/>
<property name="package.name" value="${ant.project.name}"/>
<property name="package.architecture" value="i386"/>
<property name="src.dir" value="${basedir}/src"/>
<!-- ant4j build tasks -->
<path id="buildtools.classpath">
<fileset dir="${basedir}/lib/build" includes="*.jar"/>
</path>
<!-- Compile classpath -->
<path id="compile.classpath">
<fileset dir="lib/runtime" includes="*.jar"/>
</path>
<property name="compile.classpath" refid="compile.classpath"/>
<!--========================= TARGETS ==================================-->
<target name="clean" description="Clean the build, deleting the ./build folder.">
<delete dir="${build.home}"/>
</target>
<target name="all" description="Build everything" depends="clean,main-jar"/>
<target name="release" description="Build everything"
depends="clean,main-jar"/>
<target name="main-jar" description="Build the main jar.">
<property name="build-folder" value="${build.home}/${ant.project.name}.jar.build"/>
<mkdir dir="${build-folder}"/>
<javac source="1.7"
target="1.7"
debug="true"
optimize="true"
srcdir="src/${app.folder.name}_jar/java"
destdir="${build-folder}"
includeantruntime="false">
<classpath refid="compile.classpath"/>
</javac>
<mkdir dir="${dist.home}"/>
<jar destfile="${dist.home}/${ant.project.name}-${app.version}.jar" basedir="${build-folder}"/>
</target>
</project>