blob: 096bfc7a577d5081a769470c86b37a22df6eee07 [file] [log] [blame]
David Reiss36a5a252009-04-29 23:20:56 +00001<?xml version="1.0"?>
David Reissea2cba82009-03-30 21:35:00 +00002<!--
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19-->
David Reiss36a5a252009-04-29 23:20:56 +000020<project name="libthrift" default="dist" basedir="."
Bryan Duxbury547edc72010-03-28 21:02:38 +000021 xmlns:ivy="antlib:org.apache.ivy.ant"
22 xmlns:artifact="antlib:org.apache.maven.artifact.ant">
Mark Slee83c52a82006-06-07 06:51:18 +000023
24 <description>Thrift Build File</description>
Bryan Duxbury2f45e782009-08-20 00:55:12 +000025 <property name="thrift.root" location="../../"/>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +000026 <property name="thrift.version" value="0.7.0"/>
27 <property name="thrift.groupid" value="org.apache.thrift"/>
28 <property name="thrift.artifactid" value="libthrift"/>
29
30 <property name="mvn.ant.task.version" value="2.1.1"/>
31 <property name="ivy.version" value="2.2.0"/>
32
33 <!-- Local install locations -->
34 <property name="install.path" value="/usr/local/lib"/>
35 <property name="install.javadoc.path" value="${install.path}"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +000036
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +000037 <!-- Dependency download location -->
38 <property name="mvn.repo" value="http://repo1.maven.org/maven2"/>
39 <property name="apache.repo" value="https://repository.apache.org/content/repositories/releases"/>
Bryan Duxbury547edc72010-03-28 21:02:38 +000040
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +000041 <!-- Publish information-->
42 <property name="license" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
43 <property name="maven-repository-url" value="https://repository.apache.org/service/local/staging/deploy/maven2"/>
44 <property name="maven-repository-id" value="apache.releases.https"/>
45
46 <property environment="env"/>
47
48 <condition property="version" value="${thrift.version}">
49 <isset property="release"/>
50 </condition>
51 <property name="version" value="${thrift.version}-snapshot"/>
52
53 <property name="final.name" value="${thrift.artifactid}-${version}"/>
54
55 <property name="gen" location="gen-java"/>
56 <property name="genbean" location="gen-javabean"/>
57
58 <property name="src" location="${basedir}/src"/>
59 <property name="build.dir" location="${basedir}/build"/>
60 <property name="build.lib.dir" location="${build.dir}/lib"/>
61 <property name="build.tools.dir" location="${build.dir}/tools"/>
62 <property name="src.test" location="test"/>
63 <property name="build.test.dir" location="${build.dir}/test"/>
64 <property name="test.thrift.home" location="${thrift.root}/test"/>
65
66 <property name="javadoc.dir" location="${build.dir}/javadoc"/>
67
68 <property name="jar.file" location="${build.dir}/${final.name}.jar"/>
69 <property name="test.jar.file" location="${build.dir}/${final.name}-test.jar"/>
70 <property name="javadoc.jar.file" location="${build.dir}/${final.name}-javadoc.jar"/>
71 <property name="source.tar.gz" location="${build.dir}/${final.name}-src.tar.gz"/>
72
73 <!-- Junit properties -->
74 <property name="test.junit.output.format" value="plain"/>
75 <property name="test.timeout" value="2000000"/>
76 <property name="test.src.dir" location="${basedir}/test"/>
77 <property name="test.log.dir" value="${build.test.dir}/log"/>
78 <property name="test.port" value="9090"/>
79
80 <!-- ivy properties -->
81 <property name="ivy.repo.url" value="${mvn.repo}/org/apache/ivy/ivy/${ivy.version}/"/>
82 <property name="ivy.jar" value="${build.tools.dir}/ivy-${ivy.version}.jar"/>
83
84 <!-- maven properties -->
85 <property name="mvn.ant.task.url" value="${mvn.repo}/org/apache/maven/maven-ant-tasks/${mvn.ant.task.version}"/>
86 <property name="mvn.ant.task.jar" location="${build.tools.dir}/maven-ant-tasks-${mvn.ant.task.version}.jar"/>
87 <property name="pom.xml" location="${build.dir}/${final.name}.pom"/>
88
89 <!-- custom override anything with a thrift-build.properties file in your home directory -->
90 <property file="${user.home}/.thrift-build.properties"/>
91
David Reiss36a5a252009-04-29 23:20:56 +000092 <path id="compile.classpath">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +000093 <fileset dir="${build.lib.dir}">
94 <include name="**/*.jar"/>
95 </fileset>
David Reiss36a5a252009-04-29 23:20:56 +000096 </path>
97
98 <path id="test.classpath">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +000099 <path refid="compile.classpath"/>
100 <pathelement path="${env.CLASSPATH}"/>
101 <pathelement location="${build.test.dir}"/>
102 <pathelement location="${jar.file}"/>
103 <pathelement location="${test.jar.file}"/>
David Reiss36a5a252009-04-29 23:20:56 +0000104 </path>
Bryan Duxbury538e3442009-02-10 04:49:39 +0000105
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000106 <!-- Tasks -->
107 <target name="init" depends="setup.init,ivy.init,mvn.init" unless="init.finished">
108 <property name="init.finished" value="true"/>
Mark Slee83c52a82006-06-07 06:51:18 +0000109 </target>
110
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000111 <target name="setup.init">
112 <tstamp/>
113 <mkdir dir="${build.dir}"/>
114 <mkdir dir="${build.lib.dir}"/>
115 <mkdir dir="${build.tools.dir}"/>
116 <mkdir dir="${build.test.dir}"/>
David Reiss36a5a252009-04-29 23:20:56 +0000117 </target>
118
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000119 <target name="ivy.download" depends="setup.init" unless="ivy.found">
120 <get src="${ivy.repo.url}/ivy-${ivy.version}.jar" dest="${ivy.jar}" usetimestamp="true"/>
David Reiss36a5a252009-04-29 23:20:56 +0000121 </target>
122
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000123 <target name="ivy.check" description="check if ivy is in the classpath">
David Reiss36a5a252009-04-29 23:20:56 +0000124 <condition property="ivy.found">
125 <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
126 </condition>
127 </target>
128
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000129 <target name="ivy.init" depends="setup.init,ivy.check,ivy.download" unless="ivy.found">
130 <typedef uri="antlib:org.apache.ivy.ant" onerror="fail" loaderRef="ivyLoader">
David Reiss36a5a252009-04-29 23:20:56 +0000131 <classpath>
132 <pathelement location="${ivy.jar}"/>
133 </classpath>
134 </typedef>
135 <fail>
136 <condition >
137 <not>
138 <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
139 </not>
140 </condition>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000141 You need Apache Ivy 2.0 or later from ${ivy.repo.url}. It could not be loaded from ${ivy.jar}
David Reiss36a5a252009-04-29 23:20:56 +0000142 </fail>
143 </target>
144
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000145 <target name="compile" depends="init">
146 <javac srcdir="${src}" destdir="${build.dir}" source="1.5" target="1.5"
147 debug="true" classpathref="compile.classpath" includeantruntime="false"/>
David Reiss36a5a252009-04-29 23:20:56 +0000148 </target>
149
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000150 <target name="javadoc" depends="init">
151 <javadoc sourcepath="${src}" destdir="${javadoc.dir}"
152 version="true" windowtitle="Thrift Java API" doctitle="Thrift Java API"
Bryan Duxburyd8c77572010-07-29 19:30:47 +0000153 classpathref="test.classpath">
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000154 </javadoc>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000155 <jar jarfile="${javadoc.jar.file}" basedir="${javadoc.dir}">
156 <manifest>
157 <attribute name="Implementation-Version" value="${version}"/>
158 </manifest>
159 </jar>
Mark Slee83c52a82006-06-07 06:51:18 +0000160 </target>
161
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000162 <target name="dist" depends="compile">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000163 <mkdir dir="${build.dir}/META-INF"/>
164 <copy file="${thrift.root}/LICENSE" tofile="${build.dir}/META-INF/LICENSE.txt"/>
165 <copy file="${thrift.root}/NOTICE" tofile="${build.dir}/META-INF/NOTICE.txt"/>
Bryan Duxbury547edc72010-03-28 21:02:38 +0000166 <jar jarfile="${jar.file}">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000167 <manifest>
168 <attribute name="Implementation-Version" value="${version}"/>
169 </manifest>
170 <fileset dir="${build.dir}">
171 <include name="org/apache/thrift/**/*.class"/>
172 <include name="META-INF/*.txt"/>
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000173 </fileset>
174 <fileset dir="src">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000175 <include name="**/*.java"/>
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000176 </fileset>
177 </jar>
178 </target>
179
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000180 <target name="pack.src">
181 <tar destfile="${source.tar.gz}" basedir="${src}" compression="gzip"/>
182 </target>
183
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000184 <target name="install" depends="dist,javadoc">
David Reiss56c2c212009-06-04 02:05:25 +0000185 <copy todir="${install.path}">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000186 <fileset dir="."><include name="*.jar"/></fileset>
David Reiss56c2c212009-06-04 02:05:25 +0000187 </copy>
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000188 <copy todir="${install.javadoc.path}">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000189 <fileset dir="${javadoc.dir}">
190 <include name="**/*"/>
Bryan Duxbury32e04b42009-03-20 16:43:06 +0000191 </fileset>
192 </copy>
Mark Slee83c52a82006-06-07 06:51:18 +0000193 </target>
194
195 <target name="clean">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000196 <delete dir="${build.dir}"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000197 <delete dir="${gen}"/>
198 <delete dir="${genbean}"/>
Mark Slee83c52a82006-06-07 06:51:18 +0000199 </target>
200
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000201 <target name="compile-test" description="Build the test suite classes" depends="generate,dist">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000202 <javac debug="true" srcdir="${gen}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false"/>
203 <javac debug="true" srcdir="${genbean}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false"/>
204 <javac debug="true" srcdir="${src.test}" destdir="${build.test.dir}" classpathref="test.classpath" includeantruntime="false"/>
205 <copy todir="${build.test.dir}">
206 <fileset dir="${src.test}" includes="log4j.properties"/>
Todd Lipconfcaa8f52010-09-27 23:51:22 +0000207 </copy>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000208 <jar jarfile="${test.jar.file}" basedir="${build.test.dir}"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000209 </target>
210
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000211 <target name="junit-test" description="Run the JUnit test suite" depends="compile-test">
212 <mkdir dir="${test.log.dir}"/>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000213 <junit printsummary="true" showoutput="${test.output}" timeout="${test.timeout}"
214 haltonfailure="no" errorProperty="tests.failed" failureProperty="tests.failed"
215 fork="true" forkmode="perTest" maxmemory="512m"
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000216 >
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000217 <sysproperty key="build.test" value="${build.test.dir}"/>
218 <sysproperty key="test.port" value="${test.port}"/>
Bryan Duxbury1b130832010-10-19 17:20:57 +0000219 <sysproperty key="javax.net.ssl.trustStore" value="${src.test}/.truststore"/>
220 <sysproperty key="javax.net.ssl.trustStorePassword" value="thrift"/>
221 <sysproperty key="javax.net.ssl.keyStore" value="${src.test}/.keystore"/>
222 <sysproperty key="javax.net.ssl.keyStorePassword" value="thrift"/>
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000223 <classpath refid="test.classpath"/>
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000224 <formatter type="${test.junit.output.format}"/>
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000225 <batchtest todir="${test.log.dir}" unless="testcase">
Roger Meier5013de22010-10-25 19:57:26 +0000226 <fileset dir="${test.src.dir}">
227 <include name="**/Test*.java"/>
228 <exclude name="**/TestClient.java"/>
229 <exclude name="**/TestServer.java"/>
230 <exclude name="**/TestNonblockingServer.java"/>
231 </fileset>
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000232 </batchtest>
233 <batchtest todir="${test.log.dir}" if="testcase">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000234 <fileset dir="${test.src.dir}" includes="**/${testcase}.java"/>
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000235 </batchtest>
236 </junit>
237 <fail if="tests.failed">Tests failed!</fail>
238 </target>
239
240 <target name="deprecated-test" description="Run the non-JUnit test suite" depends="compile-test">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000241 <java classname="org.apache.thrift.test.EqualityTest" classpathref="test.classpath" failonerror="true"/>
242 <java classname="org.apache.thrift.test.JavaBeansTest" classpathref="test.classpath" failonerror="true"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000243 </target>
244
Bryan Duxbury951e7e22010-03-26 05:05:59 +0000245 <target name="test" description="Run the full test suite" depends="junit-test,deprecated-test"/>
246
Roger Meier62b7cfb2010-10-23 22:25:04 +0000247 <target name="testclient" description="Run a test client" depends="compile-test">
David Reiss2727fab2009-12-09 19:30:01 +0000248 <java classname="org.apache.thrift.test.TestClient"
249 classpathref="test.classpath" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000250 <arg line="${testargs}"/>
David Reiss2727fab2009-12-09 19:30:01 +0000251 </java>
252 </target>
253
Roger Meier62b7cfb2010-10-23 22:25:04 +0000254 <target name="testserver" description="Run a test server" depends="compile-test">
David Reiss2727fab2009-12-09 19:30:01 +0000255 <java classname="org.apache.thrift.test.TestServer"
256 classpathref="test.classpath" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000257 <arg line="${testargs}"/>
David Reiss2727fab2009-12-09 19:30:01 +0000258 </java>
259 </target>
260
Roger Meier62b7cfb2010-10-23 22:25:04 +0000261 <target name="testnonblockingserver" description="Run a test nonblocking server" depends="compile-test">
David Reiss2727fab2009-12-09 19:30:01 +0000262 <java classname="org.apache.thrift.test.TestNonblockingServer"
263 classpathref="test.classpath" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000264 <arg line="${testargs}"/>
David Reiss2727fab2009-12-09 19:30:01 +0000265 </java>
266 </target>
267
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000268 <target name="generate">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000269 <!-- Generate the thrift gen-java source -->
Bryan Duxbury2845b162009-11-09 15:55:22 +0000270 <exec executable="../../compiler/cpp/thrift" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000271 <arg line="--gen java:hashcode ${test.thrift.home}/ThriftTest.thrift"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000272 </exec>
Bryan Duxbury2845b162009-11-09 15:55:22 +0000273 <exec executable="../../compiler/cpp/thrift" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000274 <arg line="--gen java:hashcode ${test.thrift.home}/DebugProtoTest.thrift"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000275 </exec>
Bryan Duxbury2845b162009-11-09 15:55:22 +0000276 <exec executable="../../compiler/cpp/thrift" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000277 <arg line="--gen java:hashcode ${test.thrift.home}/OptionalRequiredTest.thrift"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000278 </exec>
Bryan Duxbury2845b162009-11-09 15:55:22 +0000279 <exec executable="../../compiler/cpp/thrift" failonerror="true">
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000280 <arg line="--gen java:beans,nocamel ${test.thrift.home}/JavaBeansTest.thrift"/>
Bryan Duxbury249d7cb2009-01-29 01:21:20 +0000281 </exec>
282 </target>
283
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000284 <target name="mvn.ant.tasks.download" depends="setup.init" unless="mvn.ant.tasks.found">
285 <get src="${mvn.ant.task.url}/maven-ant-tasks-${mvn.ant.task.version}.jar" dest="${mvn.ant.task.jar}" usetimestamp="true"/>
Bryan Duxbury547edc72010-03-28 21:02:38 +0000286 </target>
287
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000288 <target name="mvn.ant.tasks.check">
289 <condition property="mvn.ant.tasks.found">
290 <typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
291 </condition>
292 </target>
293
294 <target name="mvn.init" depends="mvn.ant.tasks.download" unless="mvn.finished">
295 <!-- Download mvn ant tasks, download dependencies, and setup pom file -->
296 <typedef uri="antlib:org.apache.maven.artifact.ant" classpath="${mvn.ant.task.jar}"/>
297
298 <!-- remote repositories used to download dependencies from -->
299 <artifact:remoteRepository id="central" url="${mvn.repo}"/>
300 <artifact:remoteRepository id="apache" url="${apache.repo}"/>
301
302 <!-- Pom file information -->
303 <artifact:pom id="pom"
304 groupId="${thrift.groupid}"
305 artifactId="${thrift.artifactid}"
306 version="${version}"
307 url="http://thrift.apache.org"
308 name="Apache Thrift"
309 description="Thrift is a software framework for scalable cross-language services development."
310 packaging="pom"
311 >
312 <remoteRepository refid="central"/>
313 <remoteRepository refid="apache"/>
314 <license name="The Apache Software License, Version 2.0" url="${license}"/>
315 <scm connection="scm:svn:http://svn.apache.org/repos/asf/thrift/trunk/"
316 developerConnection="scm:svn:http://svn.apache.org/repos/asf/thrift/trunk/"
317 url="http://svn.apache.org/viewcvs.cgi/thrift"
318 />
319 <!-- Thrift Developers -->
320 <developer id="mcslee" name="Mark Slee"/>
321 <developer id="dreiss" name="David Reiss"/>
322 <developer id="aditya" name="Aditya Agarwal"/>
323 <developer id="marck" name="Marc Kwiatkowski"/>
324 <developer id="jwang" name="James Wang"/>
325 <developer id="cpiro" name="Chris Piro"/>
326 <developer id="bmaurer" name="Ben Maurer"/>
327 <developer id="kclark" name="Kevin Clark"/>
328 <developer id="jake" name="Jake Luciani"/>
329 <developer id="bryanduxbury" name="Bryan Duxbury"/>
330 <developer id="esteve" name="Esteve Fernandez"/>
331 <developer id="todd" name="Todd Lipcon"/>
332 <developer id="geechorama" name="Andrew McGeachie"/>
333 <developer id="molinaro" name="Anthony Molinaro"/>
334 <developer id="roger" name="Roger Meier"/>
335
336 <!-- Thrift dependencies list -->
337 <dependency groupId="org.slf4j" artifactId="slf4j-api" version="1.5.8"/>
338 <dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="1.5.8"/>
339 <dependency groupId="commons-lang" artifactId="commons-lang" version="2.5"/>
340 <dependency groupId="junit" artifactId="junit" version="4.4"/>
341 <dependency groupId="javax.servlet" artifactId="servlet-api" version="2.5"/>
342 <dependency groupId="org.apache.httpcomponents" artifactId="httpclient" version="4.0.1"/>
343 </artifact:pom>
344
345 <!-- Generate the pom file -->
346 <artifact:writepom pomRefId="pom" file="${pom.xml}"/>
347
348 <!-- Download the dependencies -->
349 <artifact:dependencies filesetId="build-dependency-jars" pomRefId="pom"/>
350
351 <!-- Copy the dependencies to the build/lib dir -->
352 <copy todir="${build.dir}/lib">
353 <fileset refid="build-dependency-jars"/>
354 <mapper type="flatten"/>
355 </copy>
356
357 <property name="mvn.finished" value="true"/>
Bryan Duxbury547edc72010-03-28 21:02:38 +0000358 </target>
359
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000360 <macrodef name="signAndDeploy">
361 <!-- Sign and deploy jars to apache repo -->
362 <attribute name="file"/>
363 <attribute name="classifier" default=""/>
364 <attribute name="packaging" default="jar"/>
365 <sequential>
366 <artifact:mvn fork="true">
367 <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/>
368 <arg value="-DrepositoryId=${maven-repository-id}"/>
369 <arg value="-Durl=${maven-repository-url}"/>
370 <arg value="-DpomFile=${pom.xml}"/>
371 <arg value="-Dfile=@{file}"/>
372 <arg value="-Dclassifier=@{classifier}"/>
373 <arg value="-Dpackaging=@{packaging}"/>
374 <arg value="-Pgpg"/>
375 </artifact:mvn>
376 </sequential>
377 </macrodef>
Bryan Duxbury547edc72010-03-28 21:02:38 +0000378
Bryan Duxbury55f7ffe2011-03-24 17:24:27 +0000379 <target name="publish" depends="clean,init,test,dist,javadoc,pack.src">
380 <!-- Compile, package, test and then send release to apache maven repo -->
381 <!-- run with: ant -Drelease=true publish-->
382 <signAndDeploy file="${pom.xml}" packaging="pom" classifier=""/>
383 <signAndDeploy file="${jar.file}" packaging="jar" classifier=""/>
384 <signAndDeploy file="${javadoc.jar.file}" packaging="jar" classifier="javadoc"/>
385 <signAndDeploy file="${source.tar.gz}" packaging="src" classifier="tar.gz"/>
Bryan Duxbury547edc72010-03-28 21:02:38 +0000386 </target>
Mark Slee83c52a82006-06-07 06:51:18 +0000387</project>