-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
52 lines (42 loc) · 1.85 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This DOCTYPE tag shuts off the warning from Eclipse that there is no DTD
associated with this XML file. -->
<!DOCTYPE project>
<project name="classfinder" default="jar" basedir=".">
<property name="main.class" value="ClassFinder" />
<property name="version" value="1.1" />
<property name="lang.version" value="1.5" />
<property name="src.dir" value="src/main/java" />
<property name="resources.dir" value="src/main/resources" />
<property name="cls.dir" value="build/classes" />
<property name="jar.dir" value="build/libs" />
<target name="setup">
<mkdir dir="${cls.dir}"/>
<mkdir dir="${jar.dir}"/>
</target>
<target name="compile" depends="setup" description="Compiles the source">
<javac srcdir="${src.dir}" destdir="${cls.dir}" classpath="${cls.dir}"
debug="on" source="${lang.version}" target="${lang.version}"
includeAntRuntime="false" />
</target>
<target name="copy.resources" description="Copy resources">
<copy todir="${cls.dir}">
<fileset dir="${resources.dir}">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="jar" depends="compile,copy.resources"
description="Builds an executable jar file">
<jar destfile="${jar.dir}/${ant.project.name}-${version}.jar" basedir="${cls.dir}">
<manifest>
<attribute name="Implementation-Title" value="${ant.project.name}" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Main-Class" value="${main.class}" />
</manifest>
</jar>
</target>
<target name="clean">
<delete dir="build"/>
</target>
</project>