blob: 391e31b72b6fc3445d8de3292c6f38865bf97e84 (
plain)
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="iciql" default="build" xmlns:mx="antlib:org.moxie">
<!-- Google Code upload task -->
<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve Moxie Toolkit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<property name="moxie.version" value="0.6.2" />
<property name="moxie.url" value="http://gitblit.github.com/moxie/maven" />
<property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
<property name="moxie.dir" value="${user.home}/.moxie" />
<!-- Download Moxie from it's Maven repository to user.home -->
<get src="${moxie.url}/org/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
dest="${moxie.dir}" skipexisting="true" verbose="true" />
<!-- Register Moxie tasks -->
<taskdef uri="antlib:org.moxie">
<classpath location="${moxie.dir}/${moxie.jar}" />
</taskdef>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Initialize Moxie and setup build properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="prepare" description="Retrieves dependencies and sets up build properties">
<mx:init />
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="clean" depends="prepare" description="Cleans build directory">
<mx:clean />
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="compile" depends="prepare" description="Compiles iciql from source">
<mx:javac />
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TestSuite
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="testsuite" depends="compile" description="runs the benchmark test suite against all databases">
<echo/>
<echo>This will take a minute or two...</echo>
<echo/>
<mx:javac scope="test" />
<mx:run scope="test" classname="com.iciql.test.IciqlSuite">
<arg value="--dbFile" />
<arg value="${project.outputDirectory}/performance_db.txt" />
<arg value="--sqlFile" />
<arg value="${project.outputDirectory}/performance_sql.txt" />
</mx:run>
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="build" depends="compile" description="Builds iciql from source">
<mx:jar packageSources="true" />
<mx:javadoc redirect="true" />
<mx:zip>
<artifact />
<artifact classifier="sources"/>
<artifact classifier="javadoc"/>
<fileset dir="${basedir}">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</mx:zip>
<!-- Deploy the artifacts into the version-controlled repository -->
<mx:deploy basedir="${basedir}/maven" allowSnapshots="false" />
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upload artifacts to GoogleCode and the remote Maven repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="uploadArtifacts" depends="build">
<gcupload
username="${googlecode.user}"
password="${googlecode.password}"
projectname="iciql"
filename="${project.targetDirectory}/${project.artifactid}-${project.version}.zip"
targetfilename="${project.artifactid}-${project.version}.zip"
summary="Version ${project.version} -- library, sources, and javadoc"
labels="Featured, Type-Package, OpSys-All" />
<mx:ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}"
remotedir="${ftp.maven.dir}" verbose="yes" depends="yes" timediffauto="true"
preservelastmodified="true">
<fileset dir="${basedir}/maven">
<!-- exclude root files -->
<exclude name="*.md" />
<exclude name=".git*" />
</fileset>
</mx:ftp>
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build the iciql website
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="buildSite" depends="build" description="Build the iciql website">
<!-- ensure we have performance data -->
<mx:if>
<not>
<available file="${project.outputDirectory}/performance_db.txt" />
</not>
<then>
<fail />
</then>
</mx:if>
<!-- Download links -->
<property name="gc.url" value="http://code.google.com/p/iciql/downloads/detail?name=" />
<mx:doc googleplusone="true" injectprettify="true" prettifyTheme="hemisu-dark"
minify="true" customless="custom.less">
<logo file="iciql_white.png" />
<favicon file="iciql-favicon.png" />
<load token="%DBPERFORMANCE%" file="${project.outputDirectory}/performance_db.txt" />
<nomarkdown startToken="%BEGINCODE%" endToken="%ENDCODE%" prettify="true" lang="java" />
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b"
replacePattern="<a href='${project.issuesUrl}/detail?id=$3'>issue $3</a>" />
<structure>
<menu name="about" pager="true" pagerPlacement="bottom" pagerLayout="justified">
<page name="overview" src="00_index.mkd" out="index.html" />
<page name="performance" src="03_performance.mkd" out="performance.html" />
<page name="jaqu comparison" src="06_jaqu_comparison.mkd" out="jaqu_comparison.html" />
</menu>
<menu name="getting started" pager="true" pagerPlacement="bottom" pagerLayout="justified">
<page name="models" src="01_model_classes.mkd" out="model_classes.html" headerLinks="true" />
<page name="versioning" src="02_table_versioning.mkd" out="table_versioning.html" headerLinks="true" />
<page name="usage" src="02_usage.mkd" out="usage.html" headerLinks="true" />
<page name="examples" src="04_examples.mkd" out="examples.html" headerLinks="true" />
<page name="tools" src="04_tools.mkd" out="tools.html" headerLinks="true" />
</menu>
<page name="building" src="05_building.mkd" out="building.html" />
<page name="javadoc" src="05_javadoc.mkd" out="javadoc.html" />
<page name="releases" src="05_releases.mkd" out="releases.html" />
<!--<page name="release notes" out="releasenotes.html">
<template src="releasecurrent.ftl" data="${basedir}/releases.moxie" />
</page>
<page out="releases.html" navbarlink="false">
<template src="releasehistory.ftl" data="${basedir}/releases.moxie" />
</page>-->
<menu name="downloads">
<link name="${project.artifactId}-${project.releaseVersion}"
src="${gc.url}${project.artifactId}-${project.releaseVersion}.zip" />
<divider />
<link name="Maven Repository" src="${project.mavenUrl}" />
</menu>
<menu name="links">
<link name="Github" src="${project.scmUrl}" />
<link name="Issues" src="${project.issuesUrl}" />
<link name="Maven Repository" src="${project.mavenUrl}" />
</menu>
<divider />
</structure>
<!-- Generate RSS and Atom feeds from the release history -->
<!--<page as="atom.xml">
<template src="atom.ftl" data="${basedir}/releases.moxie" />
</page>
<page as="rss.xml">
<template src="rss.ftl" data="${basedir}/releases.moxie" />
</page>-->
</mx:doc>
<!-- Copy standard javadoc -->
<mkdir dir="${project.siteTargetDirectory}/javadoc" />
<copy todir="${project.siteTargetDirectory}/javadoc">
<fileset dir="${project.javadocTargetDirectory}" />
</copy>
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy the built site to the gh-pages branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="updateGhpages" depends="buildSite">
<mx:ghpages obliterate="false" />
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Publish site to hosting service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="publishSite" depends="updateGhpages" description="Publish the iciql site to a webserver" >
<echo>Uploading ${project.artifactId} ${project.version} website</echo>
<mx:ftp server="${ftp.server}"
userid="${ftp.user}"
password="${ftp.password}"
remotedir="${ftp.site.dir}"
passive="true"
verbose="yes">
<fileset dir="${project.siteTargetDirectory}" />
</mx:ftp>
</target>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tag a new version and prepare for the next development cycle.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="tagRelease" depends="prepare">
<!-- release -->
<property name="dryrun" value="false" />
<mx:version stage="release" dryrun="${dryrun}" />
<!-- commit build.moxie & releases.moxie (automatic) and maven artifacts -->
<mx:commit showtitle="no">
<message>Prepare ${project.version} release</message>
<tag name="v${project.version}">
<message>${project.name} ${project.version} release</message>
</tag>
</mx:commit>
<!-- next cycle -->
<mx:version stage="snapshot" incrementNumber="minor" dryrun="${dryrun}" />
<mx:commit showtitle="no">
<message>Reset build identifiers for next development cycle</message>
</mx:commit>
</target>
</project>
|