-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
181 lines (148 loc) · 6.95 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="dapper" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
<property environment="env" />
<property file="src/org/dapper/project.properties" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property name="ivy.install.version" value="2.2.0" />
<!-- Source and class paths. -->
<path id="dapper.sourcepath">
<pathelement location="src" />
<pathelement location="src_examples" />
</path>
<path id="dapper.classpath">
<pathelement location="bin" />
<pathelement location="build/ivy.jar" />
<pathelement location="build/conf" />
<fileset dir="build" includes="**/*/*.jar" />
</path>
<!-- Build project. -->
<target name="init">
<mkdir dir="bin" />
<available file=".dependencies" property="build.dependencies" />
<available resource="org/apache/ivy/ant/antlib.xml" property="ivy.install" classpathref="dapper.classpath" />
</target>
<target name="ivy-install" depends="init" unless="ivy.install">
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="build/ivy.jar" usetimestamp="true" />
</target>
<target name="ivy-configure" depends="ivy-install" unless="ivy.settings.file">
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="dapper.classpath" />
<ivy:configure file="build/ivysettings.xml" />
</target>
<target name="ivy-resolve" depends="ivy-configure" unless="ivy.module">
<ivy:resolve />
</target>
<target name="ivy-retrieve" depends="ivy-configure" unless="build.dependencies">
<ivy:retrieve conf="bootstrap" />
<!-- Some Jar artifacts are declared as having type bundle. -->
<ivy:retrieve conf="lib" type="bundle, jar" />
<unzip src="build/bootstrap/sst-build-conf.jar" dest="build">
<patternset includes="conf/**" />
</unzip>
<unzip src="build/bootstrap/sst-base-src.jar" dest="src">
<patternset includes="org/shared/metaclass/*.java" />
</unzip>
<touch file=".dependencies" />
</target>
<target name="build-prepare" depends="ivy-retrieve">
<taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle" classpathref="dapper.classpath" />
</target>
<target name="build-project" depends="build-prepare">
<javac debug="true" debuglevel="source,lines,vars" destdir="bin" source="${source}" target="${target}" includeAntRuntime="false">
<src refid="dapper.sourcepath" />
<classpath refid="dapper.classpath" />
</javac>
</target>
<target name="build-resource" depends="build-prepare">
<copy includeemptydirs="false" todir="bin">
<fileset dir="src" excludes="**/*.java" />
<fileset dir="src_examples" excludes="**/*.java" />
<fileset dir="build" includes="lib/**" />
</copy>
</target>
<target name="build" depends="build-project, build-resource">
<touch file=".bin" />
</target>
<!-- Jar targets. -->
<fileset id="dapper.metainf" dir=".">
<include name="license.txt" />
<include name="license/license_*.txt" />
</fileset>
<target name="jars" depends="build-project, build-resource">
<jar destfile="dapper.jar" basedir="bin" includes="org/dapper/**, org/shared/**, lib/**">
<manifest>
<attribute name="Main-Class" value="org.dapper.ui.FlowManagerDriver" />
</manifest>
<metainf refid="dapper.metainf" />
</jar>
<jar destfile="dapper-ex.jar" basedir="bin" includes="ex/**">
<metainf refid="dapper.metainf" />
</jar>
</target>
<target name="jar-base" depends="build-project, build-resource">
<jar destfile="${ivy.distrib.dir}/jars/dapper-base-${build.version}.jar" basedir="bin" includes="org/dapper/**">
<metainf refid="dapper.metainf" />
</jar>
</target>
<target name="jar-base-src" depends="build-project, build-resource">
<jar destfile="${ivy.distrib.dir}/sources/dapper-base-src-${build.version}.jar" basedir="src" includes="org/dapper/**">
<metainf refid="dapper.metainf" />
</jar>
</target>
<target name="jar-ex" depends="build-project, build-resource">
<jar destfile="${ivy.distrib.dir}/jars/dapper-ex-${build.version}.jar" basedir="bin" includes="ex/**">
<metainf refid="dapper.metainf" />
</jar>
</target>
<target name="jar-ex-src" depends="build-project, build-resource">
<jar destfile="${ivy.distrib.dir}/sources/dapper-ex-src-${build.version}.jar" basedir="src_examples" includes="ex/**">
<metainf refid="dapper.metainf" />
</jar>
</target>
<!-- Publish Jars. -->
<target name="ivy-publish" depends="ivy-resolve, jar-base, jar-base-src, jar-ex, jar-ex-src">
<ivy:publish resolver="local" pubrevision="${build.version}" overwrite="true" forcedeliver="true" />
<touch file=".publish" />
</target>
<!-- Javadoc target. -->
<target name="javadoc" depends="build-project">
<javadoc access="protected" destdir="javadoc" packagenames="*" source="${source}" splitindex="true" failonerror="true" author="true" use="true" version="true">
<sourcepath refid="dapper.sourcepath" />
<classpath refid="dapper.classpath" />
<link href="http://download.oracle.com/javase/6/docs/api/" />
<doclet name="org.jboss.apiviz.APIviz" pathref="dapper.classpath" />
</javadoc>
<touch file=".javadoc" />
</target>
<!-- Checkstyle target. -->
<target name="checkstyle" depends="build-prepare">
<cs:checkstyle config="build/checkstyle.xml">
<fileset dir="native/src" includes="**/*.cpp" />
<fileset dir="native/include" includes="**/*.hpp" />
<fileset dir="src" includes="**/*.java" excludes="org/shared/**/*.java" />
<fileset dir="src_examples" includes="**/*.java" />
</cs:checkstyle>
<touch file=".checkstyle" />
</target>
<!-- Wipe clean. -->
<target name="clean">
<delete file=".bin" />
<delete file=".checkstyle" />
<delete file=".javadoc" />
<delete file=".publish" />
<delete dir="bin" />
<delete dir="distrib" />
<delete dir="javadoc" />
<delete>
<fileset dir="." includes="*.jar" />
</delete>
</target>
<target name="distclean" depends="clean">
<delete file=".dependencies" />
<delete file="build/ivy.jar" />
<delete dir="build/bootstrap" />
<delete dir="build/conf" />
<delete dir="build/lib" />
<delete dir="src/org/shared" />
</target>
</project>