-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
62 lines (55 loc) · 2.05 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
<project name="opal" basedir="." default="jar">
<property name="src.dir" value="src/main/java" />
<property name="rsc.dir" value="src/main/resources/resources" />
<property name="images.dir" value="src/main/resources/images" />
<property name="version" value="1.0.1" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="exportsrc.dir" value="${build.dir}/sources" />
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" source="1.6" target="1.6"/>
</target>
<target name="jar" depends="clean,compile">
<mkdir dir="${jar.dir}" />
<mkdir dir="${classes.dir}/images" />
<copy todir="${classes.dir}/images">
<fileset dir="${images.dir}" />
</copy>
<mkdir dir="${classes.dir}/resources" />
<copy todir="${classes.dir}/resources">
<fileset dir="${rsc.dir}" />
</copy>
<jar destfile="${jar.dir}/${ant.project.name}-${version}.jar" basedir="${classes.dir}">
</jar>
<!-- Plugin -->
<copy todir="${classes.dir}/META-INF">
<fileset dir="META-INF" />
</copy>
<copy todir="${classes.dir}">
<fileset dir=".">
<include name="build.properties"/>
</fileset>
</copy>
<jar destfile="${jar.dir}/${ant.project.name}-${version}-plugin.jar" basedir="${classes.dir}" filesetmanifest="merge">
</jar>
<mkdir dir="${exportsrc.dir}"/>
<copy todir="${exportsrc.dir}">
<fileset dir=".">
<include name=".classpath"/>
<include name=".hgignore"/>
<include name=".project"/>
<include name="build.xml"/>
<include name="pom.xml"/>
</fileset>
</copy>
<mkdir dir="${exportsrc.dir}/src"/>
<copydir dest="${exportsrc.dir}/src" src="src"/>
<zip destfile="${jar.dir}/${ant.project.name}-${version}-src.zip" basedir="${exportsrc.dir}"></zip>
</target>
<target name="clean-build" depends="clean,jar" />
</project>