You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/05/10 01:12:09 UTC

svn commit: r1336445 - in /qpid/branches/dep_removal/qpid/java: bdbstore/build.xml common.xml ivy.retrieve.xml ivysettings.retrieve.xml lib/ lib/bdbstore/

Author: robbie
Date: Wed May  9 23:12:09 2012
New Revision: 1336445

URL: http://svn.apache.org/viewvc?rev=1336445&view=rev
Log:
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

Removed:
    qpid/branches/dep_removal/qpid/java/lib/bdbstore/
Modified:
    qpid/branches/dep_removal/qpid/java/bdbstore/build.xml
    qpid/branches/dep_removal/qpid/java/common.xml
    qpid/branches/dep_removal/qpid/java/ivy.retrieve.xml
    qpid/branches/dep_removal/qpid/java/ivysettings.retrieve.xml
    qpid/branches/dep_removal/qpid/java/lib/   (props changed)

Modified: qpid/branches/dep_removal/qpid/java/bdbstore/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/dep_removal/qpid/java/bdbstore/build.xml?rev=1336445&r1=1336444&r2=1336445&view=diff
==============================================================================
--- qpid/branches/dep_removal/qpid/java/bdbstore/build.xml (original)
+++ qpid/branches/dep_removal/qpid/java/bdbstore/build.xml Wed May  9 23:12:09 2012
@@ -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/databa
     </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" />

Modified: qpid/branches/dep_removal/qpid/java/common.xml
URL: http://svn.apache.org/viewvc/qpid/branches/dep_removal/qpid/java/common.xml?rev=1336445&r1=1336444&r2=1336445&view=diff
==============================================================================
--- qpid/branches/dep_removal/qpid/java/common.xml (original)
+++ qpid/branches/dep_removal/qpid/java/common.xml Wed May  9 23:12:09 2012
@@ -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>
 

Modified: qpid/branches/dep_removal/qpid/java/ivy.retrieve.xml
URL: http://svn.apache.org/viewvc/qpid/branches/dep_removal/qpid/java/ivy.retrieve.xml?rev=1336445&r1=1336444&r2=1336445&view=diff
==============================================================================
--- qpid/branches/dep_removal/qpid/java/ivy.retrieve.xml (original)
+++ qpid/branches/dep_removal/qpid/java/ivy.retrieve.xml Wed May  9 23:12:09 2012
@@ -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>

Modified: qpid/branches/dep_removal/qpid/java/ivysettings.retrieve.xml
URL: http://svn.apache.org/viewvc/qpid/branches/dep_removal/qpid/java/ivysettings.retrieve.xml?rev=1336445&r1=1336444&r2=1336445&view=diff
==============================================================================
--- qpid/branches/dep_removal/qpid/java/ivysettings.retrieve.xml (original)
+++ qpid/branches/dep_removal/qpid/java/ivysettings.retrieve.xml Wed May  9 23:12:09 2012
@@ -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>

Propchange: qpid/branches/dep_removal/qpid/java/lib/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed May  9 23:12:09 2012
@@ -1,2 +1,3 @@
 *.jar
 required
+bdbstore



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org