summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-05-13 13:15:31 +0000
committerRobert Gemmell <robbie@apache.org>2012-05-13 13:15:31 +0000
commitbac0ec284c39cef7f55562a97e9f982f11e8a7fd (patch)
tree63c840f3ee1aaa5395fb113c4b83c542f51b883f
parent579039c2ed9eaaebadaa49a6fc0e6d63b174ccfb (diff)
downloadqpid-python-bac0ec284c39cef7f55562a97e9f982f11e8a7fd.tar.gz
QPID-3994: update the optional download of Cobertura to be performed using Ivy
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1337869 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/common.xml37
-rw-r--r--qpid/java/ivy.retrieve.xml4
-rw-r--r--qpid/java/lib/cobertura/README.txt9
3 files changed, 14 insertions, 36 deletions
diff --git a/qpid/java/common.xml b/qpid/java/common.xml
index 319ca4c06d..0f7117e3f0 100644
--- a/qpid/java/common.xml
+++ b/qpid/java/common.xml
@@ -62,10 +62,12 @@
<property name="cobertura.dir" value="${project.root}/lib/cobertura" />
<property name="cobertura.version" value="1.9.4.1" />
- <property name="cobertura.download.url"
- value="http://downloads.sourceforge.net/project/cobertura/cobertura/${cobertura.version}/cobertura-${cobertura.version}-bin.zip" />
- <property name="cobertura.zip.filename" value="cobertura-${cobertura.version}-bin.zip" />
- <property name="cobertura.temp.dir" value="${cobertura.dir}"/>
+
+ <path id="cobertura.classpath">
+ <fileset dir="${cobertura.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
<property name="mllib.dir" value="${project.root}/../python" />
<property name="findbugs.dir" value="${project.root}/lib/findbugs" />
@@ -75,13 +77,6 @@
<property name="eclipse.compilercompliance" value="5.0"/>
<property name="eclipse.container" value="JVM 1.5"/>
- <path id="cobertura.classpath">
- <fileset dir="${cobertura.dir}">
- <include name="cobertura-${cobertura.version}/*.jar" />
- <include name="cobertura-${cobertura.version}/**/lib/*.jar" />
- </fileset>
- </path>
-
<!-- properties for generating the maven artifacts -->
<property name="maven.local.repo" value="${build.scratch}/maven-local-repo"/>
<property name="maven.settings.xml" value="${project.root}/maven-settings.xml"/>
@@ -257,22 +252,6 @@
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
</target>
- <!--download Cobertura jar and expand-->
- <target name="download-cobertura" description="download Cobertura if not already present" depends="cobertura-check" unless="cobertura.already.exists">
- <mkdir dir="${cobertura.dir}"/>
- <echo>Downloading Cobertura ${cobertura.version}</echo>
- <get src="${cobertura.download.url}" dest="${cobertura.temp.dir}/${cobertura.zip.filename}" usetimestamp="false" />
- <echo>Extracting Cobertura JAR and dependencies</echo>
- <unzip src="${cobertura.temp.dir}/${cobertura.zip.filename}" dest="${cobertura.dir}"/>
- <echo>Cleanup Cobertura Download</echo>
- <delete file="${cobertura.temp.dir}/${cobertura.zip.filename}"/>
- <echo>Done</echo>
- </target>
-
- <target name="cobertura-check">
- <available property="cobertura.already.exists" file="${cobertura.dir}/cobertura-${cobertura.version}" type="dir"/>
- </target>
-
<target name="findbugs-init">
<mkdir dir="${findbugs.dir}"/>
@@ -305,6 +284,10 @@
<ivy:resolve type="jar" file="${project.root}/ivy.retrieve.xml" conf="findbugs"/>
<ivy:retrieve type="jar" conf="findbugs" sync="true"
pattern="${findbugs.dir}/[artifact]-[revision].[ext]" />
+
+ <ivy:resolve type="jar" file="${project.root}/ivy.retrieve.xml" conf="cobertura"/>
+ <ivy:retrieve type="jar" conf="cobertura" sync="true"
+ pattern="${cobertura.dir}/[artifact]-[revision].[ext]" />
</target>
diff --git a/qpid/java/ivy.retrieve.xml b/qpid/java/ivy.retrieve.xml
index b2bd94bf6e..57543be07a 100644
--- a/qpid/java/ivy.retrieve.xml
+++ b/qpid/java/ivy.retrieve.xml
@@ -26,6 +26,7 @@
<conf name="jfree"/>
<conf name="csvjdbc"/>
<conf name="findbugs"/>
+ <conf name="cobertura"/>
</configurations>
<publications xmlns:e="urn:ant.apache.org:ivy-extras"/>
@@ -69,5 +70,8 @@
<dependency org="jfree" name="jcommon" rev="1.0.16" transitive="false" conf="jfree"/>
<dependency org="net.sourceforge.csvjdbc" name="csvjdbc" rev="1.0.8" transitive="false" conf="csvjdbc"/>
<dependency org="com.google.code.findbugs" name="findbugs-ant" rev="2.0.0" conf="findbugs"/>
+ <dependency org="net.sourceforge.cobertura" name="cobertura" rev="1.9.4.1" conf="cobertura">
+ <exclude org="org.apache.ant"/>
+ </dependency>
</dependencies>
</ivy-module>
diff --git a/qpid/java/lib/cobertura/README.txt b/qpid/java/lib/cobertura/README.txt
deleted file mode 100644
index 080bb5f2f3..0000000000
--- a/qpid/java/lib/cobertura/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Download the cobertura binary from the following location and expand it into
-this directory.
-
-http://cobertura.sourceforge.net/download.html
-
-Alternatively run "ant download-cobertura" to do this automatically.
-(to set a http proxy for ant use ANT_OPTS="-Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port>")
-
-Run "ant cover-test coverage-report" to generate coverage report.