-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
53 lines (44 loc) · 1.34 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
<project name="notube" default="dist" basedir=".">
<property file="build.properties"/>
<target name="clean">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
</target>
<fileset id="libs" dir="${lib.dir}" includes="*.jar"/>
<path id="classpath">
<fileset refid="libs"/>
</path>
<target name="compile" depends="clean">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
classpathref="classpath"
source="1.6"
target="1.6"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="${dist.dir}"/>
<property name="jar.file" value="${dist.dir}/${ant.project.name}.jar"/>
<jar destfile="${jar.file}">
<fileset dir="${classes.dir}"/>
<fileset dir="${resource.dir}"/>
<zipgroupfileset refid="libs"/>
<manifest>
<attribute name="Built-By" value="Anonymous"/>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="dist" depends="jar">
<zip destfile="${dist.file}">
<fileset dir="${scripts.dir}" includes="*"/>
<fileset dir="${dist.dir}" includes="*.jar"/>
</zip>
</target>
<target name="deploy" depends="dist">
<delete dir="${work.dir}"/>
<mkdir dir="${work.dir}"/>
<unzip src="${dist.file}" dest="${work.dir}"/>
<chmod file="${work.dir}/${ant.project.name}.sh" perm="755"/>
</target>
</project>