Remove dependency on Sonatype Aether
- Resolves: rhbz#985704
This commit is contained in:
parent
5a44010ab2
commit
353c6644df
106
0001-Port-to-Maven-3.1.0-and-Eclipse-Aether.patch
Normal file
106
0001-Port-to-Maven-3.1.0-and-Eclipse-Aether.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
From 28dd9622dc16e517991a9d45d62a791c75957bc7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Wed, 24 Jul 2013 12:14:30 +0200
|
||||||
|
Subject: [PATCH] Port to Maven 3.1.0 and Eclipse Aether
|
||||||
|
|
||||||
|
---
|
||||||
|
pom.xml | 15 +--------------
|
||||||
|
.../graph/internal/Maven3DependencyGraphBuilder.java | 13 +++++++------
|
||||||
|
2 files changed, 8 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pom.xml b/pom.xml
|
||||||
|
index 8e246aa..7bb6e47 100644
|
||||||
|
--- a/pom.xml
|
||||||
|
+++ b/pom.xml
|
||||||
|
@@ -78,7 +78,7 @@
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-core</artifactId>
|
||||||
|
- <version>3.0.4</version>
|
||||||
|
+ <version>3.1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
@@ -86,27 +86,14 @@
|
||||||
|
<artifactId>plexus-component-annotations</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
- <groupId>org.sonatype.aether</groupId>
|
||||||
|
- <artifactId>aether-api</artifactId>
|
||||||
|
- <version>1.13.1</version>
|
||||||
|
- <optional>true</optional>
|
||||||
|
- </dependency>
|
||||||
|
- <dependency>
|
||||||
|
<groupId>org.eclipse.aether</groupId>
|
||||||
|
<artifactId>aether-api</artifactId>
|
||||||
|
<version>0.9.0.M2</version>
|
||||||
|
- <optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.aether</groupId>
|
||||||
|
<artifactId>aether-util</artifactId>
|
||||||
|
<version>0.9.0.M2</version>
|
||||||
|
- <exclusions>
|
||||||
|
- <exclusion>
|
||||||
|
- <groupId>org.eclipse.aether</groupId>
|
||||||
|
- <artifactId>aether-api</artifactId>
|
||||||
|
- </exclusion>
|
||||||
|
- </exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
diff --git a/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java b/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
|
||||||
|
index b6f49e7..6254021 100644
|
||||||
|
--- a/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
|
||||||
|
+++ b/src/main/java/org/apache/maven/shared/dependency/graph/internal/Maven3DependencyGraphBuilder.java
|
||||||
|
@@ -40,8 +40,8 @@ import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
|
||||||
|
import org.apache.maven.shared.dependency.graph.DependencyNode;
|
||||||
|
import org.codehaus.plexus.component.annotations.Component;
|
||||||
|
import org.codehaus.plexus.component.annotations.Requirement;
|
||||||
|
-import org.sonatype.aether.graph.Dependency;
|
||||||
|
-import org.sonatype.aether.version.VersionConstraint;
|
||||||
|
+import org.eclipse.aether.graph.Dependency;
|
||||||
|
+import org.eclipse.aether.version.VersionConstraint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper around Maven 3 dependency resolver.
|
||||||
|
@@ -101,7 +101,7 @@ public class Maven3DependencyGraphBuilder
|
||||||
|
|
||||||
|
private Artifact getDependencyArtifact( Dependency dep )
|
||||||
|
{
|
||||||
|
- org.sonatype.aether.artifact.Artifact artifact = dep.getArtifact();
|
||||||
|
+ org.eclipse.aether.artifact.Artifact artifact = dep.getArtifact();
|
||||||
|
|
||||||
|
return factory.createDependencyArtifact( artifact.getGroupId(), artifact.getArtifactId(),
|
||||||
|
VersionRange.createFromVersion( artifact.getVersion() ),
|
||||||
|
@@ -109,7 +109,7 @@ public class Maven3DependencyGraphBuilder
|
||||||
|
artifact.getClassifier(), dep.getScope(), dep.isOptional() );
|
||||||
|
}
|
||||||
|
|
||||||
|
- private DependencyNode buildDependencyNode( DependencyNode parent, org.sonatype.aether.graph.DependencyNode node,
|
||||||
|
+ private DependencyNode buildDependencyNode( DependencyNode parent, org.eclipse.aether.graph.DependencyNode node,
|
||||||
|
Artifact artifact, ArtifactFilter filter )
|
||||||
|
{
|
||||||
|
DefaultDependencyNode current =
|
||||||
|
@@ -117,7 +117,7 @@ public class Maven3DependencyGraphBuilder
|
||||||
|
getVersionSelectedFromRange( node.getVersionConstraint() ) );
|
||||||
|
|
||||||
|
List<DependencyNode> nodes = new ArrayList<DependencyNode>( node.getChildren().size() );
|
||||||
|
- for ( org.sonatype.aether.graph.DependencyNode child : node.getChildren() )
|
||||||
|
+ for ( org.eclipse.aether.graph.DependencyNode child : node.getChildren() )
|
||||||
|
{
|
||||||
|
Artifact childArtifact = getDependencyArtifact( child.getDependency() );
|
||||||
|
|
||||||
|
@@ -140,7 +140,8 @@ public class Maven3DependencyGraphBuilder
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
- for ( org.sonatype.aether.version.VersionRange range : constraint.getRanges() )
|
||||||
|
+ org.eclipse.aether.version.VersionRange range = constraint.getRange();
|
||||||
|
+ if ( range != null )
|
||||||
|
{
|
||||||
|
if ( sb.length() > 0 )
|
||||||
|
{
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -9,7 +9,11 @@ Url: http://maven.apache.org/
|
|||||||
Source0: http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
Source0: http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Patch0001: 0001-Port-to-Maven-3.1.0-and-Eclipse-Aether.patch
|
||||||
|
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
|
BuildRequires: aether-api >= 1:0
|
||||||
|
BuildRequires: aether-util >= 1:0
|
||||||
BuildRequires: maven-invoker-plugin
|
BuildRequires: maven-invoker-plugin
|
||||||
BuildRequires: plexus-containers-component-metadata
|
BuildRequires: plexus-containers-component-metadata
|
||||||
BuildRequires: plexus-containers-component-annotations
|
BuildRequires: plexus-containers-component-annotations
|
||||||
@ -29,9 +33,9 @@ This package contains javadoc for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%pom_add_dep org.apache.maven:maven-compat:3.0.4
|
%patch0001 -p1
|
||||||
|
%pom_add_dep org.apache.maven:maven-compat:3.1.0
|
||||||
%pom_add_dep org.apache.maven:maven-artifact:2.2.1
|
%pom_add_dep org.apache.maven:maven-artifact:2.2.1
|
||||||
%pom_remove_dep org.sonatype.aether:
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# we have no jmock yet
|
# we have no jmock yet
|
||||||
@ -47,6 +51,10 @@ This package contains javadoc for %{name}.
|
|||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1-1
|
||||||
|
- Remove dependency on Sonatype Aether
|
||||||
|
- Resolves: rhbz#985704
|
||||||
|
|
||||||
* Mon Jul 22 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1-1
|
* Mon Jul 22 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1-1
|
||||||
- Update to upstream version 2.1
|
- Update to upstream version 2.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user