-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
63 lines (52 loc) · 2.08 KB
/
build.xml
File metadata and controls
63 lines (52 loc) · 2.08 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
<?xml version="1.0" ?>
<!-- Configuration of the Ant build system to generate a Jar file -->
<project name="SWTCustomComponents JAR lib" default="Package">
<!-- ===================== Property Definitions =========================== -->
<property name="bin.dir" value="bin" />
<property name="bin.res.dir" value="bin/resources" />
<property name="dist.dir" value="dist" />
<property name="lib.dir" value="lib" />
<property name="src.dir" value="src" />
<property name="res.dir" value="resources" />
<property name="jar.name" value="swtcustomcomponents.jar"/>
<!-- Jar files required for compiling the project -->
<path id="classpath.base">
<!-- =================================================================================
EDIT to include and/or exclude speficic jars
================================================================================== -->
<fileset dir="${lib.dir}">
<!-- EDIT: Modify to include or exclude specific jars -->
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ===================== Tasks =========================== -->
<target name="Clean">
<delete dir="${bin.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${bin.res.dir}" />
</target>
<target name="Init" depends="Clean">
<mkdir dir="${bin.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${bin.res.dir}" />
</target>
<target name="Compile" depends="Init">
<javac srcdir="${src.dir}" destdir="${bin.dir}" includes="**/*.java">
<classpath refid="classpath.base" />
</javac>
<!-- Copy all the resources -->
<copy todir="${bin.res.dir}">
<fileset dir="${res.dir}" excludes="**/*.java" />
</copy>
</target>
<target name="CreateJAR" depends="Compile">
<jar destfile="${dist.dir}/${jar.name}">
<fileset dir="${bin.dir}"/>
</jar>
</target>
<!-- ======================================= MAIN TARGET =============================================== -->
<!-- Main target -->
<target name="Package" depends="CreateJAR">
<echo>OK</echo>
</target>
</project>