Add patch to fix tycho compatibility

This commit is contained in:
Michael Simacek 2016-11-02 13:35:22 +01:00
parent 71ccc8ea0d
commit 51095efbe7
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From 3a9c9a0bea7794c04ddbb8ac0520839c0f3d1cd0 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
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<String, String> customCompilerArguments )
{
- if ( customCompilerArguments == null )
- {
- this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
- }
- else
- {
- this.customCompilerArguments = customCompilerArguments.entrySet();
- }
+ setCustomCompilerArgumentsAsMap( customCompilerArguments );
}
/**
@@ -454,13 +447,10 @@ public class CompilerConfiguration
public void setCustomCompilerArgumentsAsMap( Map<String, String> customCompilerArguments )
{
- if ( customCompilerArguments == null )
- {
- this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
- }
- else
+ this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
+ if ( customCompilerArguments != null )
{
- this.customCompilerArguments = customCompilerArguments.entrySet();
+ this.customCompilerArguments.addAll( customCompilerArguments.entrySet() );
}
}
--
2.7.4

View File

@ -3,7 +3,7 @@
Name: plexus-compiler Name: plexus-compiler
Epoch: 0 Epoch: 0
Version: 2.8.1 Version: 2.8.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Compiler call initiators for Plexus Summary: Compiler call initiators for Plexus
# extras subpackage has a bit different licensing # extras subpackage has a bit different licensing
# parts of compiler-api are ASL2.0/MIT # 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 Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
Source2: LICENSE.MIT 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: maven-local
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.codehaus.plexus:plexus-components:pom:) BuildRequires: mvn(org.codehaus.plexus:plexus-components:pom:)
@ -54,6 +57,8 @@ API documentation for %{name}.
%prep %prep
%setup -q -n %{name}-%{name}-%{version} %setup -q -n %{name}-%{name}-%{version}
%patch0 -p1
cp %{SOURCE1} LICENSE cp %{SOURCE1} LICENSE
cp %{SOURCE2} LICENSE.MIT cp %{SOURCE2} LICENSE.MIT
@ -92,6 +97,9 @@ cp %{SOURCE2} LICENSE.MIT
%doc LICENSE LICENSE.MIT %doc LICENSE LICENSE.MIT
%changelog %changelog
* Wed Nov 02 2016 Michael Simacek <msimacek@redhat.com> - 0:2.8.1-2
- Add patch to fix tycho compatibility
* Mon Oct 31 2016 Michael Simacek <msimacek@redhat.com> - 0:2.8.1-1 * Mon Oct 31 2016 Michael Simacek <msimacek@redhat.com> - 0:2.8.1-1
- Update to upstream version 2.8.1 - Update to upstream version 2.8.1