forked from olistudent/FBEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (63 loc) · 2.09 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
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8" ?>
<project name="My Project" default="run" basedir=".">
<description>My description.</description>
<property file="build.properties" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<!-- Initialization -->
<target name="init" description="Prepare needed directories.">
<mkdir dir="${build.dir}" />
<mkdir dir="${classes.dir}" />
<mkdir dir="${jar.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${lib.dir}" />
</target>
<!-- Cleanup -->
<target name="clean" description="Remove all files created by the build/test process.">
<delete dir="${classes.dir}" />
<delete dir="${dist.dir}" />
</target>
<!-- Compile application -->
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
debug="yes"
source="1.7"
target="1.7"
includeantruntime="false">
<classpath refid="classpath" />
</javac>
</target>
<!-- Java Archive -->
<target name="jar" depends="compile">
<!--<delete file="${jar.dir}/${app.name}-${app.version}.jar"/>-->
<delete dir="${jar.dir}"/>
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${app.name}-${app.version}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Class-Path" value="${lib.dir}"/>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
<fileset dir="${classes.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
<fileset dir="${src.dir}" includes="icon.gif"/>
<fileset dir="${lang.dir}" includes="*.properties"/>
</jar>
</target>
<!-- Run application -->
<target name="run" depends="jar">
<java jar="${jar.dir}/${app.name}-${app.version}.jar"
fork="true">
</java>
<!--
<java fork="true" classname="${main.class}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${app.name}-${app.version}.jar"/>
</classpath>
</java>
-->
</target>
</project>