-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (54 loc) · 1.96 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
<project name="jurl" default="jurl" basedir=".">
<description>
url inspection utility
</description>
<property name="src" location="src"/>
<property name="build" location="target/classes"/>
<property name="main-class" value="com.ahtik.jurl.Jurl"/>
<property name="app-name" value="${ant.project.name}"/>
<property name="includeAntRuntime" value="false"/>
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<mkdir dir="${build}"/>
<javac srcdir="${src}" destdir="${build}" classpathref="classpath" source="1.6" target="1.6" fork="yes" includeantruntime="false"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="target"/>
<jar destfile="target/${app-name}.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="jurl" depends="jar" description="run ${app-name}" >
<java fork="true" classname="${main-class}" taskname="jurl" output="jurl.out" resultproperty="jurl.res.tmp">
<arg value="${jurl}"/>
<classpath>
<path refid="classpath"/>
<path location="target/${ant.project.name}.jar"/>
</classpath>
</java>
<condition property="jurl.result">
<equals arg1="${jurl.res.tmp}" arg2="0" />
</condition>
<antcall target="report-success" />
<antcall target="report-failure" />
</target>
<target name="report-success" if="jurl.result">
<echo>Inspection report written to file "jurl.out"!</echo>
</target>
<target name="report-failure" unless="jurl.result" >
<echo>Failed to inspect url! See "jurl.out" for reasons!</echo>
</target>
<target name="clean"
description="clean up" >
<delete dir="target"/>
</target>
</project>