Add patch for NPE during testCompile

This commit is contained in:
Mat Booth 2020-07-20 23:01:21 +01:00
parent 7f587de2a9
commit 2b53845156
3 changed files with 46 additions and 2 deletions

View File

@ -1,3 +1,12 @@
From fd5749e9b8d47cf350527c4831a4ee53cefc60aa Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
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

View File

@ -0,0 +1,25 @@
From 8ef296b291e7ef1e1e4ab4fa4b520a80bde48a9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= <hohwille@users.noreply.github.com>
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<String, Exception> pathException : result.getPathExceptions().entrySet() )
{
- Throwable cause = pathException.getValue().getCause();
+ Throwable cause = pathException.getValue();
while ( cause.getCause() != null )
{
cause = cause.getCause();
--
2.26.2

View File

@ -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 <mat.booth@redhat.com> - 3.8.1-6
- Add patch for NPE during testCompile
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 3.8.1-5
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11