Update to upstream version 4.2.0
This commit is contained in:
parent
95325206ac
commit
2446116bd2
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ maven-bundle-plugin-2.0.0-project.tar.gz
|
||||
/maven-bundle-plugin-3.3.0-source-release.tar.gz
|
||||
/maven-bundle-plugin-3.4.0-source-release.tar.gz
|
||||
/maven-bundle-plugin-3.5.0-source-release.tar.gz
|
||||
/maven-bundle-plugin-4.2.0-source-release.tar.gz
|
||||
|
@ -13,7 +13,7 @@ diff --git a/pom.xml b/pom.xml
|
||||
index dfbf237..46b2ba6 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -189,7 +189,7 @@
|
||||
@@ -192,7 +192,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-dependency-tree</artifactId>
|
||||
@ -164,10 +164,10 @@ index f3b5509..6591923 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
index 1dcf1c1..3e4384e 100644
|
||||
index 395340d..987a55c 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;
|
||||
@@ -73,12 +73,15 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
@ -176,47 +176,44 @@ index 1dcf1c1..3e4384e 100644
|
||||
import org.apache.maven.project.MavenProjectBuilder;
|
||||
import org.apache.maven.project.MavenProjectHelper;
|
||||
import org.apache.maven.project.ProjectBuildingException;
|
||||
+import org.apache.maven.project.ProjectBuildingRequest;
|
||||
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
|
||||
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
||||
import org.apache.maven.shared.dependency.graph.DependencyNode;
|
||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
|
||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
|
||||
+import org.apache.maven.project.ProjectBuildingRequest;
|
||||
+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
|
||||
+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
||||
+import org.apache.maven.shared.dependency.graph.DependencyNode;
|
||||
import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
|
||||
import org.apache.maven.shared.osgi.Maven2OsgiConverter;
|
||||
import org.codehaus.plexus.archiver.UnArchiver;
|
||||
@@ -225,9 +225,6 @@ public class BundlePlugin extends AbstractMojo
|
||||
@@ -209,6 +212,9 @@ public class BundlePlugin extends AbstractMojo
|
||||
@Component
|
||||
private ArtifactHandlerManager m_artifactHandlerManager;
|
||||
|
||||
+ @Component
|
||||
+ protected DependencyGraphBuilder m_dependencyGraphBuilder;
|
||||
+
|
||||
/* The current Maven session. */
|
||||
@Parameter( defaultValue = "${session}", readonly = true )
|
||||
protected MavenSession session;
|
||||
@@ -221,7 +227,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
protected MavenProjectBuilder mavenProjectBuilder;
|
||||
|
||||
- @Component
|
||||
@Component
|
||||
- private DependencyTreeBuilder dependencyTreeBuilder;
|
||||
-
|
||||
/**
|
||||
* The dependency graph builder to use.
|
||||
*/
|
||||
@@ -347,7 +344,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 )
|
||||
{
|
||||
@@ -758,7 +758,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
+ private DependencyGraphBuilder dependencyGraphBuilder;
|
||||
|
||||
@Component
|
||||
private ArtifactMetadataSource artifactMetadataSource;
|
||||
@@ -735,7 +741,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 )
|
||||
- throws IOException, DependencyTreeBuilderException, ProjectBuildingException
|
||||
+ throws IOException, DependencyGraphBuilderException, ProjectBuildingException
|
||||
{
|
||||
- throws IOException, ProjectBuildingException, DependencyTreeBuilderException {
|
||||
+ throws IOException, ProjectBuildingException, DependencyGraphBuilderException {
|
||||
Model model = project.getOriginalModel();
|
||||
List<Dependency> dependencies = new ArrayList<Dependency>();
|
||||
@@ -901,24 +901,26 @@ public class BundlePlugin extends AbstractMojo
|
||||
|
||||
@@ -873,20 +879,22 @@ public class BundlePlugin extends AbstractMojo
|
||||
}
|
||||
|
||||
public boolean updateExcludesInDeps( MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps )
|
||||
@ -231,21 +228,17 @@ index 1dcf1c1..3e4384e 100644
|
||||
+ request.setRepositorySession(session.getRepositorySession());
|
||||
+ DependencyNode node = dependencyGraphBuilder.buildDependencyGraph(request, null);
|
||||
boolean modified = false;
|
||||
Iterator it = node.getChildren().listIterator();
|
||||
while ( it.hasNext() )
|
||||
- for (org.apache.maven.shared.dependency.tree.DependencyNode n2 : node.getChildren())
|
||||
+ for (org.apache.maven.shared.dependency.graph.DependencyNode n2 : node.getChildren())
|
||||
{
|
||||
- org.apache.maven.shared.dependency.tree.DependencyNode n2 = (org.apache.maven.shared.dependency.tree.DependencyNode) it.next();
|
||||
+ DependencyNode n2 = (DependencyNode) it.next();
|
||||
Iterator it2 = n2.getChildren().listIterator();
|
||||
while ( it2.hasNext() )
|
||||
- for (org.apache.maven.shared.dependency.tree.DependencyNode n3 : n2.getChildren())
|
||||
+ for (org.apache.maven.shared.dependency.graph.DependencyNode n3 : n2.getChildren())
|
||||
{
|
||||
- org.apache.maven.shared.dependency.tree.DependencyNode n3 = (org.apache.maven.shared.dependency.tree.DependencyNode) it2.next();
|
||||
+ DependencyNode n3 = (DependencyNode) it2.next();
|
||||
//anything two levels deep that is marked "included"
|
||||
//is stuff that was excluded by the original poms, make sure it
|
||||
//remains excluded IF promoting transitives.
|
||||
- if ( n3.getState() == org.apache.maven.shared.dependency.tree.DependencyNode.INCLUDED )
|
||||
+ //if ( n3.getState() == org.apache.maven.shared.dependency.tree.DependencyNode.INCLUDED )
|
||||
- if (n3.getState() == org.apache.maven.shared.dependency.tree.DependencyNode.INCLUDED)
|
||||
+ //if (n3.getState() == org.apache.maven.shared.dependency.tree.DependencyNode.INCLUDED)
|
||||
+ if (true)
|
||||
{
|
||||
//check if it really isn't in the list of original dependencies. Maven
|
||||
|
@ -11,7 +11,7 @@ diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src
|
||||
index 3e4384e..a42d6ef 100644
|
||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
@@ -1101,7 +1101,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
@@ -1104,7 +1104,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
* Grab customized manifest entries from the maven-jar-plugin configuration
|
||||
*/
|
||||
MavenArchiveConfiguration archiveConfig = JarPluginConfiguration.getArchiveConfiguration( currentProject );
|
||||
|
@ -12,7 +12,7 @@ diff --git a/pom.xml b/pom.xml
|
||||
index 46b2ba6..144f5ad 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -194,7 +194,7 @@
|
||||
@@ -197,7 +197,7 @@
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
|
@ -9,30 +9,11 @@ Subject: [PATCH 4/4] Use Maven 3 APIs
|
||||
2 files changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 144f5ad..cf3d7dc 100644
|
||||
index b1fc107..5fc0a36 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -179,7 +179,17 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
- <version>2.2.0</version>
|
||||
+ <version>3.3.9</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven</groupId>
|
||||
+ <artifactId>maven-compat</artifactId>
|
||||
+ <version>3.3.9</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.apache.maven.reporting</groupId>
|
||||
+ <artifactId>maven-reporting-impl</artifactId>
|
||||
+ <version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
@@ -223,11 +233,6 @@
|
||||
<version>1.1</version>
|
||||
@@ -252,11 +252,6 @@
|
||||
<version>1.1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
- <dependency>
|
||||
@ -40,14 +21,14 @@ index 144f5ad..cf3d7dc 100644
|
||||
- <artifactId>jdom</artifactId>
|
||||
- <version>1.1</version>
|
||||
- </dependency>
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
index c858b6b..5023569 100644
|
||||
index 987a55c..05e77b0 100644
|
||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||
@@ -46,7 +46,6 @@ import java.util.TreeMap;
|
||||
@@ -47,7 +47,6 @@ import java.util.TreeMap;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.Manifest;
|
||||
|
||||
@ -55,7 +36,7 @@ index c858b6b..5023569 100644
|
||||
import org.apache.maven.archiver.ManifestSection;
|
||||
import org.apache.maven.archiver.MavenArchiveConfiguration;
|
||||
import org.apache.maven.archiver.MavenArchiver;
|
||||
@@ -63,6 +62,7 @@ import org.apache.maven.model.Exclusion;
|
||||
@@ -64,6 +63,7 @@ import org.apache.maven.model.Exclusion;
|
||||
import org.apache.maven.model.License;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.Resource;
|
||||
@ -63,7 +44,7 @@ index c858b6b..5023569 100644
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
@@ -864,7 +864,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
@@ -842,7 +842,7 @@ public class BundlePlugin extends AbstractMojo
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -1,14 +1,12 @@
|
||||
%global site_name maven-bundle-plugin
|
||||
|
||||
Name: maven-plugin-bundle
|
||||
Version: 3.5.0
|
||||
Release: 3%{?dist}
|
||||
Version: 4.2.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Maven Bundle Plugin
|
||||
License: ASL 2.0
|
||||
URL: http://felix.apache.org
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: http://repo2.maven.org/maven2/org/apache/felix/{%site_name}/%{version}/%{site_name}-%{version}-source-release.tar.gz
|
||||
Source0: http://repo2.maven.org/maven2/org/apache/felix/maven-bundle-plugin/%{version}/maven-bundle-plugin-%{version}-source-release.tar.gz
|
||||
|
||||
# Needs polishing to be sent upstream
|
||||
Patch0: 0001-Port-to-current-maven-dependency-tree.patch
|
||||
@ -45,7 +43,7 @@ Summary: Javadoc for %{name}
|
||||
API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{site_name}-%{version}
|
||||
%setup -q -n maven-bundle-plugin-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
@ -71,7 +69,6 @@ rm -rf src/main/java/org/apache/felix/obrplugin/
|
||||
rm -f src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
|
||||
%pom_remove_dep :doxia-sink-api
|
||||
%pom_remove_dep :doxia-site-renderer
|
||||
%pom_remove_dep :maven-reporting-impl
|
||||
|
||||
%build
|
||||
# Tests depend on bundled JARs
|
||||
@ -87,6 +84,9 @@ rm -f src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Tue Jun 04 2019 Marian Koncek <mkoncek@redhat.com> - 4.2.0-1
|
||||
- Update to upstream version 4.2.0
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-3
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (maven-bundle-plugin-3.5.0-source-release.tar.gz) = 81f81d61c7c8739788caa22ec615a3bfb6b753e81d8cb05cfaf3bcc5d936877caea5d75c3ac911fed75e0b3bf9822b258ac5f1d5564f88d569bf5102313841f0
|
||||
SHA512 (maven-bundle-plugin-4.2.0-source-release.tar.gz) = 6b8c2dda06dbb6ba496862c8f94e6c2adbccf5a5d438fe1efbd7ff456c529f7cb4ac17e0d6cc022b3d183d06e4006fa3fba0166c4370fd3c2b1e9e53510f6618
|
||||
|
Loading…
Reference in New Issue
Block a user