mirror of https://github.com/apache/maven.git
[MNG-7247] Upgrade Maven Resolver to 1.7.2
This commit is contained in:
parent
52b718614a
commit
453c173713
|
@ -28,7 +28,6 @@ import org.eclipse.aether.RequestTrace;
|
||||||
import org.eclipse.aether.SyncContext;
|
import org.eclipse.aether.SyncContext;
|
||||||
import org.eclipse.aether.impl.MetadataResolver;
|
import org.eclipse.aether.impl.MetadataResolver;
|
||||||
import org.eclipse.aether.impl.RepositoryEventDispatcher;
|
import org.eclipse.aether.impl.RepositoryEventDispatcher;
|
||||||
import org.eclipse.aether.impl.SyncContextFactory;
|
|
||||||
import org.eclipse.aether.impl.VersionRangeResolver;
|
import org.eclipse.aether.impl.VersionRangeResolver;
|
||||||
import org.eclipse.aether.metadata.DefaultMetadata;
|
import org.eclipse.aether.metadata.DefaultMetadata;
|
||||||
import org.eclipse.aether.metadata.Metadata;
|
import org.eclipse.aether.metadata.Metadata;
|
||||||
|
@ -42,6 +41,7 @@ import org.eclipse.aether.resolution.VersionRangeResolutionException;
|
||||||
import org.eclipse.aether.resolution.VersionRangeResult;
|
import org.eclipse.aether.resolution.VersionRangeResult;
|
||||||
import org.eclipse.aether.spi.locator.Service;
|
import org.eclipse.aether.spi.locator.Service;
|
||||||
import org.eclipse.aether.spi.locator.ServiceLocator;
|
import org.eclipse.aether.spi.locator.ServiceLocator;
|
||||||
|
import org.eclipse.aether.spi.synccontext.SyncContextFactory;
|
||||||
import org.eclipse.aether.util.version.GenericVersionScheme;
|
import org.eclipse.aether.util.version.GenericVersionScheme;
|
||||||
import org.eclipse.aether.version.InvalidVersionSpecificationException;
|
import org.eclipse.aether.version.InvalidVersionSpecificationException;
|
||||||
import org.eclipse.aether.version.Version;
|
import org.eclipse.aether.version.Version;
|
||||||
|
|
|
@ -33,7 +33,6 @@ import org.eclipse.aether.SyncContext;
|
||||||
import org.eclipse.aether.artifact.Artifact;
|
import org.eclipse.aether.artifact.Artifact;
|
||||||
import org.eclipse.aether.impl.MetadataResolver;
|
import org.eclipse.aether.impl.MetadataResolver;
|
||||||
import org.eclipse.aether.impl.RepositoryEventDispatcher;
|
import org.eclipse.aether.impl.RepositoryEventDispatcher;
|
||||||
import org.eclipse.aether.impl.SyncContextFactory;
|
|
||||||
import org.eclipse.aether.impl.VersionResolver;
|
import org.eclipse.aether.impl.VersionResolver;
|
||||||
import org.eclipse.aether.metadata.DefaultMetadata;
|
import org.eclipse.aether.metadata.DefaultMetadata;
|
||||||
import org.eclipse.aether.metadata.Metadata;
|
import org.eclipse.aether.metadata.Metadata;
|
||||||
|
@ -49,6 +48,7 @@ import org.eclipse.aether.resolution.VersionResolutionException;
|
||||||
import org.eclipse.aether.resolution.VersionResult;
|
import org.eclipse.aether.resolution.VersionResult;
|
||||||
import org.eclipse.aether.spi.locator.Service;
|
import org.eclipse.aether.spi.locator.Service;
|
||||||
import org.eclipse.aether.spi.locator.ServiceLocator;
|
import org.eclipse.aether.spi.locator.ServiceLocator;
|
||||||
|
import org.eclipse.aether.spi.synccontext.SyncContextFactory;
|
||||||
import org.eclipse.aether.util.ConfigUtils;
|
import org.eclipse.aether.util.ConfigUtils;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
package org.apache.maven.repository.internal;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.inject.Named;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
import org.apache.maven.model.building.DefaultModelBuilderFactory;
|
|
||||||
import org.apache.maven.model.building.ModelBuilder;
|
|
||||||
import org.eclipse.aether.impl.AetherModule;
|
|
||||||
import org.eclipse.aether.impl.ArtifactDescriptorReader;
|
|
||||||
import org.eclipse.aether.impl.MetadataGeneratorFactory;
|
|
||||||
import org.eclipse.aether.impl.VersionRangeResolver;
|
|
||||||
import org.eclipse.aether.impl.VersionResolver;
|
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
|
||||||
import com.google.inject.Provides;
|
|
||||||
import com.google.inject.name.Names;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated As of Maven Resolver 1.0.3, please use class {@link MavenResolverModule}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public final class MavenAetherModule
|
|
||||||
extends AbstractModule
|
|
||||||
{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure()
|
|
||||||
{
|
|
||||||
install( new AetherModule() );
|
|
||||||
bind( ArtifactDescriptorReader.class ) //
|
|
||||||
.to( DefaultArtifactDescriptorReader.class ).in( Singleton.class );
|
|
||||||
bind( VersionResolver.class ) //
|
|
||||||
.to( DefaultVersionResolver.class ).in( Singleton.class );
|
|
||||||
bind( VersionRangeResolver.class ) //
|
|
||||||
.to( DefaultVersionRangeResolver.class ).in( Singleton.class );
|
|
||||||
bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "snapshot" ) ) //
|
|
||||||
.to( SnapshotMetadataGeneratorFactory.class ).in( Singleton.class );
|
|
||||||
bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "versions" ) ) //
|
|
||||||
.to( VersionsMetadataGeneratorFactory.class ).in( Singleton.class );
|
|
||||||
bind( ModelBuilder.class ) //
|
|
||||||
.toInstance( new DefaultModelBuilderFactory().newInstance() );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Provides
|
|
||||||
@Singleton
|
|
||||||
Set<MetadataGeneratorFactory> provideMetadataGeneratorFactories( @Named( "snapshot" )
|
|
||||||
MetadataGeneratorFactory snapshot,
|
|
||||||
@Named( "versions" )
|
|
||||||
MetadataGeneratorFactory versions )
|
|
||||||
{
|
|
||||||
Set<MetadataGeneratorFactory> factories = new HashSet<>();
|
|
||||||
factories.add( snapshot );
|
|
||||||
factories.add( versions );
|
|
||||||
return Collections.unmodifiableSet( factories );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -68,7 +68,9 @@ public final class MavenRepositorySystemUtils
|
||||||
* acquire a complete repository system, clients need to add some repository connectors for remote transfers.
|
* acquire a complete repository system, clients need to add some repository connectors for remote transfers.
|
||||||
*
|
*
|
||||||
* @return The new service locator, never {@code null}.
|
* @return The new service locator, never {@code null}.
|
||||||
|
* @deprecated This method is deprecated along with {@link DefaultServiceLocator} (since Maven Resolver 1.7.0).
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static DefaultServiceLocator newServiceLocator()
|
public static DefaultServiceLocator newServiceLocator()
|
||||||
{
|
{
|
||||||
DefaultServiceLocator locator = new DefaultServiceLocator();
|
DefaultServiceLocator locator = new DefaultServiceLocator();
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -64,7 +64,7 @@ under the License.
|
||||||
<cipherVersion>2.0</cipherVersion>
|
<cipherVersion>2.0</cipherVersion>
|
||||||
<modelloVersion>1.11</modelloVersion>
|
<modelloVersion>1.11</modelloVersion>
|
||||||
<jxpathVersion>1.3</jxpathVersion>
|
<jxpathVersion>1.3</jxpathVersion>
|
||||||
<resolverVersion>1.6.3</resolverVersion>
|
<resolverVersion>1.7.2</resolverVersion>
|
||||||
<slf4jVersion>1.7.32</slf4jVersion>
|
<slf4jVersion>1.7.32</slf4jVersion>
|
||||||
<xmlunitVersion>2.2.1</xmlunitVersion>
|
<xmlunitVersion>2.2.1</xmlunitVersion>
|
||||||
<powermockVersion>1.7.4</powermockVersion>
|
<powermockVersion>1.7.4</powermockVersion>
|
||||||
|
@ -268,7 +268,7 @@ under the License.
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.annotation</groupId>
|
<groupId>javax.annotation</groupId>
|
||||||
<artifactId>javax.annotation-api</artifactId>
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
@ -545,7 +545,7 @@ under the License.
|
||||||
! Excluded the license files itself cause they do not have have a license of themselves.
|
! Excluded the license files itself cause they do not have have a license of themselves.
|
||||||
-->
|
-->
|
||||||
<exclude>src/main/appended-resources/licenses/EPL-1.0.txt</exclude>
|
<exclude>src/main/appended-resources/licenses/EPL-1.0.txt</exclude>
|
||||||
<exclude>src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.2.txt</exclude>
|
<exclude>src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.3.2.txt</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
Loading…
Reference in New Issue