Remove aqute downgrade patch

This commit is contained in:
Michael Simacek 2016-05-27 12:43:25 +02:00
parent 9956c891db
commit 97e2f043cb
6 changed files with 42 additions and 78 deletions

View File

@ -1,12 +1,12 @@
From 78dd71f9db048bf6d361a40f2d00d189c3911c76 Mon Sep 17 00:00:00 2001
From d857930332910d1315d8e5edc41229afbc0ec546 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 12 Feb 2016 09:45:20 +0100
Subject: [PATCH 1/4] Port to current maven-dependency-tree
Subject: [PATCH 1/3] Port to current maven-dependency-tree
---
.../apache/felix/bundleplugin/BundleAllPlugin.java | 54 ++++++++++++----------
.../apache/felix/bundleplugin/BundlePlugin.java | 29 ++++++------
2 files changed, 44 insertions(+), 39 deletions(-)
.../apache/felix/bundleplugin/BundlePlugin.java | 30 ++++++------
2 files changed, 45 insertions(+), 39 deletions(-)
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
index 5d095d8..b32b90b 100644
@ -150,7 +150,7 @@ index 5d095d8..b32b90b 100644
}
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index f15a34a..6ceb4c0 100644
index f15a34a..07a36fe 100644
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -72,15 +72,15 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
@ -181,18 +181,19 @@ index f15a34a..6ceb4c0 100644
/**
* The dependency graph builder to use.
*/
@@ -331,7 +328,9 @@ public class BundlePlugin extends AbstractMojo
@@ -331,7 +328,10 @@ public class BundlePlugin extends AbstractMojo
DependencyNode dependencyGraph;
try
{
- dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( mavenProject, null );
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
+ request.setProject(mavenProject);
+ request.setRepositorySession(session.getRepositorySession());
+ dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( request, null );
}
catch ( DependencyGraphBuilderException e )
{
@@ -739,7 +738,7 @@ public class BundlePlugin extends AbstractMojo
@@ -739,7 +739,7 @@ public class BundlePlugin extends AbstractMojo
// We need to find the direct dependencies that have been included in the uber JAR so that we can modify the
// POM accordingly.
private void createDependencyReducedPom( Set<String> artifactsToRemove )
@ -201,7 +202,7 @@ index f15a34a..6ceb4c0 100644
{
Model model = project.getOriginalModel();
List<Dependency> dependencies = new ArrayList<Dependency>();
@@ -882,24 +881,26 @@ public class BundlePlugin extends AbstractMojo
@@ -882,24 +882,26 @@ public class BundlePlugin extends AbstractMojo
}
public boolean updateExcludesInDeps( MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps )

View File

@ -1,51 +0,0 @@
From 55810ef684583532c340a5ec585bf509b6712383 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 12 Feb 2016 11:17:02 +0100
Subject: [PATCH 2/4] Downgrade aqute-bnd
---
.../java/org/apache/felix/bundleplugin/BundlePlugin.java | 1 +
.../java/org/apache/felix/bundleplugin/ManifestPlugin.java | 14 +++++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 6ceb4c0..07a36fe 100644
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -330,6 +330,7 @@ public class BundlePlugin extends AbstractMojo
{
ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
request.setProject(mavenProject);
+ request.setRepositorySession(session.getRepositorySession());
dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( request, null );
}
catch ( DependencyGraphBuilderException e )
diff --git a/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java b/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
index 1e1d025..add2cd4 100644
--- a/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -120,14 +120,14 @@ public class ManifestPlugin extends BundlePlugin
}
finally
{
- try
- {
+// try
+// {
analyzer.close();
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error trying to write Manifest to file " + outputFile, e );
- }
+// }
+// catch ( IOException e )
+// {
+// throw new MojoExecutionException( "Error trying to write Manifest to file " + outputFile, e );
+// }
}
}
--
2.5.5

View File

@ -0,0 +1,25 @@
From 0c057190600bb982937f6f007d63e7728b037327 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Thu, 14 Apr 2016 17:00:23 +0100
Subject: [PATCH 2/3] Fix for new maven archiver
---
src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 07a36fe..8c0b6f0 100644
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -1082,7 +1082,7 @@ public class BundlePlugin extends AbstractMojo
* Grab customized manifest entries from the maven-jar-plugin configuration
*/
MavenArchiveConfiguration archiveConfig = JarPluginConfiguration.getArchiveConfiguration( currentProject );
- String mavenManifestText = new MavenArchiver().getManifest( currentProject, archiveConfig ).toString();
+ String mavenManifestText = new MavenArchiver().getManifest( m_mavenSession, currentProject, archiveConfig ).toString();
addMavenDescriptor = addMavenDescriptor && archiveConfig.isAddMavenDescriptor();
Manifest mavenManifest = new Manifest();
--
2.5.5

View File

@ -1,7 +1,7 @@
From 9923aa8e2f1bbbe86253c5c63e6aa97f1dcad2ee Mon Sep 17 00:00:00 2001
From b7bc677d48dd8b5a2b491dddd607ecaad41a1128 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 12 May 2016 09:24:36 +0200
Subject: [PATCH 4/4] Port to plexus-utils 3.0.24
Subject: [PATCH 3/3] Port to plexus-utils 3.0.24
---
src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java | 9 ++++++++-

View File

@ -1,11 +0,0 @@
--- ./src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java.orig 2016-04-14 16:51:28.771098909 +0100
+++ ./src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java 2016-04-14 16:53:32.364679338 +0100
@@ -1082,7 +1082,7 @@
* Grab customized manifest entries from the maven-jar-plugin configuration
*/
MavenArchiveConfiguration archiveConfig = JarPluginConfiguration.getArchiveConfiguration( currentProject );
- String mavenManifestText = new MavenArchiver().getManifest( currentProject, archiveConfig ).toString();
+ String mavenManifestText = new MavenArchiver().getManifest( m_mavenSession, currentProject, archiveConfig ).toString();
addMavenDescriptor = addMavenDescriptor && archiveConfig.isAddMavenDescriptor();
Manifest mavenManifest = new Manifest();

View File

@ -2,7 +2,7 @@
Name: maven-plugin-bundle
Version: 3.0.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Maven Bundle Plugin
License: ASL 2.0
URL: http://felix.apache.org
@ -12,12 +12,10 @@ Source0: http://archive.apache.org/dist/felix/%{site_name}-%{version}-sou
# Needs polishing to be sent upstream
Patch0: 0001-Port-to-current-maven-dependency-tree.patch
# It doesn't really need new aqute-bnd
Patch1: 0002-Downgrade-aqute-bnd.patch
# New maven-archiver removed some deprecated methods we were using
Patch2: fix-for-new-maven-archiver.patch
Patch1: 0002-Fix-for-new-maven-archiver.patch
# Port to newer Plexus utils
Patch3: 0004-Port-to-plexus-utils-3.0.24.patch
Patch2: 0003-Port-to-plexus-utils-3.0.24.patch
BuildRequires: maven-local
BuildRequires: mvn(biz.aQute.bnd:biz.aQute.bndlib)
@ -60,7 +58,6 @@ API documentation for %{name}.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
find -name '*.jar' -delete
@ -90,6 +87,9 @@ rm -r src/main/java/org/apache/maven/shared/dependency
%doc LICENSE NOTICE
%changelog
* Thu May 26 2016 Michael Simacek <msimacek@redhat.com> - 3.0.1-4
- Remove aqute downgrade patch
* Thu May 12 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.1-3
- Port to plexus-utils 3.0.24