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
|
<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-->
<project name="bdbstore" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
<property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol" />
<property name="module.test.depends" value="client qpid-test-utils broker-core/tests management/common systests broker-plugins/management-jmx broker-plugins/memory-store broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-plugins/amqp-msg-conv-0-8-to-0-10" />
<property name="module.genpom" value="true"/>
<property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker-core=provided -Sqpid-broker-plugins-amqp-0-8-protocol=provided -Sje=provided"/>
<property name="broker.plugin" value="true"/>
<import file="../module.xml" />
<condition property="download.bdb.jar">
<or>
<istrue value="${download-bdb}"/>
<istrue value="${optional.dependencies}"/>
<istrue value="${optional}"/>
</or>
</condition>
<!--check whether the BDB jar is present, possibly after download-->
<target name="check-bdb-jar">
<available file="${project.root}/${bdb-je}" type="file" property="bdb.jar.available"/>
</target>
<!--echo that BDB is required if it isnt present, with associated licencing note-->
<target name="bdb-jar-required" depends="bdb-licence-note-optional" unless="bdb.jar.available">
<echo>The BDB JE library is required to use this optional module.
The jar file may be downloaded by either:
Seperately running the following command from the qpid/java/bdbstore dir: ant download-bdb
OR
Adding -Ddownload-bdb=true to your regular build command.</echo>
<fail>The BDB JE library was not found</fail>
</target>
<!--issue BDB licencing note if BDB isnt already present-->
<target name="bdb-licence-note-optional" depends="check-bdb-jar" unless="bdb.jar.available">
<antcall target="bdb-licence-note"/>
</target>
<!--issue BDB licencing note-->
<target name="bdb-licence-note">
<echo>*NOTE* The BDB JE library required by this optional module is licensed under the Sleepycat Licence, which is not compatible with the Apache Licence v2.0.
For a copy of the Sleepycat Licence, please see:
http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html</echo>
</target>
<!--check if an inline BDB download was requested with the build-->
<target name="check-request-props" if="download.bdb.jar">
<antcall target="download-bdb"/>
</target>
<!--download BDB, with licencing note-->
<target name="download-bdb" depends="bdb-licence-note, load-ivy, configure-ivy" unless="${ivy.dont.retrieve}">
<echo message="Resolving and retrieving dependencies..."/>
<ivy:resolve type="jar,bundle" file="${project.root}/ivy.retrieve.xml" conf="bdbje"/>
<ivy:retrieve type="jar,bundle" conf="bdbje" sync="true"
pattern="${project.root}/lib/bdbstore/[artifact]-[revision].[ext]" />
</target>
<target name="build" depends="check-request-props, bdb-jar-required, module.build" />
<!-- Overrides, target in module.xml -->
<target name="copy-broker-plugin-jars-deps" if="broker.plugin" description="copy broker plugins dependencies for use in release packaging">
<!-- NO-OP, we explicitly do not want to copy the dependencies for this optional functionality as we can't distribute them -->
</target>
</project>
|