forked from xenon-middleware/xenon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·122 lines (96 loc) · 4.5 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
<project name="Xenon" default="build" basedir=".">
<description>
Build file for Xenon
</description>
<property name="build.sysclasspath" value="ignore" />
<property name="version" value="1.0.0" />
<path id="lib.jars">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<target name="build" depends="clean, create-dist" description="Main build target" />
<target name="test" depends="build" description="run the unit tests with coverage">
<ant dir="${basedir}/test" target="test" />
</target>
<target name="test-integration" depends="build" description="run the integration tests">
<ant dir="${basedir}/test" target="test-integration" />
</target>
<target name="xenon-dist" depends="compile" description="create xenon jars">
<!-- Put all compiled classes into a jar file in the lib dir -->
<jar jarfile="dist/nlesc-xenon-${version}/lib/xenon-${version}.jar" basedir="build/classes" />
<!-- Copy external dependancies to dist directory -->
<copy todir="dist/nlesc-xenon-${version}/lib">
<fileset dir="lib" />
</copy>
</target>
<target name="create-dist" depends="xenon-dist, javadoc" description="build a binary distribution">
<!-- Copy the users guide to doc -->
<copy file="doc/userguide.md" todir="dist/nlesc-xenon-${version}/doc"/>
<copy file="doc/userguide.pdf" todir="dist/nlesc-xenon-${version}/doc"/>
<!-- Zip the source and put it in doc -->
<zip destfile="dist/nlesc-xenon-${version}/doc/xenon-src-${version}.zip" basedir="src"/>
<!-- Copy the javadoc to doc -->
<copy todir="dist/nlesc-xenon-${version}/doc/javadoc">
<fileset dir="doc/javadoc"/>
</copy>
<!-- Copy the examples to examples -->
<copy todir="dist/nlesc-xenon-${version}/examples">
<fileset dir="examples_src"/>
</copy>
<!-- Copy logging config to dist/etc -->
<copy todir="dist/nlesc-xenon-${version}/etc">
<fileset file="logback.xml" />
</copy>
<!-- Copy various readme and licence files to root of dist -->
<copy file="INSTALL.md" todir="dist/nlesc-xenon-${version}"/>
<copy file="LICENSE" todir="dist/nlesc-xenon-${version}"/>
<copy file="NOTICE" todir="dist/nlesc-xenon-${version}"/>
<copy file="README.md" todir="dist/nlesc-xenon-${version}"/>
<copy file="EXAMPLES.md" todir="dist/nlesc-xenon-${version}"/>
<copy todir="dist/nlesc-xenon-${version}/notices">
<fileset dir="notices"/>
</copy>
<!-- Finally, create a binary distribution zip -->
<zip destfile="dist/nlesc-xenon-${version}-bin.zip" basedir="dist"/>
</target>
<target name="create-dirs" description="create the necessary target dirs">
<mkdir dir="dist" />
<mkdir dir="dist/nlesc-xenon-${version}" />
<mkdir dir="dist/nlesc-xenon-${version}/lib" />
<mkdir dir="dist/nlesc-xenon-${version}/etc" />
<mkdir dir="dist/nlesc-xenon-${version}/doc" />
<mkdir dir="dist/nlesc-xenon-${version}/doc/javadoc" />
<mkdir dir="dist/nlesc-xenon-${version}/examples" />
<mkdir dir="dist/nlesc-xenon-${version}/notices" />
</target>
<target name="compile" description="compile the source" depends="create-dirs">
<mkdir dir="build/classes" />
<!-- Compile the java code from src into classes -->
<javac srcdir="src" destdir="build/classes" debug="on">
<classpath refid="lib.jars" />
</javac>
</target>
<target name="javadoc" description="generate javadoc for users" depends="create-dirs">
<delete dir="doc/javadoc" />
<javadoc destdir="doc/javadoc" access="public" use="true" notree="false" nonavbar="false" sourcepath="src" noindex="false" splitindex="true" version="true" nodeprecatedlist="false" nodeprecated="false" verbose="false" excludepackagenames="nl.esciencecenter.xenon.engine.*,nl.esciencecenter.xenon.adaptors.*">
<link href="http://docs.oracle.com/javase/7/docs/api/" />
<classpath refid="lib.jars" />
</javadoc>
</target>
<target name="javadoc-devel" description="generate javadoc for developers" depends="create-dirs">
<delete dir="doc/javadoc-devel" />
<javadoc destdir="doc/javadoc-devel" access="private" use="true" notree="false" nonavbar="false" sourcepath="src" noindex="false" splitindex="true" version="true" nodeprecatedlist="false" nodeprecated="false" verbose="false">
<link href="http://docs.oracle.com/javase/7/docs/api/" />
<classpath refid="lib.jars" />
</javadoc>
</target>
<target name="clean" description="clean up">
<delete dir="build" />
<delete dir="dist" />
<ant dir="test" target="clean" />
</target>
<target name="allclean" depends="clean" description="clean up everything">
<delete dir="doc/javadoc" />
</target>
</project>