summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-05-09 23:12:09 +0000
committerRobert Gemmell <robbie@apache.org>2012-05-09 23:12:09 +0000
commit02211eec53965b7325db89396859e4c381dd49f2 (patch)
treea0751074120916f090b054dab4b8d2b7b2fffc7b
parentc8141594693b493b921d31367ec5e156b65d3a44 (diff)
downloadqpid-python-02211eec53965b7325db89396859e4c381dd49f2.tar.gz
NO-JIRA: move the optional bdbstore module dependency over to being downloaded using Ivy, add -Doptional.dependencies=true flag for use in triggering all optional dep downloads at once in future
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/dep_removal@1336445 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/bdbstore/build.xml21
-rw-r--r--qpid/java/common.xml5
-rw-r--r--qpid/java/ivy.retrieve.xml8
-rw-r--r--qpid/java/ivysettings.retrieve.xml5
-rw-r--r--qpid/java/lib/bdbstore/README.txt14
5 files changed, 29 insertions, 24 deletions
diff --git a/qpid/java/bdbstore/build.xml b/qpid/java/bdbstore/build.xml
index 7e55b41b28..54f2d8dbc4 100644
--- a/qpid/java/bdbstore/build.xml
+++ b/qpid/java/bdbstore/build.xml
@@ -16,7 +16,7 @@
- specific language governing permissions and limitations
- under the License.
-->
-<project name="bdbstore" default="build">
+<project name="bdbstore" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
<property name="module.depends" value="common broker" />
<property name="module.test.depends" value="test client common/test broker/test management/common systests" />
<property name="module.genpom" value="true"/>
@@ -25,9 +25,15 @@
<property name="bdb.lib.dir" value="${project.root}/lib/bdbstore" />
<property name="bdb.version" value="5.0.34" />
- <property name="bdb.download.url" value="http://download.oracle.com/maven/com/sleepycat/je/${bdb.version}/je-${bdb.version}.jar" />
<property name="bdb.jar.file" value="${bdb.lib.dir}/je-${bdb.version}.jar" />
+ <condition property="download.bdb.jar">
+ <or>
+ <istrue value="${download-bdb}"/>
+ <istrue value="${optional.dependencies}"/>
+ </or>
+ </condition>
+
<!--check whether the BDB jar is present, possibly after download-->
<target name="check-bdb-jar">
<available file="${bdb.jar.file}" type="file" property="bdb.jar.available"/>
@@ -61,15 +67,16 @@ http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-0868
</target>
<!--check if an inline BDB download was requested with the build-->
- <target name="check-request-props" if="download-bdb">
+ <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">
- <mkdir dir="${bdb.lib.dir}"/>
- <echo>Downloading BDB JE</echo>
- <get src="${bdb.download.url}" dest="${bdb.jar.file}" usetimestamp="true" />
+ <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" />
diff --git a/qpid/java/common.xml b/qpid/java/common.xml
index d602f6b367..3626f4cfea 100644
--- a/qpid/java/common.xml
+++ b/qpid/java/common.xml
@@ -106,6 +106,7 @@
<available property="ivy.jar.file.exists" file="${ivy.jar.file}"/>
<property name="retrieve.dependencies" value="true" />
+ <property name="optional.dependencies" value="false" />
<condition property="dont.download.ivy">
<!-- Set prop to stop Ivy download if asked not to retrieve
@@ -259,13 +260,13 @@
<!-- targets for downloading ivy and retrieving dependencies -->
<target name="retrieve-dependencies" depends="load-ivy, configure-ivy" unless="${ivy.dont.retrieve}">
<echo message="Resolving and retrieving dependencies..."/>
- <ivy:resolve type="jar,bundle" file="ivy.retrieve.xml" conf="required"/>
+ <ivy:resolve type="jar,bundle" file="${project.root}/ivy.retrieve.xml" conf="required"/>
<ivy:retrieve type="jar,bundle" conf="required" sync="true"
pattern="${project.root}/lib/required/[artifact]-[revision].[ext]" />
</target>
<target name="configure-ivy" unless="${ivy.configured}">
- <ivy:configure file="ivysettings.retrieve.xml"/>
+ <ivy:configure file="${project.root}/ivysettings.retrieve.xml" override="true"/>
<property name="ivy.configured" value="true" />
</target>
diff --git a/qpid/java/ivy.retrieve.xml b/qpid/java/ivy.retrieve.xml
index de72c9614b..609d773c21 100644
--- a/qpid/java/ivy.retrieve.xml
+++ b/qpid/java/ivy.retrieve.xml
@@ -20,8 +20,9 @@
<info organisation="${ivy.organisation}" module="${project.name}" revision="${project.version}"/>
- <configurations defaultconf="required" defaultconfmapping="required->default">
+ <configurations defaultconf="required" defaultconfmapping="required->default;bdbje->default">
<conf name="required"/>
+ <conf name="bdbje"/>
</configurations>
<publications xmlns:e="urn:ant.apache.org:ivy-extras"/>
@@ -56,5 +57,10 @@
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.4" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.4" transitive="false"/>
<dependency org="xalan" name="xalan" rev="2.7.0" transitive="false"/>
+
+ <!-- The following are optional dependencies, for modules providing optional functionlity or
+ for use in optional build/test steps. Their optional status is usually indicative of licences
+ which are not compatible with the Apache Licence -->
+ <dependency org="com.sleepycat" name="je" rev="5.0.34" transitive="false" conf="bdbje"/>
</dependencies>
</ivy-module>
diff --git a/qpid/java/ivysettings.retrieve.xml b/qpid/java/ivysettings.retrieve.xml
index 2918a60fb6..aead12935a 100644
--- a/qpid/java/ivysettings.retrieve.xml
+++ b/qpid/java/ivysettings.retrieve.xml
@@ -30,10 +30,15 @@
<artifact pattern="${ivy.m2repo.url}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</url>
+ <url name="oracle" m2compatible="true">
+ <artifact pattern="http://download.oracle.com/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
+ </url>
+
<ibiblio name="public" m2compatible="true"/>
<chain name="chain" returnFirst="true">
<resolver ref="m2repo"/>
+ <resolver ref="oracle"/>
<resolver ref="public"/>
</chain>
</resolvers>
diff --git a/qpid/java/lib/bdbstore/README.txt b/qpid/java/lib/bdbstore/README.txt
deleted file mode 100644
index 80adb199bf..0000000000
--- a/qpid/java/lib/bdbstore/README.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-The BDB JE jar must be downloaded into this directory in order to allow the optional bdbstore module to be built against it.
-
-*NOTE* The BDB JE library is licensed under the Sleepycat Licence [1], which is not compatible with the Apache Lience v2.0. As a result, the BDB JE library is not distributed with the project, and the optional bdbstore module is not compiled by default.
-
-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
-
-
-[1] http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html