-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.xml
More file actions
44 lines (39 loc) · 1.45 KB
/
build.xml
File metadata and controls
44 lines (39 loc) · 1.45 KB
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
<project name="example-java-ant" default="build">
<property file="build.properties"/>
<!-- paths used for compilation and run -->
<path id="lib.path.id">
<fileset dir="${jars.dir}" />
</path>
<path id="run.path.id">
<path refid="lib.path.id" />
<path location="${build.dir}" />
</path>
<!-- =================================
target: build
================================= -->
<target name="build" description="Compiles the project">
<mkdir dir="${build.dir}" />
<mkdir dir="${jars.dir}" />
<copy todir="${jars.dir}">
<fileset dir="${lib.src.dir}"/>
</copy>
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
</target>
<!-- =================================
target: run
================================= -->
<target name="run" depends="build" description="Runs the project">
<java classpathref="run.path.id" classname="com.srcclr.Main">
<arg value="FirstAndOnlyArg"/>
</java>
</target>
<!-- =================================
target: clean
================================= -->
<target name="clean" description="Cleans the project">
<delete includeemptydirs="true">
<fileset dir="${build.dir}"></fileset>
<fileset dir="${jars.dir}"></fileset>
</delete>
</target>
</project>