-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.xml
59 lines (49 loc) · 2.19 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="JMXDiscovery" basedir="." default="install">
<property name="version" value="0.0.1"/>
<property name="debug" value="true"/>
<property name="dir.src" value="src"/>
<property name="dir.jar" value="dist"/>
<property name="dir.compile" value="tmp"/>
<property name="dir.lib" value="lib"/>
<property name="dir.install" value="install"/>
<path id="classpath">
<fileset dir="${dir.lib}" includes="**/*.jar"/>
</path>
<target name="init">
<mkdir dir="${dir.compile}"/>
<mkdir dir="${dir.jar}"/>
<mkdir dir="${dir.lib}"/>
</target>
<condition property="isdebug">
<equals arg1="${debug}" arg2="true"/>
</condition>
<target name="clean" description="Delete all generated files" unless="isdebug">
<echo message="Cleaning up temp files"/>
<delete dir="${dir.compile}" failonerror="false"/>
</target>
<target name="compile" description="Compile the java file" depends="init">
<mkdir dir="${dir.compile}"/>
<javac srcdir="${dir.src}" destdir="${dir.compile}" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="jar" description="Create the jar file" depends="compile">
<jar destfile="${dir.jar}/${ant.project.name}-${version}.jar" basedir="${dir.compile}">
<zipgroupfileset dir="${dir.lib}" includes="**/*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.riotgames.mondev.Main"/>
</manifest>
</jar>
<antcall target="clean"/>
</target>
<target name="install" description="Install jar and wrapper script" depends="jar">
<copy file="jmx_discovery.tpl" tofile="${dir.install}/jmx_discovery">
<!-- <filelist id="wrapper script" dir="." files="jmx_discovery.tpl" /> -->
<filterchain>
<tokenfilter>
<replacestring from="%jarfile%" to="${ant.project.name}-${version}.jar" />
</tokenfilter>
</filterchain>
</copy>
<copy file="${dir.jar}/${ant.project.name}-${version}.jar" todir="${dir.install}" />
</target>
</project>