-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
127 lines (97 loc) · 4.07 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<project name="zorilla" default="build" basedir=".">
<description>
Build file for Zorilla
</description>
<!-- empty version by default -->
<property name="version" value="" />
<!-- locations of external libraries. Defaults to included versions,
override to use custom versions -->
<property name="ipl" value="external/ipl" />
<!-- set a timestamp -->
<tstamp>
<format property="timestamp" pattern="yyyyMMddHHmmss" />
</tstamp>
<!-- create the class path. Consists of all external jars,
zoni and bamboo -->
<path id="class_path">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<pathelement path="tmp" />
</path>
<target name="starter" description="build starter sub project">
<ant dir="starter" />
</target>
<target name="build" description="build jar file" depends="clean,copy,starter,compile" />
<target name="copy">
<!-- add external stuff to lib -->
<echo message="using IPL from ${ipl}" />
<copy todir="lib" includeEmptyDirs="false">
<fileset dir="${ipl}" />
</copy>
<copy todir="lib">
<fileset dir="external" includes="*.jar" />
</copy>
</target>
<target name="compile" description="build jar file" depends="clean">
<mkdir dir="tmp" />
<mkdir dir="lib" />
<!-- Compile the java code from src into tmp -->
<javac srcdir="src" destdir="tmp" debug="on" source="1.5" target="1.5" classpathref="class_path">
<compilerarg value="-Xlint:unchecked" />
</javac>
<!-- Run Ibisc -->
<java classname="ibis.compile.Ibisc" taskname="Ibisc" failonerror="true" dir="tmp" maxmemory="512m" fork="true">
<arg line="." />
<classpath refid="class_path" />
</java>
<copy todir="tmp">
<fileset dir="." includes="resources/*" />
</copy>
<jar destfile="lib/${ant.project.name}${version}.jar" basedir="tmp">
<manifest>
<attribute name="Implementation-Version" value="${timestamp}" />
</manifest>
</jar>
<delete dir="tmp" />
</target>
<target name="clean" description="clean everything">
<ant dir="starter" target="clean" />
<delete dir="dist" />
<delete dir="lib" />
</target>
<target name="lib" depends="build" description="create a distribution of the zorilla jars">
<zip destfile="zorilla-lib.zip">
<zipfileset dir="lib" includes="*.jar,adaptors/GenericAdaptor/*,adaptors/LocalAdaptor/*,adaptors/shared/*" />
<zipfileset dir="." includes="log4j.properties" />
<zipfileset dir="." includes="zorilla.starter.properties" fullpath="zorilla.properties" />
</zip>
</target>
<target name="upload" depends="lib" description="upload lib zip file">
<echo message="uploading zip file to website" />
<exec executable="scp">
<arg value="zorilla-lib.zip" />
<arg value="starter/lib/zorilla-starter.jar" />
<arg value="bin/zorilla-starter" />
<arg value="[email protected]:/home/ndrost/www" />
</exec>
<!--
<echo message="uploading zip file to grid5000"/>
<exec executable="scp">
<arg value="zorilla-lib.zip" />
<arg value="[email protected]:zorilla/" />
</exec>
-->
</target>
<target name="dist" depends="build" description="create a binary distribution of zorilla">
<zip destfile="zorilla-src.zip">
<zipfileset dir="src" prefix="zorilla-src/" />
</zip>
<delete dir="dist" />
<mkdir dir="dist" />
<zip destfile="dist/zorilla${version}.zip">
<zipfileset dir="." prefix="zorilla${version}" includes="zorilla-src.zip, README, lib/**, javadoc/**, log4j.properties, LICENSE" />
<zipfileset dir="." prefix="zorilla${version}" filemode="755" includes="bin/**" excludes="bin/zorilla-starter, bin/zorilla-daemon" />
</zip>
</target>
</project>