This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
executable file
·67 lines (67 loc) · 2.95 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="cheddar-getter-client" default="package" basedir=".">
<description>
This build file builds and packages the Cheddar Getter Client Library into a jar file.
</description>
<property file="${user.home}/${ant.project.name}.build.properties"/>
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>
<tstamp>
<format property="timestamp.isoformat" pattern="yyyy-MM-dd'T'HH:mm:ss"/>
</tstamp>
<target name="revision" unless="git.revision">
<exec executable="git" outputproperty="git.revision">
<arg value="rev-parse" />
<arg value="--short=5" />
<arg value="HEAD" />
</exec>
<exec executable="git" outputproperty="git.branch">
<arg value="name-rev" />
<arg value="--name-only" />
<arg value="--always" />
<arg value="${git.revision}" />
</exec>
<echo message="At revision ${git.revision} on branch ${git.branch}." />
</target>
<target name="package" depends="compile,revision">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" index="true">
<fileset dir="${classes.dir}/${ant.project.name}" id="jar.files">
<include name="**/*.class"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Built-On" value="${timestamp.isoformat}"/>
<attribute name="Git-Branch" value="${git.branch}" />
<attribute name="Git-Revision" value="${git.revision}"/>
</manifest>
</jar>
</target>
<target name="clean-package" depends="clean,package"/>
<target name="compile" depends="init">
<echo message="Compiling Source files from ${basedir}/${src.dir}"/>
<javac srcdir="${src.dir}/" includes="**/*.java" excludes="" destdir="${classes.dir}/${ant.project.name}" fork="true" deprecation="false" debug="true" memoryMaximumSize="512m" nowarn="true" target="${java.target.vm}">
<!--<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${jar.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>-->
</javac>
</target>
<target name="init" depends="">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}/${ant.project.name}"/>
</target>
<target name="clean" depends="">
<delete failonerror="false" dir="${build.dir}"/>
</target>
<target name="deploy" depends="package">
<copy file="${jar.dir}/${ant.project.name}.jar" todir="${export.dir}"/>
</target>
<target name="dumpProperties" description="output all set properties, a useful sanity check">
<echoproperties/>
</target>
</project>