Please consider the attached patch.
diff -Nru maven-compiler-plugin-3.8.0/debian/changelog maven-compiler-plugin-3.8.0/debian/changelog
--- maven-compiler-plugin-3.8.0/debian/changelog	2018-07-30 09:26:41.000000000 +0200
+++ maven-compiler-plugin-3.8.0/debian/changelog	2018-09-21 14:45:48.000000000 +0200
@@ -1,3 +1,12 @@
+maven-compiler-plugin (3.8.0-2) UNRELEASED; urgency=low
+
+  * Fix tests: (Closes: #910093)
+    - debian/rules: set JAVA_HOME to prevent compiler test failure.
+    - debian/patches/01-fix-wrong-junit-path.patch: patch wrong junit path in
+      compiler test.
+
+ -- Tiago Stürmer Daitx <tiago.da...@ubuntu.com>  Fri, 21 Sep 2018 12:45:48 +0000
+
 maven-compiler-plugin (3.8.0-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru maven-compiler-plugin-3.8.0/debian/patches/01-fix-wrong-junit-path.patch maven-compiler-plugin-3.8.0/debian/patches/01-fix-wrong-junit-path.patch
--- maven-compiler-plugin-3.8.0/debian/patches/01-fix-wrong-junit-path.patch	1970-01-01 01:00:00.000000000 +0100
+++ maven-compiler-plugin-3.8.0/debian/patches/01-fix-wrong-junit-path.patch	2017-09-08 20:32:01.000000000 +0200
@@ -0,0 +1,21 @@
+Description: Fix wrong junit patch in Compiler test.
+ The compiler testcase sets an absolute path to junit's jar file
+ version 3.8.1 even though the pom.xml file now depends on 4.12
+ (4.x on Debian).
+ .
+ This patch fixes it and set the fixed path to a current junit jar
+ file.
+Author: Tiago Stürmer Daitx <tiago.da...@ubuntu.com>
+Last-Update: 2017-09-08
+
+--- maven-compiler-plugin-3.6.2.orig/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
++++ maven-compiler-plugin-3.6.2/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+@@ -397,7 +397,7 @@ public class CompilerMojoTestCase
+         String localRepository = System.getProperty( "localRepository" );
+         if ( localRepository != null )
+         {
+-            artifactFile = new File( localRepository, "junit/junit/3.8.1/junit-3.8.1.jar" );
++            artifactFile = new File( localRepository, "junit/junit/4.x/junit-4.x.jar" );
+         }
+         else
+         {
diff -Nru maven-compiler-plugin-3.8.0/debian/patches/series maven-compiler-plugin-3.8.0/debian/patches/series
--- maven-compiler-plugin-3.8.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ maven-compiler-plugin-3.8.0/debian/patches/series	2017-09-08 20:32:01.000000000 +0200
@@ -0,0 +1 @@
+01-fix-wrong-junit-path.patch
diff -Nru maven-compiler-plugin-3.8.0/debian/rules maven-compiler-plugin-3.8.0/debian/rules
--- maven-compiler-plugin-3.8.0/debian/rules	2018-07-30 01:26:57.000000000 +0200
+++ maven-compiler-plugin-3.8.0/debian/rules	2018-07-30 18:57:55.000000000 +0200
@@ -1,4 +1,5 @@
 #!/usr/bin/make -f
+export JAVA_HOME=/usr/lib/jvm/default-java
 
 %:
 	dh $@

Reply via email to