summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-05-08 22:52:34 +0000
committerRobert Gemmell <robbie@apache.org>2012-05-08 22:52:34 +0000
commit3f4c8d1af2f7971fbd77c3f343c6d58e3ad4935a (patch)
tree81e656f2ebbed24a9a2f54cae84c8b11d5465019
parentc75c403ccc3bd68d5f3d5bd2365ff85f9231bebe (diff)
downloadqpid-python-3f4c8d1af2f7971fbd77c3f343c6d58e3ad4935a.tar.gz
NO-JIRA: update use of Ivy to download dependencies
- Retrieve the mandatory dependencies into a 'required' subdir to allow turning on sync mode during retrieval - Lay groundwork for multiple retrieval confs to support retrieving optional dependencies in similar fashion on request git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/dep_removal@1335808 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/build.deps50
-rw-r--r--qpid/java/common.xml24
-rw-r--r--qpid/java/common/build.xml2
-rw-r--r--qpid/java/ivy.retrieve.xml4
-rw-r--r--qpid/java/module.xml6
5 files changed, 45 insertions, 41 deletions
diff --git a/qpid/java/build.deps b/qpid/java/build.deps
index 168e38ccf9..cb32c2a801 100644
--- a/qpid/java/build.deps
+++ b/qpid/java/build.deps
@@ -17,42 +17,42 @@
# under the License.
#
-commons-beanutils-core=lib/commons-beanutils-core-1.8.0.jar
-commons-cli=lib/commons-cli-1.0.jar
-commons-codec=lib/commons-codec-1.3.jar
-commons-collections=lib/commons-collections-3.2.jar
-commons-configuration=lib/commons-configuration-1.6.jar
-commons-digester=lib/commons-digester-1.8.1.jar
-commons-lang=lib/commons-lang-2.2.jar
-commons-logging=lib/commons-logging-1.0.4.jar
+commons-beanutils-core=lib/required/commons-beanutils-core-1.8.0.jar
+commons-cli=lib/required/commons-cli-1.0.jar
+commons-codec=lib/required/commons-codec-1.3.jar
+commons-collections=lib/required/commons-collections-3.2.jar
+commons-configuration=lib/required/commons-configuration-1.6.jar
+commons-digester=lib/required/commons-digester-1.8.1.jar
+commons-lang=lib/required/commons-lang-2.2.jar
+commons-logging=lib/required/commons-logging-1.0.4.jar
-derby-db=lib/derby-10.6.1.0.jar
+derby-db=lib/required/derby-10.6.1.0.jar
-geronimo-jms=lib/geronimo-jms_1.1_spec-1.0.jar
-geronimo-j2ee=lib/geronimo-j2ee-connector_1.5_spec-2.0.0.jar
-geronimo-jta=lib/geronimo-jta_1.1_spec-1.1.1.jar
-geronimo-kernel=lib/geronimo-kernel-2.2.1.jar
-geronimo-openejb=lib/geronimo-ejb_3.0_spec-1.0.1.jar
-geronimo-servlet=lib/geronimo-servlet_2.5_spec-1.2.jar
+geronimo-jms=lib/required/geronimo-jms_1.1_spec-1.0.jar
+geronimo-j2ee=lib/required/geronimo-j2ee-connector_1.5_spec-2.0.0.jar
+geronimo-jta=lib/required/geronimo-jta_1.1_spec-1.1.1.jar
+geronimo-kernel=lib/required/geronimo-kernel-2.2.1.jar
+geronimo-openejb=lib/required/geronimo-ejb_3.0_spec-1.0.1.jar
+geronimo-servlet=lib/required/geronimo-servlet_2.5_spec-1.2.jar
-junit=lib/junit-3.8.1.jar
-mockito-all=lib/mockito-all-1.9.0.jar
+junit=lib/required/junit-3.8.1.jar
+mockito-all=lib/required/mockito-all-1.9.0.jar
-gson-all=lib/gson-2.0.jar
+gson-all=lib/required/gson-2.0.jar
-log4j=lib/log4j-1.2.12.jar
+log4j=lib/required/log4j-1.2.12.jar
-slf4j-api=lib/slf4j-api-1.6.1.jar
-slf4j-log4j=lib/slf4j-log4j12-1.6.1.jar
+slf4j-api=lib/required/slf4j-api-1.6.1.jar
+slf4j-log4j=lib/required/slf4j-log4j12-1.6.1.jar
-xalan=lib/xalan-2.7.0.jar
+xalan=lib/required/xalan-2.7.0.jar
-felix-main=lib/org.apache.felix.main-2.0.5.jar
+felix-main=lib/required/org.apache.felix.main-2.0.5.jar
felix.libs=${felix-main}
-jackson-core=lib/jackson-core-asl-1.9.0.jar
-jackson-mapper=lib/jackson-mapper-asl-1.9.0.jar
+jackson-core=lib/required/jackson-core-asl-1.9.0.jar
+jackson-mapper=lib/required/jackson-mapper-asl-1.9.0.jar
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
diff --git a/qpid/java/common.xml b/qpid/java/common.xml
index 1ce5db04f3..d602f6b367 100644
--- a/qpid/java/common.xml
+++ b/qpid/java/common.xml
@@ -105,15 +105,13 @@
<property name="ivy.jar.url" value="${ivy.repo.url}/${ivy.install.version}/ivy-${ivy.install.version}.jar"/>
<available property="ivy.jar.file.exists" file="${ivy.jar.file}"/>
+ <property name="retrieve.dependencies" value="true" />
<condition property="dont.download.ivy">
<!-- Set prop to stop Ivy download if asked not to retrieve
the dependencies, or the ivy jar is already present -->
<or>
- <and>
- <isset property="retrieve.dependencies"/>
- <isfalse value="${retrieve.dependencies}"/>
- </and>
+ <isfalse value="${retrieve.dependencies}"/>
<and>
<isset property="ivy.jar.file.exists"/>
<istrue value="${ivy.jar.file.exists}"/>
@@ -122,10 +120,7 @@
</condition>
<condition property="ivy.dont.retrieve">
- <and>
- <isset property="retrieve.dependencies"/>
- <isfalse value="${retrieve.dependencies}"/>
- </and>
+ <isfalse value="${retrieve.dependencies}"/>
</condition>
@@ -180,7 +175,7 @@
<attribute name="path"/>
<element name="args"/>
<sequential>
- <java jar="${project.root}/lib/jython-standalone-2.5.2.jar" fork="true" failonerror="true">
+ <java jar="${project.root}/lib/required/jython-standalone-2.5.2.jar" fork="true" failonerror="true">
<arg value="-Dpython.path=@{path}"/>
<args/>
</java>
@@ -262,11 +257,16 @@
<!-- targets for downloading ivy and retrieving dependencies -->
- <target name="retrieve-dependencies" depends="load-ivy" unless="${ivy.dont.retrieve}">
+ <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: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:resolve type="jar,bundle" file="ivy.retrieve.xml"/>
- <ivy:retrieve type="jar,bundle"/>
+ <property name="ivy.configured" value="true" />
</target>
<target name="load-ivy" depends="download-ivy" unless="${ivy.dont.retrieve}">
diff --git a/qpid/java/common/build.xml b/qpid/java/common/build.xml
index 4cb565ca42..a78d6c4133 100644
--- a/qpid/java/common/build.xml
+++ b/qpid/java/common/build.xml
@@ -99,7 +99,7 @@ public class QpidBuildVersion
<target name="jms-selector">
<copy tofile="${module.build}/javacc.jar" failonerror="true">
- <fileset dir="${project.root}/lib">
+ <fileset dir="${project.root}/lib/required">
<include name="javacc-*.jar"/>
</fileset>
</copy>
diff --git a/qpid/java/ivy.retrieve.xml b/qpid/java/ivy.retrieve.xml
index 6b7d1dfa18..3ce1e3b837 100644
--- a/qpid/java/ivy.retrieve.xml
+++ b/qpid/java/ivy.retrieve.xml
@@ -20,6 +20,10 @@
<info organisation="${ivy.organisation}" module="${project.name}" revision="${project.version}"/>
+ <configurations defaultconf="required" defaultconfmapping="required->default">
+ <conf name="required"/>
+ </configurations>
+
<publications xmlns:e="urn:ant.apache.org:ivy-extras"/>
<dependencies>
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index 1aea77b488..b07a9cc35e 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -22,7 +22,7 @@
<import file="common.xml"/>
- <path id="maven-ant-tasks.classpath" path="${project.root}/lib/maven-ant-tasks-2.1.1.jar" />
+ <path id="maven-ant-tasks.classpath" path="${project.root}/lib/required/maven-ant-tasks-2.1.1.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
@@ -599,7 +599,7 @@
<target name="bundle" description="Build module osgi artifact. Override and depend on bundle-tasks to use"/>
<target name="bundle-tasks" depends="jar">
- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${project.root}/lib/bnd-0.0.384.jar"/>
+ <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${project.root}/lib/required/bnd-0.0.384.jar"/>
<echo message="Bundling ${build}/lib/${module.namever}.jar with ${module.src}/${module.name}.bnd"/>
<bnd
classpath="${build}/lib/${module.namever}.jar"
@@ -809,7 +809,7 @@ qpid.name=${project.name}
<classpath>
<pathelement path="${module.src}"/>
<pathelement path="${velocity.compile.dir}" />
- <fileset dir="${project.root}/lib">
+ <fileset dir="${project.root}/lib/required">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${gentools.home}/lib/velocity-1.4.jar" />