-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
67 lines (65 loc) · 2.32 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="deploy" name="Create Runnable Jar for Project lysty2 with libraries in sub-folder">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<property name="work.dir" value="."/>
<property name="deploy.dir" value="../lysty_out"/>
<property file="build.properties"/>
<target name="cleanbin">
<delete dir="${work.dir}/bin"/>
</target>
<target name="cleandist">
<delete dir="${deploy.dir}"/>
</target>
<target name="make_classpath">
<path id="build-classpath">
<fileset dir="${work.dir}/lib">
<include name="*.jar"/>
</fileset>
</path>
</target>
<target name="compile" depends="make_classpath">
<mkdir dir="${work.dir}/bin"/>
<javac srcdir="${work.dir}/src" destdir="${work.dir}/bin" fork="yes" executable="${jdk.path}/bin/javac.exe">
<classpath refid="build-classpath" />
</javac>
</target>
<target name="create_run_jar" depends="make_classpath">
<manifestclasspath property="lib.list" jarfile="${work.dir}/lysty.jar">
<classpath refid="build-classpath"/>
</manifestclasspath>
<jar destfile="${deploy.dir}/lysty.jar">
<manifest>
<attribute name="Main-Class" value="org.lysty.core.Main"/>
<attribute name="Class-Path" value="${lib.list}"/>
</manifest>
<fileset dir="${work.dir}/bin"/>
</jar>
<delete dir="${deploy.dir}/lib"/>
<mkdir dir="${deploy.dir}/lib"/>
<copy todir="${deploy.dir}/lib">
<fileset dir="${work.dir}/lib/"/>
</copy>
</target>
<target name="deploy" depends="create_run_jar">
<copy todir="${deploy.dir}/plugins">
<fileset dir="${work.dir}/plugins"/>
</copy>
<copy todir="${deploy.dir}/config">
<fileset dir="${work.dir}/config"/>
</copy>
<copy todir="${deploy.dir}/resources">
<fileset dir="${work.dir}/resources"/>
</copy>
<copy todir="${deploy.dir}/sqls">
<fileset dir="${work.dir}/sqls"/>
</copy>
<copy file="${work.dir}/run.bat" tofile="${deploy.dir}/run.bat"/>
<copy file="${work.dir}/settings.properties" tofile="${deploy.dir}/settings.properties"/>
</target>
<target name="windeploy" depends="deploy">
<copy todir="${deploy.dir}/win">
<fileset dir="${work.dir}/win"/>
</copy>
</target>
</project>