Update to upstream version 3.5.0
This commit is contained in:
parent
68e9259756
commit
4c66820b72
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ maven-bundle-plugin-2.0.0-project.tar.gz
|
|||||||
/maven-bundle-plugin-3.2.0-source-release.tar.gz
|
/maven-bundle-plugin-3.2.0-source-release.tar.gz
|
||||||
/maven-bundle-plugin-3.3.0-source-release.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.4.0-source-release.tar.gz
|
||||||
|
/maven-bundle-plugin-3.5.0-source-release.tar.gz
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f04e7a4e7ce6e7f9248d142c14b1e98df0e3b9a9 Mon Sep 17 00:00:00 2001
|
From ac9f85cd5fdab1d51defa363b31235c45560c7f6 Mon Sep 17 00:00:00 2001
|
||||||
From: Michael Simacek <msimacek@redhat.com>
|
From: Michael Simacek <msimacek@redhat.com>
|
||||||
Date: Fri, 12 Feb 2016 09:45:20 +0100
|
Date: Fri, 12 Feb 2016 09:45:20 +0100
|
||||||
Subject: [PATCH 1/4] Port to current maven-dependency-tree
|
Subject: [PATCH 1/4] Port to current maven-dependency-tree
|
||||||
@ -10,246 +10,246 @@ Subject: [PATCH 1/4] Port to current maven-dependency-tree
|
|||||||
3 files changed, 46 insertions(+), 40 deletions(-)
|
3 files changed, 46 insertions(+), 40 deletions(-)
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 4e5b9b2..05e798f 100644
|
index dfbf237..46b2ba6 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -189,7 +189,7 @@
|
@@ -189,7 +189,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.shared</groupId>
|
<groupId>org.apache.maven.shared</groupId>
|
||||||
<artifactId>maven-dependency-tree</artifactId>
|
<artifactId>maven-dependency-tree</artifactId>
|
||||||
- <version>2.1</version>
|
- <version>2.1</version>
|
||||||
+ <version>3.0</version>
|
+ <version>3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
|
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
|
index f3b5509..6591923 100644
|
||||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
|
--- a/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
|
||||||
+++ b/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
|
+++ b/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
|
||||||
@@ -21,8 +21,10 @@ package org.apache.felix.bundleplugin;
|
@@ -21,8 +21,10 @@ package org.apache.felix.bundleplugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
+import java.util.ArrayDeque;
|
+import java.util.ArrayDeque;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
+import java.util.Deque;
|
+import java.util.Deque;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@@ -38,7 +40,6 @@ import org.apache.maven.artifact.Artifact;
|
@@ -38,7 +40,6 @@ import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
-import org.apache.maven.artifact.resolver.ArtifactCollector;
|
-import org.apache.maven.artifact.resolver.ArtifactCollector;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
import org.apache.maven.artifact.resolver.ArtifactResolver;
|
||||||
@@ -49,13 +50,14 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
@@ -49,13 +50,14 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
import org.apache.maven.plugins.annotations.Parameter;
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
+import org.apache.maven.project.DefaultProjectBuildingRequest;
|
+import org.apache.maven.project.DefaultProjectBuildingRequest;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
import org.apache.maven.project.ProjectBuildingException;
|
import org.apache.maven.project.ProjectBuildingException;
|
||||||
+import org.apache.maven.project.ProjectBuildingRequest;
|
+import org.apache.maven.project.ProjectBuildingRequest;
|
||||||
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
|
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
|
||||||
-import org.apache.maven.shared.dependency.tree.DependencyNode;
|
-import org.apache.maven.shared.dependency.tree.DependencyNode;
|
||||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
|
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
|
||||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
|
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
|
||||||
+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
||||||
+import org.apache.maven.shared.dependency.graph.DependencyNode;
|
+import org.apache.maven.shared.dependency.graph.DependencyNode;
|
||||||
import org.codehaus.plexus.util.FileUtils;
|
import org.codehaus.plexus.util.FileUtils;
|
||||||
|
|
||||||
import aQute.bnd.osgi.Analyzer;
|
import aQute.bnd.osgi.Analyzer;
|
||||||
@@ -92,24 +94,18 @@ public class BundleAllPlugin extends ManifestPlugin
|
@@ -92,24 +94,18 @@ public class BundleAllPlugin extends ManifestPlugin
|
||||||
*/
|
*/
|
||||||
@Parameter( property = "wrapImportPackage", defaultValue = "*" )
|
@Parameter( property = "wrapImportPackage", defaultValue = "*" )
|
||||||
private String wrapImportPackage;
|
private String wrapImportPackage;
|
||||||
-
|
-
|
||||||
@Component
|
@Component
|
||||||
private ArtifactFactory m_factory;
|
private ArtifactFactory m_factory;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
private ArtifactMetadataSource m_artifactMetadataSource;
|
private ArtifactMetadataSource m_artifactMetadataSource;
|
||||||
|
|
||||||
- @Component
|
- @Component
|
||||||
- private ArtifactCollector m_collector;
|
- private ArtifactCollector m_collector;
|
||||||
-
|
-
|
||||||
/**
|
/**
|
||||||
* Artifact resolver, needed to download jars.
|
* Artifact resolver, needed to download jars.
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
private ArtifactResolver m_artifactResolver;
|
private ArtifactResolver m_artifactResolver;
|
||||||
|
|
||||||
- @Component
|
- @Component
|
||||||
- private DependencyTreeBuilder m_dependencyTreeBuilder;
|
- private DependencyTreeBuilder m_dependencyTreeBuilder;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
private MavenProjectBuilder m_mavenProjectBuilder;
|
private MavenProjectBuilder m_mavenProjectBuilder;
|
||||||
@@ -180,17 +176,19 @@ public class BundleAllPlugin extends ManifestPlugin
|
@@ -180,17 +176,19 @@ public class BundleAllPlugin extends ManifestPlugin
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- dependencyTree = m_dependencyTreeBuilder.buildDependencyTree( project, localRepository, m_factory,
|
- dependencyTree = m_dependencyTreeBuilder.buildDependencyTree( project, localRepository, m_factory,
|
||||||
- m_artifactMetadataSource, null, m_collector );
|
- m_artifactMetadataSource, null, m_collector );
|
||||||
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
||||||
+ request.setProject(getProject());
|
+ request.setProject(getProject());
|
||||||
+ request.setRepositorySession(session.getRepositorySession());
|
+ request.setRepositorySession(session.getRepositorySession());
|
||||||
+ dependencyTree = m_dependencyGraphBuilder.buildDependencyGraph(request, null);
|
+ dependencyTree = m_dependencyGraphBuilder.buildDependencyGraph(request, null);
|
||||||
}
|
}
|
||||||
- catch ( DependencyTreeBuilderException e )
|
- catch ( DependencyTreeBuilderException e )
|
||||||
+ catch ( DependencyGraphBuilderException e )
|
+ catch ( DependencyGraphBuilderException e )
|
||||||
{
|
{
|
||||||
throw new MojoExecutionException( "Unable to build dependency tree", e );
|
throw new MojoExecutionException( "Unable to build dependency tree", e );
|
||||||
}
|
}
|
||||||
|
|
||||||
BundleInfo bundleInfo = new BundleInfo();
|
BundleInfo bundleInfo = new BundleInfo();
|
||||||
|
|
||||||
- if ( !dependencyTree.hasChildren() )
|
- if ( !dependencyTree.hasChildren() )
|
||||||
+ if ( dependencyTree.getChildren().isEmpty())
|
+ if ( dependencyTree.getChildren().isEmpty())
|
||||||
{
|
{
|
||||||
/* no need to traverse the tree */
|
/* no need to traverse the tree */
|
||||||
return bundleRoot( project, bundleInfo );
|
return bundleRoot( project, bundleInfo );
|
||||||
@@ -198,20 +196,27 @@ public class BundleAllPlugin extends ManifestPlugin
|
@@ -198,20 +196,27 @@ public class BundleAllPlugin extends ManifestPlugin
|
||||||
|
|
||||||
getLog().debug( "Will bundle the following dependency tree" + LS + dependencyTree );
|
getLog().debug( "Will bundle the following dependency tree" + LS + dependencyTree );
|
||||||
|
|
||||||
- for ( Iterator it = dependencyTree.inverseIterator(); it.hasNext(); )
|
- for ( Iterator it = dependencyTree.inverseIterator(); it.hasNext(); )
|
||||||
+ Deque<DependencyNode> stack = new ArrayDeque<DependencyNode>();
|
+ Deque<DependencyNode> stack = new ArrayDeque<DependencyNode>();
|
||||||
+ stack.push(dependencyTree);
|
+ stack.push(dependencyTree);
|
||||||
+ Set<DependencyNode> visited = new HashSet<DependencyNode>();
|
+ Set<DependencyNode> visited = new HashSet<DependencyNode>();
|
||||||
+ while (!stack.isEmpty())
|
+ while (!stack.isEmpty())
|
||||||
{
|
{
|
||||||
- DependencyNode node = ( DependencyNode ) it.next();
|
- DependencyNode node = ( DependencyNode ) it.next();
|
||||||
- if ( !it.hasNext() )
|
- if ( !it.hasNext() )
|
||||||
+ DependencyNode node = stack.pop();
|
+ DependencyNode node = stack.pop();
|
||||||
+ if (visited.contains(node))
|
+ if (visited.contains(node))
|
||||||
{
|
{
|
||||||
- /* this is the root, current project */
|
- /* this is the root, current project */
|
||||||
- break;
|
- break;
|
||||||
+ continue;
|
+ continue;
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
- if ( node.getState() != DependencyNode.INCLUDED )
|
- if ( node.getState() != DependencyNode.INCLUDED )
|
||||||
+ visited.add(node);
|
+ visited.add(node);
|
||||||
+ if (node.getChildren() != null)
|
+ if (node.getChildren() != null)
|
||||||
{
|
{
|
||||||
- continue;
|
- continue;
|
||||||
+ stack.addAll(node.getChildren());
|
+ stack.addAll(node.getChildren());
|
||||||
}
|
}
|
||||||
|
|
||||||
+ //if ( node.getState() != DependencyNode.INCLUDED )
|
+ //if ( node.getState() != DependencyNode.INCLUDED )
|
||||||
+ //{
|
+ //{
|
||||||
+ // continue;
|
+ // continue;
|
||||||
+ //}
|
+ //}
|
||||||
+
|
+
|
||||||
if ( Artifact.SCOPE_SYSTEM.equals( node.getArtifact().getScope() ) )
|
if ( Artifact.SCOPE_SYSTEM.equals( node.getArtifact().getScope() ) )
|
||||||
{
|
{
|
||||||
getLog().debug( "Ignoring system scoped artifact " + node.getArtifact() );
|
getLog().debug( "Ignoring system scoped artifact " + node.getArtifact() );
|
||||||
@@ -235,12 +240,11 @@ public class BundleAllPlugin extends ManifestPlugin
|
@@ -235,12 +240,11 @@ public class BundleAllPlugin extends ManifestPlugin
|
||||||
|
|
||||||
node.getArtifact().setFile( artifact.getFile() );
|
node.getArtifact().setFile( artifact.getFile() );
|
||||||
|
|
||||||
- int nodeDepth = node.getDepth();
|
- int nodeDepth = node.getDepth();
|
||||||
- if ( nodeDepth > maxDepth )
|
- if ( nodeDepth > maxDepth )
|
||||||
+ if ( stack.size() > maxDepth )
|
+ if ( stack.size() > maxDepth )
|
||||||
{
|
{
|
||||||
/* node is deeper than we want */
|
/* node is deeper than we want */
|
||||||
getLog().debug(
|
getLog().debug(
|
||||||
- "Ignoring " + node.getArtifact() + ", depth is " + nodeDepth + ", bigger than " + maxDepth );
|
- "Ignoring " + node.getArtifact() + ", depth is " + nodeDepth + ", bigger than " + maxDepth );
|
||||||
+ "Ignoring " + node.getArtifact() + ", depth is " + stack.size() + ", bigger than " + maxDepth );
|
+ "Ignoring " + node.getArtifact() + ", depth is " + stack.size() + ", bigger than " + maxDepth );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
index 426f9d2..bfebfbb 100644
|
index 1dcf1c1..3e4384e 100644
|
||||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
+++ b/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;
|
@@ -72,15 +72,15 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
import org.apache.maven.plugins.annotations.Parameter;
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
+import org.apache.maven.project.DefaultProjectBuildingRequest;
|
+import org.apache.maven.project.DefaultProjectBuildingRequest;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.MavenProjectBuilder;
|
import org.apache.maven.project.MavenProjectBuilder;
|
||||||
import org.apache.maven.project.MavenProjectHelper;
|
import org.apache.maven.project.MavenProjectHelper;
|
||||||
import org.apache.maven.project.ProjectBuildingException;
|
import org.apache.maven.project.ProjectBuildingException;
|
||||||
+import org.apache.maven.project.ProjectBuildingRequest;
|
+import org.apache.maven.project.ProjectBuildingRequest;
|
||||||
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
|
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
|
||||||
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
||||||
import org.apache.maven.shared.dependency.graph.DependencyNode;
|
import org.apache.maven.shared.dependency.graph.DependencyNode;
|
||||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
|
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
|
||||||
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
|
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
|
||||||
import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
|
import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
|
||||||
import org.apache.maven.shared.osgi.Maven2OsgiConverter;
|
import org.apache.maven.shared.osgi.Maven2OsgiConverter;
|
||||||
import org.codehaus.plexus.archiver.UnArchiver;
|
import org.codehaus.plexus.archiver.UnArchiver;
|
||||||
@@ -225,9 +225,6 @@ public class BundlePlugin extends AbstractMojo
|
@@ -225,9 +225,6 @@ public class BundlePlugin extends AbstractMojo
|
||||||
@Component
|
@Component
|
||||||
protected MavenProjectBuilder mavenProjectBuilder;
|
protected MavenProjectBuilder mavenProjectBuilder;
|
||||||
|
|
||||||
- @Component
|
- @Component
|
||||||
- private DependencyTreeBuilder dependencyTreeBuilder;
|
- private DependencyTreeBuilder dependencyTreeBuilder;
|
||||||
-
|
-
|
||||||
/**
|
/**
|
||||||
* The dependency graph builder to use.
|
* The dependency graph builder to use.
|
||||||
*/
|
*/
|
||||||
@@ -347,7 +344,10 @@ public class BundlePlugin extends AbstractMojo
|
@@ -347,7 +344,10 @@ public class BundlePlugin extends AbstractMojo
|
||||||
DependencyNode dependencyGraph;
|
DependencyNode dependencyGraph;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( mavenProject, null );
|
- dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( mavenProject, null );
|
||||||
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
||||||
+ request.setProject(mavenProject);
|
+ request.setProject(mavenProject);
|
||||||
+ request.setRepositorySession(session.getRepositorySession());
|
+ request.setRepositorySession(session.getRepositorySession());
|
||||||
+ dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( request, null );
|
+ dependencyGraph = m_dependencyGraphBuilder.buildDependencyGraph( request, null );
|
||||||
}
|
}
|
||||||
catch ( DependencyGraphBuilderException e )
|
catch ( DependencyGraphBuilderException e )
|
||||||
{
|
{
|
||||||
@@ -758,7 +758,7 @@ public class BundlePlugin extends AbstractMojo
|
@@ -758,7 +758,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
|
// We need to find the direct dependencies that have been included in the uber JAR so that we can modify the
|
||||||
// POM accordingly.
|
// POM accordingly.
|
||||||
private void createDependencyReducedPom( Set<String> artifactsToRemove )
|
private void createDependencyReducedPom( Set<String> artifactsToRemove )
|
||||||
- throws IOException, DependencyTreeBuilderException, ProjectBuildingException
|
- throws IOException, DependencyTreeBuilderException, ProjectBuildingException
|
||||||
+ throws IOException, DependencyGraphBuilderException, ProjectBuildingException
|
+ throws IOException, DependencyGraphBuilderException, ProjectBuildingException
|
||||||
{
|
{
|
||||||
Model model = project.getOriginalModel();
|
Model model = project.getOriginalModel();
|
||||||
List<Dependency> dependencies = new ArrayList<Dependency>();
|
List<Dependency> dependencies = new ArrayList<Dependency>();
|
||||||
@@ -901,24 +901,26 @@ public class BundlePlugin extends AbstractMojo
|
@@ -901,24 +901,26 @@ public class BundlePlugin extends AbstractMojo
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateExcludesInDeps( MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps )
|
public boolean updateExcludesInDeps( MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps )
|
||||||
- throws DependencyTreeBuilderException
|
- throws DependencyTreeBuilderException
|
||||||
+ throws DependencyGraphBuilderException
|
+ throws DependencyGraphBuilderException
|
||||||
{
|
{
|
||||||
- org.apache.maven.shared.dependency.tree.DependencyNode node = dependencyTreeBuilder.buildDependencyTree(project, localRepository, artifactFactory,
|
- org.apache.maven.shared.dependency.tree.DependencyNode node = dependencyTreeBuilder.buildDependencyTree(project, localRepository, artifactFactory,
|
||||||
- artifactMetadataSource, null,
|
- artifactMetadataSource, null,
|
||||||
- artifactCollector);
|
- artifactCollector);
|
||||||
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
+ ProjectBuildingRequest request = new DefaultProjectBuildingRequest();
|
||||||
+ request.setProject(project);
|
+ request.setProject(project);
|
||||||
+ request.setRepositorySession(session.getRepositorySession());
|
+ request.setRepositorySession(session.getRepositorySession());
|
||||||
+ DependencyNode node = dependencyGraphBuilder.buildDependencyGraph(request, null);
|
+ DependencyNode node = dependencyGraphBuilder.buildDependencyGraph(request, null);
|
||||||
boolean modified = false;
|
boolean modified = false;
|
||||||
Iterator it = node.getChildren().listIterator();
|
Iterator it = node.getChildren().listIterator();
|
||||||
while ( it.hasNext() )
|
while ( it.hasNext() )
|
||||||
{
|
{
|
||||||
- org.apache.maven.shared.dependency.tree.DependencyNode n2 = (org.apache.maven.shared.dependency.tree.DependencyNode) it.next();
|
- org.apache.maven.shared.dependency.tree.DependencyNode n2 = (org.apache.maven.shared.dependency.tree.DependencyNode) it.next();
|
||||||
+ DependencyNode n2 = (DependencyNode) it.next();
|
+ DependencyNode n2 = (DependencyNode) it.next();
|
||||||
Iterator it2 = n2.getChildren().listIterator();
|
Iterator it2 = n2.getChildren().listIterator();
|
||||||
while ( it2.hasNext() )
|
while ( it2.hasNext() )
|
||||||
{
|
{
|
||||||
- org.apache.maven.shared.dependency.tree.DependencyNode n3 = (org.apache.maven.shared.dependency.tree.DependencyNode) it2.next();
|
- org.apache.maven.shared.dependency.tree.DependencyNode n3 = (org.apache.maven.shared.dependency.tree.DependencyNode) it2.next();
|
||||||
+ DependencyNode n3 = (DependencyNode) it2.next();
|
+ DependencyNode n3 = (DependencyNode) it2.next();
|
||||||
//anything two levels deep that is marked "included"
|
//anything two levels deep that is marked "included"
|
||||||
//is stuff that was excluded by the original poms, make sure it
|
//is stuff that was excluded by the original poms, make sure it
|
||||||
//remains excluded IF promoting transitives.
|
//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)
|
+ if (true)
|
||||||
{
|
{
|
||||||
//check if it really isn't in the list of original dependencies. Maven
|
//check if it really isn't in the list of original dependencies. Maven
|
||||||
//prior to 2.0.8 may grab versions from transients instead of
|
//prior to 2.0.8 may grab versions from transients instead of
|
||||||
--
|
--
|
||||||
2.14.3
|
2.14.3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3c3ca1818774e9bc6763face9d2a4b23d788488e Mon Sep 17 00:00:00 2001
|
From 17a505c7c7924540f9636e3cd2700cc25a59447e Mon Sep 17 00:00:00 2001
|
||||||
From: Mat Booth <mat.booth@redhat.com>
|
From: Mat Booth <mat.booth@redhat.com>
|
||||||
Date: Thu, 14 Apr 2016 17:00:23 +0100
|
Date: Thu, 14 Apr 2016 17:00:23 +0100
|
||||||
Subject: [PATCH 2/4] Fix for new maven archiver
|
Subject: [PATCH 2/4] Fix for new maven archiver
|
||||||
@ -8,18 +8,18 @@ Subject: [PATCH 2/4] Fix for new maven archiver
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
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
|
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
index bfebfbb..2b8ae02 100644
|
index 3e4384e..a42d6ef 100644
|
||||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
+++ b/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
|
@@ -1101,7 +1101,7 @@ public class BundlePlugin extends AbstractMojo
|
||||||
* Grab customized manifest entries from the maven-jar-plugin configuration
|
* Grab customized manifest entries from the maven-jar-plugin configuration
|
||||||
*/
|
*/
|
||||||
MavenArchiveConfiguration archiveConfig = JarPluginConfiguration.getArchiveConfiguration( currentProject );
|
MavenArchiveConfiguration archiveConfig = JarPluginConfiguration.getArchiveConfiguration( currentProject );
|
||||||
- String mavenManifestText = new MavenArchiver().getManifest( currentProject, archiveConfig ).toString();
|
- String mavenManifestText = new MavenArchiver().getManifest( currentProject, archiveConfig ).toString();
|
||||||
+ String mavenManifestText = new MavenArchiver().getManifest( m_mavenSession, currentProject, archiveConfig ).toString();
|
+ String mavenManifestText = new MavenArchiver().getManifest( m_mavenSession, currentProject, archiveConfig ).toString();
|
||||||
addMavenDescriptor = addMavenDescriptor && archiveConfig.isAddMavenDescriptor();
|
addMavenDescriptor = addMavenDescriptor && archiveConfig.isAddMavenDescriptor();
|
||||||
|
|
||||||
Manifest mavenManifest = new Manifest();
|
Manifest mavenManifest = new Manifest();
|
||||||
--
|
--
|
||||||
2.14.3
|
2.14.3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7d270867e5c02d4523d1de321c6e69e8da8c49a2 Mon Sep 17 00:00:00 2001
|
From 5e514316b5cfbe769b21dc089e2631a9c302dd19 Mon Sep 17 00:00:00 2001
|
||||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
Date: Thu, 12 May 2016 09:24:36 +0200
|
Date: Thu, 12 May 2016 09:24:36 +0200
|
||||||
Subject: [PATCH 3/4] Port to plexus-utils 3.0.24
|
Subject: [PATCH 3/4] Port to plexus-utils 3.0.24
|
||||||
@ -9,27 +9,27 @@ Subject: [PATCH 3/4] Port to plexus-utils 3.0.24
|
|||||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 05e798f..aed3155 100644
|
index 46b2ba6..144f5ad 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -194,7 +194,7 @@
|
@@ -194,7 +194,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
<artifactId>plexus-utils</artifactId>
|
<artifactId>plexus-utils</artifactId>
|
||||||
- <version>3.0.10</version>
|
- <version>3.0.10</version>
|
||||||
+ <version>3.0.24</version>
|
+ <version>3.0.24</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sonatype.plexus</groupId>
|
<groupId>org.sonatype.plexus</groupId>
|
||||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
index 2b8ae02..6bab369 100644
|
index a42d6ef..c858b6b 100644
|
||||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
+++ b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
@@ -1806,7 +1806,14 @@ public class BundlePlugin extends AbstractMojo
|
@@ -1806,7 +1806,14 @@ public class BundlePlugin extends AbstractMojo
|
||||||
File filterFile = new File( i.next() );
|
File filterFile = new File( i.next() );
|
||||||
if ( filterFile.isFile() )
|
if ( filterFile.isFile() )
|
||||||
{
|
{
|
||||||
- properties.putAll( PropertyUtils.loadProperties( filterFile ) );
|
- properties.putAll( PropertyUtils.loadProperties( filterFile ) );
|
||||||
+ try
|
+ try
|
||||||
+ {
|
+ {
|
||||||
+ properties.putAll( PropertyUtils.loadProperties( filterFile ) );
|
+ properties.putAll( PropertyUtils.loadProperties( filterFile ) );
|
||||||
@ -38,9 +38,9 @@ index 2b8ae02..6bab369 100644
|
|||||||
+ {
|
+ {
|
||||||
+ // Ignore
|
+ // Ignore
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.14.3
|
2.14.3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 5fa49250fafc8895ec99d55f76a0d7f57fc70a40 Mon Sep 17 00:00:00 2001
|
From e0f3d1cddc9ce70d8290aafbdaa36e3aa56e5e9d Mon Sep 17 00:00:00 2001
|
||||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
Date: Wed, 12 Oct 2016 23:43:00 +0200
|
Date: Wed, 12 Oct 2016 23:43:00 +0200
|
||||||
Subject: [PATCH 4/4] Use Maven 3 APIs
|
Subject: [PATCH 4/4] Use Maven 3 APIs
|
||||||
@ -9,14 +9,14 @@ Subject: [PATCH 4/4] Use Maven 3 APIs
|
|||||||
2 files changed, 13 insertions(+), 8 deletions(-)
|
2 files changed, 13 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index aed3155..7556d8b 100644
|
index 144f5ad..cf3d7dc 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -179,7 +179,17 @@
|
@@ -179,7 +179,17 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-core</artifactId>
|
<artifactId>maven-core</artifactId>
|
||||||
- <version>2.2.0</version>
|
- <version>2.2.0</version>
|
||||||
+ <version>3.3.9</version>
|
+ <version>3.3.9</version>
|
||||||
+ </dependency>
|
+ </dependency>
|
||||||
+ <dependency>
|
+ <dependency>
|
||||||
@ -28,50 +28,50 @@ index aed3155..7556d8b 100644
|
|||||||
+ <groupId>org.apache.maven.reporting</groupId>
|
+ <groupId>org.apache.maven.reporting</groupId>
|
||||||
+ <artifactId>maven-reporting-impl</artifactId>
|
+ <artifactId>maven-reporting-impl</artifactId>
|
||||||
+ <version>2.4</version>
|
+ <version>2.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
@@ -223,11 +233,6 @@
|
@@ -223,11 +233,6 @@
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>org.jdom</groupId>
|
- <groupId>org.jdom</groupId>
|
||||||
- <artifactId>jdom</artifactId>
|
- <artifactId>jdom</artifactId>
|
||||||
- <version>1.1</version>
|
- <version>1.1</version>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
diff --git a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
index 6bab369..050a922 100644
|
index c858b6b..5023569 100644
|
||||||
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
--- a/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
|
||||||
+++ b/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;
|
@@ -46,7 +46,6 @@ import java.util.TreeMap;
|
||||||
import java.util.jar.Attributes;
|
import java.util.jar.Attributes;
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
|
|
||||||
-import org.apache.felix.bundleplugin.pom.PomWriter;
|
-import org.apache.felix.bundleplugin.pom.PomWriter;
|
||||||
import org.apache.maven.archiver.ManifestSection;
|
import org.apache.maven.archiver.ManifestSection;
|
||||||
import org.apache.maven.archiver.MavenArchiveConfiguration;
|
import org.apache.maven.archiver.MavenArchiveConfiguration;
|
||||||
import org.apache.maven.archiver.MavenArchiver;
|
import org.apache.maven.archiver.MavenArchiver;
|
||||||
@@ -63,6 +62,7 @@ import org.apache.maven.model.Exclusion;
|
@@ -63,6 +62,7 @@ import org.apache.maven.model.Exclusion;
|
||||||
import org.apache.maven.model.License;
|
import org.apache.maven.model.License;
|
||||||
import org.apache.maven.model.Model;
|
import org.apache.maven.model.Model;
|
||||||
import org.apache.maven.model.Resource;
|
import org.apache.maven.model.Resource;
|
||||||
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
+import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.plugin.MojoFailureException;
|
import org.apache.maven.plugin.MojoFailureException;
|
||||||
@@ -864,7 +864,7 @@ public class BundlePlugin extends AbstractMojo
|
@@ -864,7 +864,7 @@ public class BundlePlugin extends AbstractMojo
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- PomWriter.write( w, model, true );
|
- PomWriter.write( w, model, true );
|
||||||
+ new MavenXpp3Writer().write( w, model );
|
+ new MavenXpp3Writer().write( w, model );
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
--
|
--
|
||||||
2.14.3
|
2.14.3
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
%global site_name maven-bundle-plugin
|
%global site_name maven-bundle-plugin
|
||||||
|
|
||||||
Name: maven-plugin-bundle
|
Name: maven-plugin-bundle
|
||||||
Version: 3.4.0
|
Version: 3.5.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Maven Bundle Plugin
|
Summary: Maven Bundle Plugin
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://felix.apache.org
|
URL: http://felix.apache.org
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Source0: http://archive.apache.org/dist/felix/%{site_name}-%{version}-source-release.tar.gz
|
Source0: http://repo2.maven.org/maven2/org/apache/felix/{%site_name}/%{version}/%{site_name}-%{version}-source-release.tar.gz
|
||||||
|
|
||||||
# Needs polishing to be sent upstream
|
# Needs polishing to be sent upstream
|
||||||
Patch0: 0001-Port-to-current-maven-dependency-tree.patch
|
Patch0: 0001-Port-to-current-maven-dependency-tree.patch
|
||||||
@ -111,6 +111,9 @@ rm -f src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
|
|||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 08 2018 Michael Simacek <msimacek@redhat.com> - 3.5.0-1
|
||||||
|
- Update to upstream version 3.5.0
|
||||||
|
|
||||||
* Tue Jan 02 2018 Michael Simacek <msimacek@redhat.com> - 3.4.0-1
|
* Tue Jan 02 2018 Michael Simacek <msimacek@redhat.com> - 3.4.0-1
|
||||||
- Update to upstream version 3.4.0
|
- Update to upstream version 3.4.0
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (maven-bundle-plugin-3.4.0-source-release.tar.gz) = a5f029ab42b1b8622827907eb8136309cfc4d7e49dd9c0431669c35ff249c6ad78be845941c88b86c2cf7033204d1f29a6162058db0290025b1086be28adf6a1
|
SHA512 (maven-bundle-plugin-3.5.0-source-release.tar.gz) = 81f81d61c7c8739788caa22ec615a3bfb6b753e81d8cb05cfaf3bcc5d936877caea5d75c3ac911fed75e0b3bf9822b258ac5f1d5564f88d569bf5102313841f0
|
||||||
|
Loading…
Reference in New Issue
Block a user