Skip to content

Commit d87941d

Browse files
author
Steve Powell
committed
Merging default
2 parents 28029a0 + efbb994 commit d87941d

17 files changed

+121
-65
lines changed

build.properties

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
alt.javac.source=1.6
2+
alt.javac.target=1.6
13
build.out=build
2-
lib.out=${build.out}/lib
4+
bundle.name=RabbitMQ Java AMQP client library
5+
bundle.out=${build.out}/bundle
6+
bundle.symbolicName=com.rabbitmq.client
7+
bundlor.home=bundlor
38
dist.out=${build.out}/dist
4-
src.generated=${build.out}/gensrc
59
javac.debug=true
10+
javac.out=${build.out}/classes
11+
javadoc.out=build/doc/api
12+
lib.out=${build.out}/lib
13+
python.bin=python
14+
retrotranslator=retrotranslator
15+
sibling.codegen.dir=../rabbitmq-codegen/
16+
spec.version=0.9.1
17+
src.generated=${build.out}/gensrc
618
standard.javac.source=1.5
719
standard.javac.target=1.5
8-
alt.javac.source=1.6
9-
alt.javac.target=1.6
10-
javac.out=${build.out}/classes
1120
test.javac.out=${build.out}/test/classes
1221
test.src.home=test/src
13-
sibling.codegen.dir=../rabbitmq-codegen/
14-
spec.version=0.9.1
15-
bundle.out=${build.out}/bundle
16-
javadoc.out=build/doc/api
17-
python.bin=python

build.xml

Lines changed: 89 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<project name="RabbitMQ Java client" default="build">
2+
<project name="RabbitMQ Java client" default="build"
3+
xmlns:bundlor="antlib:com.springsource.bundlor.ant">
34

45
<property file="build.properties"/>
56
<property file="config.properties"/>
@@ -45,14 +46,14 @@
4546
unless="amqp.generate.notRequired" description="generate AMQP.java and AMQImpl.java from AMQP spec">
4647
<mkdir dir="${src.generated}/com/rabbitmq/client/"/>
4748
<exec dir="." executable="${python.bin}"
48-
errorproperty="amqp.generate.error1"
49+
errorproperty="amqp.generate.error1"
4950
resultproperty="amqp.generate.result1">
5051
<arg line="codegen.py"/>
5152
<arg line="header"/>
5253
<arg line="${AMQP_SPEC_JSON_PATH}"/>
5354
<arg line="${src.generated}/com/rabbitmq/client/AMQP.java"/>
5455
</exec>
55-
<fail message="Generation of AMQP.java failed with message:${line.separator}${amqp.generate.error1}">
56+
<fail message="Generation of AMQP.java failed with message:${line.separator}${amqp.generate.error1}">
5657
<condition>
5758
<not>
5859
<equals arg1="${amqp.generate.result1}" arg2="0" />
@@ -68,28 +69,28 @@
6869
<arg line="${AMQP_SPEC_JSON_PATH}"/>
6970
<arg line="${src.generated}/com/rabbitmq/client/impl/AMQImpl.java"/>
7071
</exec>
71-
<fail message="Generation of AMQPImpl.java failed with message:${line.separator}${amqp.generate.error2}">
72-
<condition>
73-
<not>
74-
<equals arg1="${amqp.generate.result2}" arg2="0" />
75-
</not>
76-
</condition>
77-
</fail>
72+
<fail message="Generation of AMQPImpl.java failed with message:${line.separator}${amqp.generate.error2}">
73+
<condition>
74+
<not>
75+
<equals arg1="${amqp.generate.result2}" arg2="0" />
76+
</not>
77+
</condition>
78+
</fail>
7879
</target>
7980

8081
<target name="build" depends="amqp-generate" description="Build the client library.">
8182
<mkdir dir="${javac.out}"/>
8283
<copy file="src/com/rabbitmq/client/impl/ClientVersion.java.in"
83-
tofile="${src.generated}/com/rabbitmq/client/impl/ClientVersion.java">
84+
tofile="${src.generated}/com/rabbitmq/client/impl/ClientVersion.java">
8485
<filterset>
85-
<filter token="VERSION" value="${impl.version}"/>
86+
<filter token="VERSION" value="${impl.version}"/>
8687
</filterset>
8788
</copy>
8889
<javac destdir="${javac.out}"
89-
classpathref="javac.classpath"
90-
source="${standard.javac.source}"
91-
target="${standard.javac.target}"
92-
debug="${javac.debug}">
90+
classpathref="javac.classpath"
91+
source="${standard.javac.source}"
92+
target="${standard.javac.target}"
93+
debug="${javac.debug}">
9394
<src path="src"/>
9495
<src path="${src.generated}"/>
9596
</javac>
@@ -178,22 +179,22 @@
178179
</target>
179180

180181
<target name="test-prepare">
181-
<property name="haltOnFailureJunit" value="yes" />
182-
<property name="haltOnFailureJava" value="true" />
182+
<property name="haltOnFailureJunit" value="yes" />
183+
<property name="haltOnFailureJava" value="true" />
183184
</target>
184185

185186
<target name="test-build" depends="test-prepare">
186-
<antcall target="test-build-param">
187-
<param name="javac.source" value="${standard.javac.source}"/>
188-
<param name="javac.target" value="${standard.javac.target}"/>
189-
</antcall>
187+
<antcall target="test-build-param">
188+
<param name="javac.source" value="${standard.javac.source}"/>
189+
<param name="javac.target" value="${standard.javac.target}"/>
190+
</antcall>
190191
</target>
191192

192193
<target name="test-build-alt" depends="test-prepare">
193-
<antcall target="test-build-param">
194-
<param name="javac.source" value="${alt.javac.source}"/>
195-
<param name="javac.target" value="${alt.javac.target}"/>
196-
</antcall>
194+
<antcall target="test-build-param">
195+
<param name="javac.source" value="${alt.javac.source}"/>
196+
<param name="javac.target" value="${alt.javac.target}"/>
197+
</antcall>
197198
</target>
198199

199200
<!-- Used to rebuild the tests every time, ( dependency on clean-tests )
@@ -298,18 +299,18 @@
298299
</target>
299300

300301
<target name="test-suite-prepare">
301-
<property name="haltOnFailureJunit" value="no" />
302-
<property name="haltOnFailureJava" value="false" />
302+
<property name="haltOnFailureJunit" value="no" />
303+
<property name="haltOnFailureJava" value="false" />
303304
</target>
304305

305306
<target name="test-suite" depends="test-suite-prepare, test-suite-run" description="Run all test suites.">
306-
<fail message="Errors occured in tests">
307-
<condition>
308-
<not>
309-
<equals arg1="${test.failure}" arg2="" />
310-
</not>
311-
</condition>
312-
</fail>
307+
<fail message="Errors occured in tests">
308+
<condition>
309+
<not>
310+
<equals arg1="${test.failure}" arg2="" />
311+
</not>
312+
</condition>
313+
</fail>
313314
</target>
314315

315316
<target name="test-suite-run" depends="test-client, test-ssl, test-server, test-functional, test-main-silent"/>
@@ -386,7 +387,7 @@
386387
</junit>
387388
</target>
388389

389-
<target name="jar" depends="build">
390+
<target name="jar" depends="build, bundlor.do">
390391
<mkdir dir="${lib.out}"/>
391392
<antcall target="doJarWithTags">
392393
<param name="jar.name" value="rabbitmq-client"/>
@@ -410,41 +411,42 @@
410411
token="VERSION" value="${impl.version}"/>
411412
</target>
412413

413-
<target name="test-jar" depends="test-build">
414+
<target name="test-jar" depends="test-build, test-bundlor.do">
414415
<mkdir dir="${lib.out}"/>
415416
<antcall target="doJarWithTags">
416417
<param name="jar.name" value="rabbitmq-client-tests"/>
417418
<param name="base" value="${test.javac.out}"/>
418419
</antcall>
419420
</target>
420-
421-
<target name="doJarWithTags">
422-
<jar destfile="${lib.out}/${jar.name}.jar"
423-
basedir="${base}">
424-
<manifest>
425-
<section name="${jar.name}">
426-
<attribute name="Specification-Title" value="AMQP"/>
427-
<attribute name="Specification-Version" value="${spec.version}"/>
428-
<attribute name="Specification-Vendor" value="AMQP Working Group (www.amqp.org)"/>
429-
<attribute name="Implementation-Title" value="RabbitMQ"/>
430-
<attribute name="Implementation-Version" value="${impl.version}"/>
431-
<attribute name="Implementation-Vendor" value="Rabbit Technologies Ltd. (www.rabbitmq.com)"/>
432-
</section>
433-
</manifest>
434-
</jar>
435-
</target>
421+
422+
<target name="doJarWithTags">
423+
<jar destfile="${lib.out}/${jar.name}.jar"
424+
basedir="${base}"
425+
filesetmanifest="merge">
426+
<manifest>
427+
<section name="${jar.name}">
428+
<attribute name="Specification-Title" value="AMQP"/>
429+
<attribute name="Specification-Version" value="${spec.version}"/>
430+
<attribute name="Specification-Vendor" value="AMQP Working Group (www.amqp.org)"/>
431+
<attribute name="Implementation-Title" value="RabbitMQ"/>
432+
<attribute name="Implementation-Version" value="${impl.version}"/>
433+
<attribute name="Implementation-Vendor" value="Rabbit Technologies Ltd. (www.rabbitmq.com)"/>
434+
</section>
435+
</manifest>
436+
</jar>
437+
</target>
436438

437439
<target name="dist" depends="jar, test-jar">
438440
<mkdir dir="${dist.out}"/>
439441
<copy todir="${dist.out}">
440442
<!-- ant doesn't seem to provide any form of usable abstraction over sets of file names -->
441443
<!-- consequently we repeat ourselves here. see definition of javac.classpath, supra -->
442444
<fileset dir="lib">
443-
<include name="**/*.jar"/>
445+
<include name="**/*.jar"/>
444446
</fileset>
445447

446448
<fileset dir="${lib.out}">
447-
<include name="**/*.jar"/>
449+
<include name="**/*.jar"/>
448450
</fileset>
449451

450452
<fileset dir="scripts">
@@ -461,4 +463,36 @@
461463
<target name="clean-tests">
462464
<delete dir="build/test"/>
463465
</target>
466+
467+
<target name="bundlor.init">
468+
<taskdef resource="com/springsource/bundlor/ant/antlib.xml"
469+
uri="antlib:com.springsource.bundlor.ant">
470+
<classpath id="bundlor.classpath">
471+
<fileset dir="${bundlor.home}/dist"/>
472+
<fileset dir="${bundlor.home}/lib"/>
473+
</classpath>
474+
</taskdef>
475+
</target>
476+
477+
<target name="bundlor.do" depends="bundlor.init">
478+
<bundlor:bundlor
479+
inputPath="${javac.out}"
480+
outputPath="${javac.out}"
481+
manifestTemplatePath="bundlorTemplate.mf">
482+
<propertyset>
483+
<propertyref builtin="all"/>
484+
</propertyset>
485+
</bundlor:bundlor>
486+
</target>
487+
488+
<target name="test-bundlor.do" depends="bundlor.init">
489+
<bundlor:bundlor
490+
inputPath="${test.javac.out}"
491+
outputPath="${test.javac.out}"
492+
manifestTemplatePath="bundlorTestTemplate.mf">
493+
<propertyset>
494+
<propertyref builtin="all"/>
495+
</propertyset>
496+
</bundlor:bundlor>
497+
</target>
464498
</project>
131 KB
Binary file not shown.
16.6 KB
Binary file not shown.
13.3 KB
Binary file not shown.
Binary file not shown.
40.6 KB
Binary file not shown.
42.5 KB
Binary file not shown.
32.5 KB
Binary file not shown.
22 KB
Binary file not shown.

0 commit comments

Comments
 (0)