-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
53 lines (43 loc) · 1.64 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
<?xml version="1.0"?>
<project name="warcexamples" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<echo>Running build for warcexamples:</echo>
<echo>Setting up build properties...</echo>
<!-- Set up build properties -->
<property name="lib.dir" value="${basedir}/lib" />
<property name="jarFile" value="${basedir}/warcexamples.jar" />
<property name="bin.dir" value="${basedir}/bin" />
<!-- Create jar from compiled sources -->
<target name="jar" depends="retrieve">
<echo>Creating jar...</echo>
<path id="dist.classpath">
<fileset dir="${lib.dir}" includes="**/*.jar, **/*.zip" />
</path>
<manifestclasspath property="dist.manifest.classpath" jarfile="${jarFile}">
<classpath refid="dist.classpath" />
</manifestclasspath>
<jar destfile="${jarFile}" compress="true">
<fileset dir="${bin.dir}" includes="**/*.*" />
<zipfileset dir="${lib.dir}" prefix="lib/" />
<!--includes="**/*.jar, **/*.zip" /> -->
<manifest>
<attribute name="Main-Class" value="nl.surfsara.warcexamples.Main" />
<attribute name="Class-Path" value="${dist.manifest.classpath}" />
</manifest>
</jar>
</target>
<!-- Clean build directories -->
<target name="clean">
<echo>Cleaning build directories...</echo>
<delete file="${jarFile}" />
<delete includeemptydirs="true">
<fileset dir="${lib.dir}" includes="**/*" />
</delete>
</target>
<target name="retrieve">
<ivy:retrieve pattern="lib/[artifact]-[type]-[revision].[ext]" type="jar" />
</target>
<!-- Derive basic pom file.xml for maven -->
<target name="pom">
<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${basedir}/pom.xml" />
</target>
</project>