diff --git a/0001-Copy-input-map-in-setCustomCompilerArguments-AsMap.patch b/0001-Copy-input-map-in-setCustomCompilerArguments-AsMap.patch new file mode 100644 index 0000000..eb3ce04 --- /dev/null +++ b/0001-Copy-input-map-in-setCustomCompilerArguments-AsMap.patch @@ -0,0 +1,49 @@ +From 3a9c9a0bea7794c04ddbb8ac0520839c0f3d1cd0 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 1 Nov 2016 11:17:02 +0100 +Subject: [PATCH] Copy input map in setCustomCompilerArguments[AsMap] + +--- + .../plexus/compiler/CompilerConfiguration.java | 18 ++++-------------- + 1 file changed, 4 insertions(+), 14 deletions(-) + +diff --git a/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java b/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java +index 69fc810..d4c4c03 100644 +--- a/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java ++++ b/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java +@@ -426,14 +426,7 @@ public class CompilerConfiguration + @Deprecated + public void setCustomCompilerArguments( LinkedHashMap customCompilerArguments ) + { +- if ( customCompilerArguments == null ) +- { +- this.customCompilerArguments = new ArrayList>(); +- } +- else +- { +- this.customCompilerArguments = customCompilerArguments.entrySet(); +- } ++ setCustomCompilerArgumentsAsMap( customCompilerArguments ); + } + + /** +@@ -454,13 +447,10 @@ public class CompilerConfiguration + + public void setCustomCompilerArgumentsAsMap( Map customCompilerArguments ) + { +- if ( customCompilerArguments == null ) +- { +- this.customCompilerArguments = new ArrayList>(); +- } +- else ++ this.customCompilerArguments = new ArrayList>(); ++ if ( customCompilerArguments != null ) + { +- this.customCompilerArguments = customCompilerArguments.entrySet(); ++ this.customCompilerArguments.addAll( customCompilerArguments.entrySet() ); + } + } + +-- +2.7.4 + diff --git a/plexus-compiler.spec b/plexus-compiler.spec index 5cb57c9..fdbb883 100644 --- a/plexus-compiler.spec +++ b/plexus-compiler.spec @@ -3,7 +3,7 @@ Name: plexus-compiler Epoch: 0 Version: 2.8.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Compiler call initiators for Plexus # extras subpackage has a bit different licensing # parts of compiler-api are ASL2.0/MIT @@ -15,6 +15,9 @@ Source0: https://github.com/codehaus-plexus/%{name}/archive/%{name}-%{version Source1: http://www.apache.org/licenses/LICENSE-2.0.txt Source2: LICENSE.MIT +# https://github.com/codehaus-plexus/plexus-compiler/pull/25 +Patch0: 0001-Copy-input-map-in-setCustomCompilerArguments-AsMap.patch + BuildRequires: maven-local BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) BuildRequires: mvn(org.codehaus.plexus:plexus-components:pom:) @@ -54,6 +57,8 @@ API documentation for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 + cp %{SOURCE1} LICENSE cp %{SOURCE2} LICENSE.MIT @@ -92,6 +97,9 @@ cp %{SOURCE2} LICENSE.MIT %doc LICENSE LICENSE.MIT %changelog +* Wed Nov 02 2016 Michael Simacek - 0:2.8.1-2 +- Add patch to fix tycho compatibility + * Mon Oct 31 2016 Michael Simacek - 0:2.8.1-1 - Update to upstream version 2.8.1