Repository: maven
Updated Branches:
  refs/heads/master 44634982a -> 66fc74d62


MNG-6233 don't mix plexus and jsr330 annotations in aether-provider

Signed-off-by: Igor Fedorenko <ifedore...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/66fc74d6
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/66fc74d6
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/66fc74d6

Branch: refs/heads/master
Commit: 66fc74d6296ea0a33f8a9712dc5ed5eb3affd529
Parents: 4463498
Author: Igor Fedorenko <ifedore...@apache.org>
Authored: Tue Mar 28 08:41:38 2017 -0400
Committer: Igor Fedorenko <ifedore...@apache.org>
Committed: Wed May 24 15:33:04 2017 -0400

----------------------------------------------------------------------
 maven-resolver-provider/pom.xml                        |  8 ++------
 .../internal/DefaultArtifactDescriptorReader.java      | 13 +++----------
 .../internal/DefaultVersionRangeResolver.java          |  9 ++-------
 .../repository/internal/DefaultVersionResolver.java    |  9 ++-------
 .../internal/SnapshotMetadataGeneratorFactory.java     |  7 +++++--
 .../internal/VersionsMetadataGeneratorFactory.java     |  7 +++++--
 6 files changed, 19 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index 0d1b481..53e67e5 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -64,10 +64,6 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
     <dependency>
@@ -125,8 +121,8 @@ under the License.
   <build>
     <plugins>
       <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-component-metadata</artifactId>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
     </plugins>
   </build>

http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
----------------------------------------------------------------------
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
index 82e1284..7ccdc05 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
@@ -26,6 +26,7 @@ import java.util.Set;
 
 import javax.inject.Inject;
 import javax.inject.Named;
+import javax.inject.Singleton;
 
 import org.apache.commons.lang3.Validate;
 import org.apache.maven.model.DistributionManagement;
@@ -39,8 +40,6 @@ import org.apache.maven.model.building.ModelBuildingException;
 import org.apache.maven.model.building.ModelBuildingRequest;
 import org.apache.maven.model.building.ModelProblem;
 import org.apache.maven.model.resolution.UnresolvableModelException;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 import org.eclipse.aether.RepositoryEvent;
 import org.eclipse.aether.RepositoryEvent.EventType;
 import org.eclipse.aether.RepositoryException;
@@ -77,31 +76,24 @@ import 
org.eclipse.aether.transfer.ArtifactNotFoundException;
  * @author Benjamin Bentmann
  */
 @Named
-@Component( role = ArtifactDescriptorReader.class )
+@Singleton
 public class DefaultArtifactDescriptorReader
     implements ArtifactDescriptorReader, Service
 {
 
     @SuppressWarnings( "unused" )
-    @Requirement( role = LoggerFactory.class )
     private Logger logger = NullLoggerFactory.LOGGER;
 
-    @Requirement
     private RemoteRepositoryManager remoteRepositoryManager;
 
-    @Requirement
     private VersionResolver versionResolver;
 
-    @Requirement
     private VersionRangeResolver versionRangeResolver;
 
-    @Requirement
     private ArtifactResolver artifactResolver;
 
-    @Requirement
     private RepositoryEventDispatcher repositoryEventDispatcher;
 
-    @Requirement
     private ModelBuilder modelBuilder;
 
     public DefaultArtifactDescriptorReader()
@@ -117,6 +109,7 @@ public class DefaultArtifactDescriptorReader
     {
         setRemoteRepositoryManager( remoteRepositoryManager );
         setVersionResolver( versionResolver );
+        setVersionRangeResolver( versionRangeResolver );
         setArtifactResolver( artifactResolver );
         setModelBuilder( modelBuilder );
         setLoggerFactory( loggerFactory );

http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
----------------------------------------------------------------------
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
index c12c9e0..7a8ad9f 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
@@ -22,8 +22,6 @@ package org.apache.maven.repository.internal;
 import org.apache.commons.lang3.Validate;
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import 
org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 import org.eclipse.aether.RepositoryEvent;
 import org.eclipse.aether.RepositoryEvent.EventType;
 import org.eclipse.aether.RepositorySystemSession;
@@ -56,6 +54,7 @@ import org.eclipse.aether.version.VersionScheme;
 
 import javax.inject.Inject;
 import javax.inject.Named;
+import javax.inject.Singleton;
 
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -69,7 +68,7 @@ import java.util.Map;
  * @author Benjamin Bentmann
  */
 @Named
-@Component( role = VersionRangeResolver.class )
+@Singleton
 public class DefaultVersionRangeResolver
     implements VersionRangeResolver, Service
 {
@@ -77,16 +76,12 @@ public class DefaultVersionRangeResolver
     private static final String MAVEN_METADATA_XML = "maven-metadata.xml";
 
     @SuppressWarnings( "unused" )
-    @Requirement( role = LoggerFactory.class )
     private Logger logger = NullLoggerFactory.LOGGER;
 
-    @Requirement
     private MetadataResolver metadataResolver;
 
-    @Requirement
     private SyncContextFactory syncContextFactory;
 
-    @Requirement
     private RepositoryEventDispatcher repositoryEventDispatcher;
 
     public DefaultVersionRangeResolver()

http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
----------------------------------------------------------------------
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
index c23794b..2789640 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
@@ -24,8 +24,6 @@ import org.apache.maven.artifact.repository.metadata.Snapshot;
 import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import 
org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositoryCache;
 import org.eclipse.aether.RepositoryEvent;
@@ -60,6 +58,7 @@ import org.eclipse.aether.util.ConfigUtils;
 
 import javax.inject.Inject;
 import javax.inject.Named;
+import javax.inject.Singleton;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -75,7 +74,7 @@ import java.util.Map;
  * @author Benjamin Bentmann
  */
 @Named
-@Component( role = VersionResolver.class )
+@Singleton
 public class DefaultVersionResolver
     implements VersionResolver, Service
 {
@@ -89,16 +88,12 @@ public class DefaultVersionResolver
     private static final String SNAPSHOT = "SNAPSHOT";
 
     @SuppressWarnings( "unused" )
-    @Requirement( role = LoggerFactory.class )
     private Logger logger = NullLoggerFactory.LOGGER;
 
-    @Requirement
     private MetadataResolver metadataResolver;
 
-    @Requirement
     private SyncContextFactory syncContextFactory;
 
-    @Requirement
     private RepositoryEventDispatcher repositoryEventDispatcher;
 
     public DefaultVersionResolver()

http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
----------------------------------------------------------------------
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
index 79ffaad..ba6dadf 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/SnapshotMetadataGeneratorFactory.java
@@ -19,7 +19,9 @@ package org.apache.maven.repository.internal;
  * under the License.
  */
 
-import org.codehaus.plexus.component.annotations.Component;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.deployment.DeployRequest;
 import org.eclipse.aether.impl.MetadataGenerator;
@@ -29,7 +31,8 @@ import org.eclipse.aether.installation.InstallRequest;
 /**
  * @author Benjamin Bentmann
  */
-@Component( role = MetadataGeneratorFactory.class, hint = "snapshot" )
+@Named( "snapshot" )
+@Singleton
 public class SnapshotMetadataGeneratorFactory
     implements MetadataGeneratorFactory
 {

http://git-wip-us.apache.org/repos/asf/maven/blob/66fc74d6/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
----------------------------------------------------------------------
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
index 47ef360..eae836a 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/VersionsMetadataGeneratorFactory.java
@@ -19,7 +19,9 @@ package org.apache.maven.repository.internal;
  * under the License.
  */
 
-import org.codehaus.plexus.component.annotations.Component;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.deployment.DeployRequest;
 import org.eclipse.aether.impl.MetadataGenerator;
@@ -29,7 +31,8 @@ import org.eclipse.aether.installation.InstallRequest;
 /**
  * @author Benjamin Bentmann
  */
-@Component( role = MetadataGeneratorFactory.class, hint = "versions" )
+@Named( "versions" )
+@Singleton
 public class VersionsMetadataGeneratorFactory
     implements MetadataGeneratorFactory
 {

Reply via email to