[cobertura] 08/19: Build with Maven instead of Ant

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Sep 27 08:13:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository cobertura.

commit ef24d3c02f771ef02d3fc60943097bc4f02d2d69
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Sep 27 01:04:52 2017 +0200

    Build with Maven instead of Ant
---
 debian/ant.properties                         |  4 ---
 debian/changelog                              |  4 ++-
 debian/classpath-debian                       |  5 ---
 debian/clean                                  |  4 ---
 debian/cobertura-runtime.pom                  | 44 -----------------------
 debian/cobertura.pom                          | 50 ---------------------------
 debian/control                                | 37 +++++++++-----------
 debian/libcobertura-java.jlibs                |  1 -
 debian/libcobertura-java.poms                 | 15 ++++++++
 debian/maven.ignoreRules                      | 21 +++++++++++
 debian/maven.properties                       |  6 ++++
 debian/maven.rules                            |  6 +++-
 debian/patches/add_classpath_to_manifest.diff | 12 -------
 debian/patches/build_with_system_jars.diff    | 35 -------------------
 debian/patches/series                         |  2 --
 debian/rules                                  | 27 ++-------------
 16 files changed, 69 insertions(+), 204 deletions(-)

diff --git a/debian/ant.properties b/debian/ant.properties
deleted file mode 100644
index c1d99c1..0000000
--- a/debian/ant.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ensure that source and target are 1.5
-# For backwards compat on Java 7
-ant.build.javac.source=1.5
-ant.build.javac.target=1.5
diff --git a/debian/changelog b/debian/changelog
index 747f362..bacf684 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-cobertura (1.9.4.1+dfsg-5) UNRELEASED; urgency=medium
+cobertura (2.1.1-1) UNRELEASED; urgency=medium
 
   * Team upload.
 
@@ -12,6 +12,8 @@ cobertura (1.9.4.1+dfsg-5) UNRELEASED; urgency=medium
   * Wrap and sort dependency lists.
 
   [ Emmanuel Bourg ]
+  * New upstream release
+    - Build with Maven instead of Ant
   * Modified the watch file to catch the old releases
   * Standards-Version updated to 4.1.0
   * Removed the -java-doc package
diff --git a/debian/classpath-debian b/debian/classpath-debian
deleted file mode 100644
index 07901c7..0000000
--- a/debian/classpath-debian
+++ /dev/null
@@ -1,5 +0,0 @@
-usr/share/java/asm3.jar
-usr/share/java/asm3-tree.jar
-usr/share/java/oro.jar
-usr/share/java/log4j-1.2.jar
-usr/share/java/servlet-api-3.1.jar
diff --git a/debian/clean b/debian/clean
index e3b0a5b..f7e585b 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,5 +1 @@
-*.tar.bz2
-*.tar.gz
-*.zip
-cobertura.jar
 *.1
diff --git a/debian/cobertura-runtime.pom b/debian/cobertura-runtime.pom
deleted file mode 100644
index bcbc996..0000000
--- a/debian/cobertura-runtime.pom
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" ?>
-<project>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>net.sourceforge.cobertura</groupId>
-  <artifactId>cobertura-runtime</artifactId>
-  <name>Cobertura :: Limited Runtime</name>
-  <version>1.9.4.1</version>
-  <packaging>pom</packaging>
-  <description>
-    Cobertura Runtime artifact to prevent unneeded dependencies at runtime.
-  </description>
-  <licenses>
-    <license>
-      <name>The GNU General Public License, Version 2</name>
-      <url>http://www.gnu.org/licenses/gpl.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-  <dependencies>
-    <dependency>
-      <groupId>net.sourceforge.cobertura</groupId>
-      <artifactId>cobertura</artifactId>
-      <version>1.9.4.1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>oro</groupId>
-          <artifactId>oro</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>asm</groupId>
-          <artifactId>asm</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>asm</groupId>
-          <artifactId>asm-tree</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/debian/cobertura.pom b/debian/cobertura.pom
deleted file mode 100644
index bb0d344..0000000
--- a/debian/cobertura.pom
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" ?>
-<project>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>net.sourceforge.cobertura</groupId>
-  <artifactId>cobertura</artifactId>
-  <version>1.9.4.1</version>
-  <name>Cobertura</name>
-  <description>
-    Cobertura is a free Java tool that calculates the percentage of code accessed by tests.
-    It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.
-  </description>
-  <url>http://cobertura.sourceforge.net</url>
-  <licenses>
-    <license>
-      <name>The GNU General Public License, Version 2</name>
-      <url>http://www.gnu.org/licenses/gpl.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-  <dependencies>
-    <dependency>
-      <groupId>oro</groupId>
-      <artifactId>oro</artifactId>
-      <version>2.0.8</version>
-    </dependency>
-    <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm</artifactId>
-      <version>3.2</version>
-    </dependency>
-    <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm-tree</artifactId>
-      <version>3.2</version>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.15</version>
-      <scope>system</scope>
-      <systemPath>/usr/share/java/log4j-1.2.jar</systemPath>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.ant</groupId>
-      <artifactId>ant</artifactId>
-      <version>1.7.1</version>
-    </dependency>
-  </dependencies>
-</project>
-
diff --git a/debian/control b/debian/control
index 5527679..0d9960e 100644
--- a/debian/control
+++ b/debian/control
@@ -9,15 +9,31 @@ Build-Depends: ant,
                javahelper,
                junit,
                libasm3-java,
+               libjavacc-maven-plugin-java,
                liblog4j1.2-java,
+               libmaven-bundle-plugin-java,
+               libmaven-dependency-plugin-java,
+               libmaven-enforcer-plugin-java,
+               libmaven-plugin-testing-java,
                liboro-java,
                libservlet3.1-java,
-               maven-repo-helper
+               maven-debian-helper (>= 2.2)
 Standards-Version: 4.1.0
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/cobertura.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/cobertura.git
 Homepage: http://cobertura.github.io/cobertura/
 
+Package: libcobertura-java
+Architecture: all
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
+Description: java library that calculates the percentage of code accessed by tests
+ Library that measures test coverage by instrumenting a Java code base and
+ watching which lines of code are and are not executed as the test suite runs.
+ In addition to identifying untested code and locating bugs, Cobertura can
+ optimize code by flagging dead, unreachable code and can provide insights
+ into how an API operates in practice. It is based on jcoverage.
+
 Package: cobertura
 Architecture: all
 Depends: default-jre-headless | java5-runtime-headless,
@@ -30,22 +46,3 @@ Description: java tool that calculates the percentage of code accessed by tests
  addition to identifying untested code and locating bugs, Cobertura can
  optimize code by flagging dead, unreachable code and can provide insights
  into how an API operates in practice. It is based on jcoverage.
-
-Package: libcobertura-java
-Architecture: all
-Depends: ant,
-         libasm3-java,
-         liblog4j1.2-java,
-         liboro-java,
-         ${misc:Depends}
-Suggests: libjaxen-java,
-          libjdom1-java,
-          libxalan2-java,
-          libxerces2-java
-Recommends: junit
-Description: java library that calculates the percentage of code accessed by tests
- Library that measures test coverage by instrumenting a Java code base and
- watching which lines of code are and are not executed as the test suite runs.
- In addition to identifying untested code and locating bugs, Cobertura can
- optimize code by flagging dead, unreachable code and can provide insights
- into how an API operates in practice. It is based on jcoverage.
diff --git a/debian/libcobertura-java.jlibs b/debian/libcobertura-java.jlibs
deleted file mode 100644
index f1f1fad..0000000
--- a/debian/libcobertura-java.jlibs
+++ /dev/null
@@ -1 +0,0 @@
-cobertura.jar
diff --git a/debian/libcobertura-java.poms b/debian/libcobertura-java.poms
new file mode 100644
index 0000000..f77388c
--- /dev/null
+++ b/debian/libcobertura-java.poms
@@ -0,0 +1,15 @@
+pom.xml --no-parent --has-package-version
+cobertura/pom.xml --no-parent --has-package-version
+cobertura-runtime/pom.xml --no-parent --has-package-version
+codestyle/pom.xml --ignore
+conversion/pom.xml --ignore
+conversion/conversion-api/pom.xml  --ignore
+interaction/pom.xml --has-package-version
+interaction/annotations/pom.xml --has-package-version
+interaction/annotations/annotations-api/pom.xml --has-package-version
+metrics/pom.xml --ignore
+metrics/metrics-api/pom.xml --ignore
+metrics/metrics-model/pom.xml --ignore
+poms/pom.xml --has-package-version
+poms/cobertura-api-parent/pom.xml --has-package-version
+poms/cobertura-parent/pom.xml --no-parent --has-package-version
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..4c86f0a
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,21 @@
+com.code54.mojo buildversion-plugin
+com.github.jeluard plantuml-maven-plugin
+org.apache.maven.plugins maven-assembly-plugin
+org.apache.maven.plugins maven-checkstyle-plugin
+org.apache.maven.plugins maven-enforcer-plugin
+org.apache.maven.plugins maven-failsafe-plugin
+org.apache.maven.plugins maven-javadoc-plugin
+org.apache.maven.plugins maven-pmd-plugin
+org.apache.maven.plugins maven-release-plugin
+org.apache.maven.plugins maven-site-plugin
+org.apache.maven.plugins maven-war-plugin
+org.apache.maven.scm maven-scm-provider-gitexe
+org.apache.maven.scm maven-scm-provider-hg
+org.apache.servicemix.tooling depends-maven-plugin
+org.codehaus.mojo findbugs-maven-plugin
+org.codehaus.mojo license-maven-plugin
+* * * * * test
+
+com.sun tools
+org.mortbay.jetty jetty
+org.mortbay.jetty jetty-util
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..242da7e
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,6 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
+project.build.sourceEncoding=UTF-8
diff --git a/debian/maven.rules b/debian/maven.rules
index ef1f420..0cfd892 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,4 +1,8 @@
 asm asm jar s/.*/3.x/ *
 asm asm-tree jar s/.*/3.x/ *
 log4j log4j jar s/1\.2\..*/1.2.x/ *
-org.apache.ant s/ant/ant-parent/ pom s/1\.7\..*/1.7.x/ *
+org.codehaus.plexus plexus-container-default * s/.*/1.5.5/ * *
+org.apache.maven s/maven-project/maven-core/ * s/.*/3.x/ * *
+org.apache.maven maven-* * s/.*/3.x/ * *
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-harness * s/.*/debian/ * *
+s/org.mortbay.jetty/javax.servlet/ s/servlet-api-2.5/javax.servlet-api/ * s/.*/3.1/ * *
diff --git a/debian/patches/add_classpath_to_manifest.diff b/debian/patches/add_classpath_to_manifest.diff
deleted file mode 100644
index bb35331..0000000
--- a/debian/patches/add_classpath_to_manifest.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 7c689da..9aac115 100644
---- a/build.xml
-+++ b/build.xml
-@@ -137,6 +137,7 @@
- 				<attribute name="Implementation-Vendor" value="Cobertura"/>
- 				<attribute name="Implementation-Vendor-Id" value="net.sourceforge.cobertura"/>
- 				<attribute name="Implementation-Version" value="${version}"/>
-+				<attribute name="Class-Path" value="asm3.jar asm3-tree.jar oro.jar log4j-1.2.jar servlet-api.jar"/>
- 			</manifest>
- 		</jar>
- 
diff --git a/debian/patches/build_with_system_jars.diff b/debian/patches/build_with_system_jars.diff
deleted file mode 100644
index 215d597..0000000
--- a/debian/patches/build_with_system_jars.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/build.properties b/build.properties
-index 4641708..530a635 100644
---- a/build.properties
-+++ b/build.properties
-@@ -8,11 +8,10 @@ eclipse.dir=/opt/eclipse
- etc.dir=etc
- examples.dir=examples
- examples.functionalconditiontest.dir=examples/functionalconditiontest/src
--lib.dir=lib
-+lib.dir=/usr/share/java
- src.dir=src
- othersrc.dir=src-2
- test.src.dir=test
--jetty.dir=jetty
- 
- # Directories for generated output
- build.dir=build
-diff --git a/build.xml b/build.xml
-index 2a19d41..5120052 100644
---- a/build.xml
-+++ b/build.xml
-@@ -18,12 +18,7 @@
- 
- 
- 	<path id="base.path">
--		<fileset dir="${lib.dir}">
--			<include name="**/*.jar" />
--		</fileset>
--		<fileset dir="${jetty.dir}">
--			<include name="lib/servlet-api*.jar" />
--		</fileset>
-+		<fileset dir="/" includesfile="debian/classpath-debian"/>
- 	</path>
- 
- 	<path id="cobertura.classpath">
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index cd21475..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-build_with_system_jars.diff
-add_classpath_to_manifest.diff
diff --git a/debian/rules b/debian/rules
index 7d99ee3..9fdf527 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,37 +1,14 @@
 #!/usr/bin/make -f
 
-include /usr/share/dpkg/default.mk
-
-DEB_MANGLED_VERSION_UPSTREAM := \
-	$(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/\+dfsg$$//')
-
 %:
 	dh $@ --with javahelper
 
 override_dh_auto_build:
-	ant -propertyfile debian/ant.properties dist
+	dh_auto_build
 	docbook-to-man debian/cobertura-check.sgml > cobertura-check.1
 	docbook-to-man debian/cobertura-instrument.sgml > cobertura-instrument.1
 	docbook-to-man debian/cobertura-merge.sgml > cobertura-merge.1
 	docbook-to-man debian/cobertura-report.sgml > cobertura-report.1
 
-override_dh_auto_install:
-	dh_auto_install
-	mh_installpom -plibcobertura-java $(CURDIR)/debian/cobertura.pom
-	mh_installjar -plibcobertura-java -l $(CURDIR)/debian/cobertura.pom \
-		$(CURDIR)/cobertura.jar
-	mh_installpom -plibcobertura-java $(CURDIR)/debian/cobertura-runtime.pom
-
-override_dh_auto_clean:
-	dh_auto_clean
-	mh_clean
-	rm -rf build
-
 get-orig-source:
-	uscan \
-		--verbose \
-		--no-symlink \
-		--upstream-version $(DEB_MANGLED_VERSION_UPSTREAM) \
-		--download-version $(DEB_MANGLED_VERSION_UPSTREAM) \
-		--destdir .                                        \
-		--force-download
+	uscan --download-current-version --rename

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/cobertura.git



More information about the pkg-java-commits mailing list