From 2b538451568f1c17646588dc29a55483fabdf17f Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mon, 20 Jul 2020 23:01:21 +0100 Subject: [PATCH] Add patch for NPE during testCompile --- ...0.patch => 0001-plexus-languages-1.0.patch | 12 +++++++++ 0002-MCOMPILER-359-Fix-for-NPE.patch | 25 +++++++++++++++++++ maven-compiler-plugin.spec | 11 ++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) rename 00-plexus-languages-1.0.patch => 0001-plexus-languages-1.0.patch (70%) create mode 100644 0002-MCOMPILER-359-Fix-for-NPE.patch diff --git a/00-plexus-languages-1.0.patch b/0001-plexus-languages-1.0.patch similarity index 70% rename from 00-plexus-languages-1.0.patch rename to 0001-plexus-languages-1.0.patch index e87dec4..e7ebcf4 100644 --- a/00-plexus-languages-1.0.patch +++ b/0001-plexus-languages-1.0.patch @@ -1,3 +1,12 @@ +From fd5749e9b8d47cf350527c4831a4ee53cefc60aa Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Mon, 20 Jul 2020 22:51:52 +0100 +Subject: [PATCH 1/2] plexus languages 1.0 + +--- + .../java/org/apache/maven/plugin/compiler/CompilerMojo.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java index 8bc437b..326f9f9 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java @@ -11,3 +20,6 @@ index 8bc437b..326f9f9 100644 /** * Compiles application sources +-- +2.26.2 + diff --git a/0002-MCOMPILER-359-Fix-for-NPE.patch b/0002-MCOMPILER-359-Fix-for-NPE.patch new file mode 100644 index 0000000..db0443e --- /dev/null +++ b/0002-MCOMPILER-359-Fix-for-NPE.patch @@ -0,0 +1,25 @@ +From 8ef296b291e7ef1e1e4ab4fa4b520a80bde48a9f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= +Date: Tue, 17 Dec 2019 19:05:57 +0100 +Subject: [PATCH 2/2] MCOMPILER-359: Fix for NPE + +--- + .../java/org/apache/maven/plugin/compiler/TestCompilerMojo.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java +index f8b9ba1..203dd07 100644 +--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java ++++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java +@@ -250,7 +250,7 @@ public class TestCompilerMojo + + for ( Entry pathException : result.getPathExceptions().entrySet() ) + { +- Throwable cause = pathException.getValue().getCause(); ++ Throwable cause = pathException.getValue(); + while ( cause.getCause() != null ) + { + cause = cause.getCause(); +-- +2.26.2 + diff --git a/maven-compiler-plugin.spec b/maven-compiler-plugin.spec index 3466bbf..f4c7afa 100644 --- a/maven-compiler-plugin.spec +++ b/maven-compiler-plugin.spec @@ -1,6 +1,6 @@ Name: maven-compiler-plugin Version: 3.8.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Maven Compiler Plugin License: ASL 2.0 URL: http://maven.apache.org/plugins/maven-compiler-plugin @@ -9,7 +9,10 @@ BuildArch: noarch Source0: http://archive.apache.org/dist/maven/plugins/%{name}-%{version}-source-release.zip # port to plexus-languages 1.0.3 -Patch0: 00-plexus-languages-1.0.patch +Patch0: 0001-plexus-languages-1.0.patch + +# Taken from upstream commit: https://github.com/apache/maven-compiler-plugin/commit/116b98153ef5ce7b13c0275324baa28bca8bc887 +Patch1: 0002-MCOMPILER-359-Fix-for-NPE.patch BuildRequires: maven-local BuildRequires: mvn(org.apache.maven:maven-artifact) @@ -39,6 +42,7 @@ API documentation for %{name}. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %mvn_build -f @@ -53,6 +57,9 @@ API documentation for %{name}. %license LICENSE NOTICE %changelog +* Mon Jul 20 2020 Mat Booth - 3.8.1-6 +- Add patch for NPE during testCompile + * Fri Jul 10 2020 Jiri Vanek - 3.8.1-5 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11