forked from clotildeguinard/MyCloudDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
80 lines (65 loc) · 2.46 KB
/
build.xml
File metadata and controls
80 lines (65 loc) · 2.46 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
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
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build-jar" name="Echo Client">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<property name="build.dir" value="bin"/>
<property name="src.dir" value="src"/>
<property name="lib.dir" value="libs"/>
<property name="jar.file" value="echoClient.jar"/>
<property name="manifest.file" value="MANIFEST.MF"/>
<!-- The main class of your application should be named according to the
following -->
<property name="main.class" value="ui.Application"/>
<path id="external.jars">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<path id="project.classpath">
<pathelement location="${src.dir}"/>
<path refid="external.jars" />
</path>
<target name="init">
<mkdir dir="${build.dir}"/>
<copy includeemptydirs="false" todir="${build.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete file="${jar.file}" />
<delete file="${manifest.file}" />
</target>
<target name="cleanall" depends="clean"/>
<target name="build" depends="init">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin"
source="${source}" target="${target}"
classpathref="project.classpath" includeantruntime="false">
<src path="${src.dir}"/>
</javac>
</target>
<target name="build-jar" depends="build">
<delete file="${jar.file}" />
<delete file="${manifest.file}" />
<manifest file="${manifest.file}" >
<attribute name="built-by" value="${user.name}" />
<attribute name="Main-Class" value="${main.class}" />
<attribute name="Class-Path" value="libs/log4j-1.2.17.jar"/>
</manifest>
<jar destfile="${jar.file}" basedir="${build.dir}" manifest="${manifest.file}">
<fileset dir="${build.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
<path id="class.path">
<pathelement location="${build.dir}"/>
<path refid="external.jars" />
</path>
<target name="run" >
<java classname="${main.class}" classpathref="class.path"/>
</target>
</project>