Clean up patches

- Add patch for MNG-5613
This commit is contained in:
Mikolaj Izdebski 2014-06-02 06:44:51 +02:00
parent dfa1d2f92f
commit a798258719
8 changed files with 148 additions and 74 deletions

View File

@ -1,28 +0,0 @@
From a389420bc523cf178dedd8553c33397da448b9ff Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 24 Feb 2014 13:59:31 +0100
Subject: [PATCH] [MNG-5591] Set role hint for ReactorReader to "default"
Sisu uses implicit role hint "default" only for components which class
names are prefixed with "Default". Since ReactorReader is not, hole
hint "default" needs to be explicitly added as argument to @Named.
---
maven-core/src/main/java/org/apache/maven/ReactorReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-core/src/main/java/org/apache/maven/ReactorReader.java b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
index 9aa8385..405d40b 100644
--- a/maven-core/src/main/java/org/apache/maven/ReactorReader.java
+++ b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
@@ -46,7 +46,7 @@
*
* @author Jason van Zyl
*/
-@Named
+@Named( "default" )
@SessionScoped
class ReactorReader
implements WorkspaceReader
--
1.8.4.2

View File

@ -1,7 +1,7 @@
From 6969f54c7a4e1e280ea44b3a82caf8302f8e05f7 Mon Sep 17 00:00:00 2001
From 351830b1c83b308e554f48c355f252f62afb3c2c Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Tue, 31 Jan 2012 13:12:32 +0100
Subject: [PATCH 1/4] Use generics in modello generated code
Subject: [PATCH 1/6] Use generics in modello generated code
---
maven-model/pom.xml | 2 ++
@ -9,7 +9,7 @@ Subject: [PATCH 1/4] Use generics in modello generated code
2 files changed, 5 insertions(+)
diff --git a/maven-model/pom.xml b/maven-model/pom.xml
index 0e594dd..f4d7402 100644
index e538c1a..27c92bb 100644
--- a/maven-model/pom.xml
+++ b/maven-model/pom.xml
@@ -56,6 +56,7 @@ under the License.
@ -29,7 +29,7 @@ index 0e594dd..f4d7402 100644
</execution>
</executions>
diff --git a/pom.xml b/pom.xml
index 782b3c4..5e16bd6 100644
index 57ac319..7e0c305 100644
--- a/pom.xml
+++ b/pom.xml
@@ -389,6 +389,9 @@
@ -43,5 +43,5 @@ index 782b3c4..5e16bd6 100644
<execution>
<id>site-docs</id>
--
1.8.4.2
1.9.0

View File

@ -1,7 +1,7 @@
From 466eafe55aef76159d60036130f9c6740bdc803e Mon Sep 17 00:00:00 2001
From b7282fd199d9ff4169ca62d50606fbe94086f2de Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 29 Aug 2013 10:11:48 +0200
Subject: [PATCH 2/4] Migrate from easymock 1 to easymock 3
Subject: [PATCH 2/6] Migrate from easymock 1 to easymock 3
---
maven-compat/pom.xml | 2 +-
@ -12,7 +12,7 @@ Subject: [PATCH 2/4] Migrate from easymock 1 to easymock 3
delete mode 100644 maven-compat/src/test/java/org/apache/maven/artifact/testutils/MockManager.java
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index 5f8be50..a296c86 100644
index ff75433..7ee01a0 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -83,7 +83,7 @@
@ -120,7 +120,7 @@ index bcda50a..37a281c 100644
private Artifact createTestPomArtifact( String directory )
diff --git a/pom.xml b/pom.xml
index 5e16bd6..808924a 100644
index 7e0c305..b3f710f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
@ -142,5 +142,5 @@ index 5e16bd6..808924a 100644
<version>${easyMockVersion}</version>
<scope>test</scope>
--
1.8.4.2
1.9.0

View File

@ -1,7 +1,7 @@
From c9859a031e75d41fb8199ab6dc7f3019f510fc83 Mon Sep 17 00:00:00 2001
From f287858ef2b0a2cc924e902298eea66ed7c6b82e Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 12 Aug 2013 08:49:19 +0200
Subject: [PATCH 3/4] Update Aether to 0.9.0.M3
Subject: [PATCH 3/6] Update Aether to 0.9.0.M3
---
apache-maven/pom.xml | 6 +++++-
@ -11,7 +11,7 @@ Subject: [PATCH 3/4] Update Aether to 0.9.0.M3
4 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index e79b5a5..7504e24 100644
index 0ff2e9a..26c6a82 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -87,7 +87,11 @@
@ -28,7 +28,7 @@ index e79b5a5..7504e24 100644
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 8a5fc78..7ae72f2 100644
index f9f1673..6273e66 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -91,7 +91,12 @@ under the License.
@ -46,7 +46,7 @@ index 8a5fc78..7ae72f2 100644
</dependency>
<dependency>
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index a296c86..a2277b7 100644
index 7ee01a0..e075387 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -79,7 +79,12 @@
@ -64,7 +64,7 @@ index a296c86..a2277b7 100644
</dependency>
<dependency>
diff --git a/pom.xml b/pom.xml
index 808924a..366c557 100644
index b3f710f..04a6e4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
@ -91,5 +91,5 @@ index 808924a..366c557 100644
</dependency>
<!-- Commons -->
--
1.8.4.2
1.9.0

View File

@ -1,7 +1,7 @@
From 93bf8c4e671da0015de6a7269980d35f4a1c77ea Mon Sep 17 00:00:00 2001
From 0e95fa0a988f4b910969d1d5cfd2daf0c968f257 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 13 Nov 2013 14:32:23 +0100
Subject: [PATCH 4/4] Update to Sisu 0.1.0 and Guice 3.1.6
Subject: [PATCH 4/6] Update to Sisu 0.1.0 and Guice 3.1.6
Sisu depends on Guice, but dependency scope changed from "compile" to
"provided" in Sisu 0.1.0. As a Sisu user, Maven needs to have runtime
@ -18,7 +18,7 @@ dependency on Guice.
8 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 7504e24..57f75cc 100644
index 26c6a82..b866692 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -57,6 +57,18 @@
@ -41,7 +41,7 @@ index 7504e24..57f75cc 100644
<dependency>
<groupId>commons-cli</groupId>
diff --git a/maven-aether-provider/pom.xml b/maven-aether-provider/pom.xml
index 7ae72f2..c6988ee 100644
index 6273e66..3ff5929 100644
--- a/maven-aether-provider/pom.xml
+++ b/maven-aether-provider/pom.xml
@@ -80,7 +80,6 @@ under the License.
@ -65,7 +65,7 @@ index 7ae72f2..c6988ee 100644
<dependency>
<groupId>org.eclipse.aether</groupId>
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index a2277b7..0c8e9e9 100644
index e075387..9810fd9 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -64,6 +64,18 @@
@ -88,7 +88,7 @@ index a2277b7..0c8e9e9 100644
<artifactId>plexus-component-annotations</artifactId>
</dependency>
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 400ec02..09bfd0a 100644
index f88ca9f..55cb370 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -82,6 +82,17 @@
@ -110,7 +110,7 @@ index 400ec02..09bfd0a 100644
<artifactId>plexus-interpolation</artifactId>
</dependency>
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 1264eea..11ae441 100644
index d4db510..7b85c58 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -65,6 +65,17 @@
@ -132,7 +132,7 @@ index 1264eea..11ae441 100644
<artifactId>plexus-component-annotations</artifactId>
</dependency>
diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml
index d694534..c7111b5 100644
index 053c86c..ef9df33 100644
--- a/maven-model-builder/pom.xml
+++ b/maven-model-builder/pom.xml
@@ -54,6 +54,18 @@
@ -155,7 +155,7 @@ index d694534..c7111b5 100644
<artifactId>xmlunit</artifactId>
<version>1.3</version>
diff --git a/maven-plugin-api/pom.xml b/maven-plugin-api/pom.xml
index 24e3101..8096b15 100644
index 319243e..85f0718 100644
--- a/maven-plugin-api/pom.xml
+++ b/maven-plugin-api/pom.xml
@@ -58,6 +58,18 @@ under the License.
@ -178,7 +178,7 @@ index 24e3101..8096b15 100644
<build>
diff --git a/pom.xml b/pom.xml
index 366c557..5414c23 100644
index 04a6e4c..bb9a88b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,8 +51,8 @@
@ -193,5 +193,5 @@ index 366c557..5414c23 100644
<securityDispatcherVersion>1.3</securityDispatcherVersion>
<cipherVersion>1.7</cipherVersion>
--
1.8.4.2
1.9.0

View File

@ -0,0 +1,64 @@
From 12946e910f70efbe5f8d44e3f94cf5c59fd653d1 Mon Sep 17 00:00:00 2001
From: Igor Fedorenko <ifedorenko@apache.org>
Date: Fri, 28 Feb 2014 23:54:45 -0500
Subject: [PATCH 5/6] MNG-5591 use 'reactor' hint for reactor WorkspaceReader
When maven is invoked from m2e, container.lookup(WorkspaceReader.class)
returns component with role-hint=ide, which I believe is a bug in Susi
or Guice (or at least well misunderstood feature). This masks
ReactorReader workspace reader implementation and breaks reactor
dependency resolution.
The solution is to use explicit "reactor" role hint for ReactorReader.
This avoids fuzzy default component lookup logic and guarantees reactor
reader is always used regardless of presence of other workspace readers.
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
---
maven-core/src/main/java/org/apache/maven/DefaultMaven.java | 2 +-
maven-core/src/main/java/org/apache/maven/ReactorReader.java | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index 58c536c..6328819 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -288,7 +288,7 @@ private MavenExecutionResult doExecute( MavenExecutionRequest request )
sessionScope.seed( MavenSession.class, session );
try
{
- reactorWorkspace = container.lookup( WorkspaceReader.class );
+ reactorWorkspace = container.lookup( WorkspaceReader.class, ReactorReader.HINT );
}
catch ( ComponentLookupException e )
{
diff --git a/maven-core/src/main/java/org/apache/maven/ReactorReader.java b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
index 9aa8385..e7b1f42 100644
--- a/maven-core/src/main/java/org/apache/maven/ReactorReader.java
+++ b/maven-core/src/main/java/org/apache/maven/ReactorReader.java
@@ -31,7 +31,6 @@
import javax.inject.Inject;
import javax.inject.Named;
-import javax.inject.Singleton;
import org.apache.maven.artifact.ArtifactUtils;
import org.apache.maven.execution.MavenSession;
@@ -46,11 +45,13 @@
*
* @author Jason van Zyl
*/
-@Named
+@Named( ReactorReader.HINT )
@SessionScoped
class ReactorReader
implements WorkspaceReader
{
+ public static final String HINT = "reactor";
+
private static final Collection<String> COMPILE_PHASE_TYPES = Arrays.asList( "jar", "ejb-client" );
private Map<String, MavenProject> projectsByGAV;
--
1.9.0

View File

@ -0,0 +1,34 @@
From 750f5f97fd4d630987e9d4ce32073aad845b3c23 Mon Sep 17 00:00:00 2001
From: Jason van Zyl <jason@tesla.io>
Date: Tue, 20 May 2014 20:26:27 -0400
Subject: [PATCH 6/6] [MNG-5613] fix NullPointerException when error occur
during project dependency graph creation Submitted by: Sebastian Le Merdy
<sebastian.lemerdy@gmail.com> From: https://github.com/apache/maven/pull/13
---
maven-core/src/main/java/org/apache/maven/DefaultMaven.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index 6328819..ab47efd 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -267,13 +267,13 @@ private MavenExecutionResult doExecute( MavenExecutionRequest request )
//
ProjectDependencyGraph projectDependencyGraph = createProjectDependencyGraph( projects, request, result, true );
- session.setProjects( projectDependencyGraph.getSortedProjects() );
-
if ( result.hasExceptions() )
{
return result;
}
+ session.setProjects( projectDependencyGraph.getSortedProjects() );
+
try
{
session.setProjectMap( getProjectMap( session.getProjects() ) );
--
1.9.0

View File

@ -1,28 +1,27 @@
Name: maven
Version: 3.2.1
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Java project management and project comprehension tool
Group: Development/Tools
License: ASL 2.0
URL: http://maven.apache.org/
Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz
Source1: maven-bash-completion
Source2: mvn.1
# 2xx for created non-buildable sources
Source200: %{name}-script
# Patch1XX could be upstreamed probably
Patch100: 0005-Use-generics-in-modello-generated-code.patch
Patch101: 0001-Migrate-from-easymock-1-to-easymock-3.patch
# Could be upstreamed probably
Patch0001: 0001-Use-generics-in-modello-generated-code.patch
# Could be upstreamed probably
Patch0002: 0002-Migrate-from-easymock-1-to-easymock-3.patch
# Forwarded upstream (MNG-5502)
Patch200: 0001-Update-Aether-to-0.9.0.M3.patch
Patch0003: 0003-Update-Aether-to-0.9.0.M3.patch
# Forwarded upstream (MNG-5534)
Patch201: 0001-Update-to-Sisu-0.1.0-and-Guice-3.1.6.patch
# Forwarded upstream (MNG-5591)
Patch202: 0001-MNG-5591-Set-role-hint-for-ReactorReader-to-default.patch
Patch0004: 0004-Update-to-Sisu-0.1.0-and-Guice-3.1.6.patch
# Forwarded upstream (MNG-5591, accepted)
Patch0005: 0005-MNG-5591-use-reactor-hint-for-reactor-WorkspaceReade.patch
# Backported from upstream commit bef7fac
Patch0006: 0006-MNG-5613-fix-NullPointerException-when-error-occur-d.patch
BuildArch: noarch
@ -150,11 +149,12 @@ Group: Documentation
%prep
%setup -q -n apache-%{name}-%{version}%{?ver_add}
%patch100 -p1
%patch101 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
# not really used during build, but a precaution
rm maven-ant-tasks-*.jar
@ -281,6 +281,10 @@ ln -sf $(build-classpath plexus/classworlds) \
%changelog
* Mon Jun 2 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-7
- Clean up patches
- Add patch for MNG-5613
* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.2.1-6
- Remove BuildRequires on maven-surefire-provider-junit4