Package: surefire
Version: 2.10-2
Followup-For: Bug #664641
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
In Ubuntu, the attached patch was applied to achieve the following:
* d/patches/fix-junit-provider-selection.patch: Correctly detect 4.x
version of JUnit from Debian Maven Repository so that JUnit47Provider
is selected for execution of unit tests when appropriate (LP: #935219).
I guess that a more in-depth fix would be to make the maven2-core package
understand where the .x releases fit into maven version numbering but
that may be to much of a deviation from upstream behaviour.
Thanks for considering the patch.
- -- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-18-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBCAAGBQJPZ1DqAAoJEL/srsug59jDbOQP/RCLNl1Zgw+lX8wscr8/BT/f
cEQiotgOjw076HcJKPmnkkUJ8WU4NaATV2WYT22axycc2plSQky/VaaRI15fb8z+
4tlp8pUIYB8PsODceJhwerJxswUn6YQ1vIm1BUkCltYmKigv1b398l48w/r+UvMj
ZkKrgNiKAgqDrTmJmtTsNRzKzR+S6Ak0CdVxNC4rbaf1YtiBzJeY5ej0ZFniVUrg
bB7AKOWLi7i6uPONlxJhWqnwcFaM4iMmDlluQUZRHx9k/0cGR+cGA9zCS+9Uf3Ve
OvopDcgETLxFpADCVtg+efm0SH8Ilde9GmHr1HbyBdOBx3SyvYAQ9p6EO2mO/JEj
hGwjpa5rWg/S2YZLehF0BPcJN8jrPKF3GF335P+deQ24QB17O9yYL3fM82igv2li
pAdQYRK5prxqavKG3L1mZUM/F2lCDDOr1LIyObaf59kxT2n5Y76lyLY2srFIABnn
ZdqG9TlEC9ZY68KTn4AUCwYyvUkw1W/wcGuevujTb9YqKPaYVXr28OYqMAYPrC9U
dM5fURoss1Th67bkGPxOdDY+c+n1tj5j1lllLpWyIxTZ1lfmeYu+0ynXLMklbd8M
e4ELnUTU3di8pouTBVfqcmU+kLgNVAl4cfUwK0QHaMaaCHnpNo3Jfc07HWBBeAiw
p0qPj8rnU2vwNTgYcN57
=jI5T
-----END PGP SIGNATURE-----
=== added file 'debian/patches/fix-junit-provider-selection.patch'
--- debian/patches/fix-junit-provider-selection.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/fix-junit-provider-selection.patch 2012-03-19 15:17:26 +0000
@@ -0,0 +1,30 @@
+Description: Surefire can't correctly detect the 4.x version of
+ JUnit that is present in the Debian Maven Repository.
+ .
+ This patch corrects that - its safe to assume that its greater
+ than 4.7 as sid contains 4.8.2. The JUnit4Provider should
+ never get selected due to the way these two checks are combined.
+Author: James Page <[email protected]>
+Forwarded: not-needed
+
+Index: surefire/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+===================================================================
+--- surefire.orig/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java 2012-03-19 15:06:03.310108598 +0000
++++ surefire/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java 2012-03-19 15:12:27.376393271 +0000
+@@ -311,12 +311,14 @@
+
+ private boolean isJunit47Compatible( Artifact artifact )
+ {
+- return dependencyResolver.isWithinVersionSpec( artifact, "[4.7,)" );
++ return ( dependencyResolver.isWithinVersionSpec( artifact, "[4.7,)" ) ||
++ "4.x".equals( artifact.getVersion() ) );
+ }
+
+ private boolean isAnyJunit4( Artifact artifact )
+ {
+- return dependencyResolver.isWithinVersionSpec( artifact, "[4.0,)" );
++ return ( dependencyResolver.isWithinVersionSpec( artifact, "[4.0,)" ) ||
++ "4.x".equals( artifact.getVersion() ) );
+ }
+
+ boolean isForkModeNever()
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-10-10 20:42:16 +0000
+++ debian/patches/series 2012-03-19 14:52:14 +0000
@@ -1 +1,2 @@
pom.patch
+fix-junit-provider-selection.patch
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>.
Please use
[email protected] for discussions and questions.