mirror of https://github.com/apache/maven.git
MNG-6233 don't mix plexus and jsr330 annotations in aether-provider
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
This commit is contained in:
parent
44634982a1
commit
66fc74d629
|
@ -62,10 +62,6 @@ under the License.
|
|||
<groupId>org.apache.maven.resolver</groupId>
|
||||
<artifactId>maven-resolver-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
|
@ -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>
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue