forked from kurthuwig/rados-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
85 lines (75 loc) · 3.37 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Rados Java Bindings" default="jar" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<property environment="env"/>
<property file="build.properties" />
<property name="src" value="rados-java-${version}" />
<property name="src.file" value="target/${src}.tar.gz" />
<property name="javac.debug" value="off" />
<property name="jar" value="rados-${version}" />
<property name="jar.file" value="target/${jar}.jar" />
<property name="jar.docfile" value="target/${jar}-javadoc.jar" />
<property name="jar.srcfile" value="target/${jar}-sources.jar" />
<path id="compile.classpath">
<fileset dir="${jar.dir}">
<include name="jna.jar" />
</fileset>
</path>
<path id="test.classpath">
<fileset dir="${jar.dir}">
<include name="jna.jar" />
<include name="junit.jar" />
</fileset>
<pathelement location="target/classes" />
<pathelement location="target/testclasses" />
</path>
<target name="doc" depends="build">
<mkdir dir="target/javadoc" />
<javadoc sourcepath="src/main/java" classpathref="compile.classpath" destdir="target/javadoc" />
<jar destfile="${jar.docfile}" basedir="target/javadoc" />
</target>
<target name="clean">
<delete dir="target" />
</target>
<target name="init">
<mkdir dir="target/classes" />
<mkdir dir="target/testclasses" />
<mkdir dir="target/cache" />
</target>
<target name="build" depends="init">
<depend srcdir="src/main/java"
destdir="target/classes"
cache="target/cache"
closure="true" />
<javac srcdir="src/main/java" includeAntRuntime="false" target="${java.target}" source="${java.source}" debug="${javac.debug}" classpathref="compile.classpath" includes="**/*.java" destdir="target/classes" />
</target>
<target name="buildtests" depends="build">
<depend srcdir="src/test/java"
destdir="target/testclasses"
cache="target/cache"
closure="true" />
<javac srcdir="src/test/java" debug="${javac.debug}" includes="**/*.java" classpathref="test.classpath" destdir="target/testclasses" includeAntRuntime="false" />
</target>
<target name="test" depends="buildtests">
<junit printsummary="yes" showoutput="yes" fork="yes" forkMode="perBatch" logfailedtests="yes">
<sysproperty key="jna.nosys" value="true"/>
<formatter type="plain" />
<classpath refid="test.classpath" />
<batchtest todir="target">
<fileset dir="src/test/java">
<include name="**/Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="jar" depends="build">
<jar destfile="${jar.file}" basedir="target/classes" />
</target>
<target name="src" depends="init">
<mkdir dir="target/rados-java-${version}" />
<copy todir="target/rados-java-${version}">
<fileset dir="." excludes="target/**,.git/**,.gitignore,.*,.*/**" />
</copy>
<tar basedir="target" includes="rados-java-${version}/**" destfile="${src.file}" compression="gzip" />
<jar destfile="${jar.srcfile}" basedir="src/main/java" />
</target>
</project>