-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
57 lines (48 loc) · 1.98 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="RecordsNBAWiki" default="jar" basedir=".">
<property name="src-dir" location="src"/>
<property name="resources-dir" location="resources"/>
<property name="build-dir" location="build"/>
<property name="classes-dir" value="${build-dir}/classes"/>
<property name="dist-dir" location="dist"/>
<property name="lib-dir" value="libs"/>
<property name="jar-dir" value="${build-dir}/jar"/>
<property name="main-class" value="recordsnbawiki.packLogic.RecordsNBAWiki"/>
<path id="classpath">
<fileset dir="${lib-dir}" includes="**/*.jar"/>
</path>
<target name="clean" description="compile the source">
<delete dir="${build-dir}" />
<delete dir="${dist-dir}" />
</target>
<target name="cleanall" depends="clean"/>
<target name="init" depends="cleanall">
<mkdir dir="${build-dir}"/>
<mkdir dir="${classes-dir}"/>
<mkdir dir="${jar-dir}"/>
</target>
<target name="compile" depends="init" description="compile the source" >
<javac srcdir="${src-dir}" destdir="${classes-dir}"
classpathref="classpath" includeantruntime="false" encoding="UTF-8"/>
<copy todir="${classes-dir}">
<fileset dir="${resources-dir}"
includes="*/*" />
</copy>
</target>
<target name="jar" depends="compile" description="create jar" >
<jar destfile="${jar-dir}/${ant.project.name}.jar" basedir="${classes-dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<zipgroupfileset dir="${lib-dir}" includes="*.jar"/>
</jar>
</target>
<target name="run" depends="jar">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="classpath"/>
<path location="${jar-dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
</project>