Fixing dependencies and adapting to new lib versions

This commit is contained in:
Martin Stockhammer 2018-10-28 13:04:30 +01:00
parent 24ee701d1d
commit d39977c413
31 changed files with 431 additions and 87 deletions

View File

@ -67,5 +67,8 @@
<requiredProperty key="httpcoreVersion"> <requiredProperty key="httpcoreVersion">
<defaultValue>${httpclient.core.version}</defaultValue> <defaultValue>${httpclient.core.version}</defaultValue>
</requiredProperty> </requiredProperty>
<requiredProperty key="asmVersion">
<defaultValue>${asm.version}</defaultValue>
</requiredProperty>
</requiredProperties> </requiredProperties>
</archetype-descriptor> </archetype-descriptor>

View File

@ -40,6 +40,7 @@
<mockito.version>${mockitoVersion}</mockito.version> <mockito.version>${mockitoVersion}</mockito.version>
<httpclient.version>${httpclientVersion}</httpclient.version> <httpclient.version>${httpclientVersion}</httpclient.version>
<httpclient.core.version>${httpcoreVersion}</httpclient.core.version> <httpclient.core.version>${httpcoreVersion}</httpclient.core.version>
<asm.version>${asmVersion}</asm.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
@ -208,6 +209,12 @@
<version>${springockito.version}</version> <version>${springockito.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<!-- match up with those used by Archiva --> <!-- match up with those used by Archiva -->
@ -233,6 +240,11 @@
<artifactId>httpcore</artifactId> <artifactId>httpcore</artifactId>
<version>${httpclient.core.version}</version> <version>${httpclient.core.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -30,4 +30,5 @@ redbackRegistryVersion=${redback.registry.version}
springockitoVersion=${springockito.version} springockitoVersion=${springockito.version}
mockitoVersion=${mockito.version} mockitoVersion=${mockito.version}
httpclientVersion=${httpclient.version} httpclientVersion=${httpclient.version}
httpcoreVersion=${httpclient.core.version} httpcoreVersion=${httpclient.core.version}
asmVersion=${asm.version}

View File

@ -179,6 +179,12 @@
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<pluginManagement> <pluginManagement>

View File

@ -141,6 +141,12 @@
<artifactId>archiva-maven2-indexer</artifactId> <artifactId>archiva-maven2-indexer</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -41,6 +41,35 @@
<groupId>org.apache.maven.shared</groupId> <groupId>org.apache.maven.shared</groupId>
<artifactId>maven-model-converter</artifactId> <artifactId>maven-model-converter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-guice</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-api</artifactId>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-impl</artifactId>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-util</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-checksum</artifactId> <artifactId>archiva-checksum</artifactId>
@ -103,7 +132,7 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Needed for JDK >= 9 --> <!-- START Needed for JDK >= 9 -->
<dependency> <dependency>
<groupId>javax.annotation</groupId> <groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId> <artifactId>javax.annotation-api</artifactId>
@ -115,6 +144,13 @@
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- STOP Needed for JDK >= 9 -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -23,10 +23,12 @@ import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.codehaus.plexus.component.annotations.Component;
/** /**
* @author jdcasey * @author jdcasey
*/ */
@Component( role = ArtifactRepositoryLayout.class, hint = "legacy")
public class LegacyRepositoryLayout public class LegacyRepositoryLayout
implements ArtifactRepositoryLayout implements ArtifactRepositoryLayout
{ {

View File

@ -30,6 +30,7 @@ import org.apache.archiva.repository.scanner.RepositoryScanner;
import org.apache.archiva.repository.scanner.RepositoryScannerException; import org.apache.archiva.repository.scanner.RepositoryScannerException;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -53,7 +54,7 @@ public class DefaultLegacyRepositoryConverter
/** /**
* *
*/ */
private ArtifactRepositoryFactory artifactRepositoryFactory; // private ArtifactRepositoryFactory artifactRepositoryFactory;
/** /**
* *
@ -77,7 +78,7 @@ public class DefaultLegacyRepositoryConverter
public DefaultLegacyRepositoryConverter( PlexusSisuBridge plexusSisuBridge ) public DefaultLegacyRepositoryConverter( PlexusSisuBridge plexusSisuBridge )
throws PlexusSisuBridgeException throws PlexusSisuBridgeException
{ {
artifactRepositoryFactory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class ); // artifactRepositoryFactory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class );
defaultLayout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); defaultLayout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" );
} }
@ -95,8 +96,8 @@ public class DefaultLegacyRepositoryConverter
legacyRepository.setLayout( "legacy" ); legacyRepository.setLayout( "legacy" );
ArtifactRepository repository = ArtifactRepository repository =
artifactRepositoryFactory.createArtifactRepository( "default", defaultRepositoryUrl, defaultLayout, new MavenArtifactRepository("default", defaultRepositoryUrl, defaultLayout, null, null);
null, null );
legacyConverterConsumer.setExcludes( fileExclusionPatterns ); legacyConverterConsumer.setExcludes( fileExclusionPatterns );
legacyConverterConsumer.setDestinationRepository( repository ); legacyConverterConsumer.setDestinationRepository( repository );

View File

@ -22,11 +22,13 @@ package org.apache.archiva.converter;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.archiva.converter.artifact.LegacyRepositoryLayout;
import org.apache.archiva.converter.legacy.LegacyRepositoryConverter; import org.apache.archiva.converter.legacy.LegacyRepositoryConverter;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -73,14 +75,14 @@ public class RepositoryConverterTest
{ {
super.setUp(); super.setUp();
ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class ); // ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class );
//(ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); //(ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE );
ArtifactRepositoryLayout layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "legacy" ); ArtifactRepositoryLayout layout = new LegacyRepositoryLayout();
//(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "legacy" ); //(ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "legacy" );
Path sourceBase = Paths.get( "src/test/source-repository" ); Path sourceBase = Paths.get( "src/test/source-repository" );
sourceRepository = factory.createArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, sourceRepository = new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null,
null ); null );
layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" );

View File

@ -27,7 +27,7 @@ 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.ArtifactMetadata; import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
@ -82,13 +82,13 @@ public class LegacyToDefaultConverterTest
{ {
super.setUp(); super.setUp();
ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class ); // ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class );
ArtifactRepositoryLayout layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "legacy" ); ArtifactRepositoryLayout layout = new LegacyRepositoryLayout();
Path sourceBase = getTestFile( "src/test/source-repository" ); Path sourceBase = getTestFile( "src/test/source-repository" );
sourceRepository = sourceRepository =
factory.createArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null ); new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null );
layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" );
@ -96,7 +96,7 @@ public class LegacyToDefaultConverterTest
copyDirectoryStructure( getTestFile( "src/test/target-repository" ), targetBase ); copyDirectoryStructure( getTestFile( "src/test/target-repository" ), targetBase );
targetRepository = targetRepository =
factory.createArtifactRepository( "target", targetBase.toUri().toURL().toString(), layout, null, null ); new MavenArtifactRepository( "target", targetBase.toUri().toURL().toString(), layout, null, null );
artifactConverter = artifactConverter =
applicationContext.getBean( "artifactConverter#legacy-to-default", ArtifactConverter.class ); applicationContext.getBean( "artifactConverter#legacy-to-default", ArtifactConverter.class );
@ -919,10 +919,9 @@ public class LegacyToDefaultConverterTest
{ {
// test that it fails if the same // test that it fails if the same
ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class );
sourceRepository = sourceRepository =
factory.createArtifactRepository( "source", targetRepository.getUrl(), targetRepository.getLayout(), null, new MavenArtifactRepository( "source", targetRepository.getUrl(), targetRepository.getLayout(), null,
null ); null );
Artifact artifact = createArtifact( "test", "repository-artifact", "1.0" ); Artifact artifact = createArtifact( "test", "repository-artifact", "1.0" );
@ -1043,12 +1042,10 @@ public class LegacyToDefaultConverterTest
private void createModernSourceRepository() private void createModernSourceRepository()
throws Exception throws Exception
{ {
ArtifactRepositoryFactory factory = plexusSisuBridge.lookup( ArtifactRepositoryFactory.class );
ArtifactRepositoryLayout layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" ); ArtifactRepositoryLayout layout = plexusSisuBridge.lookup( ArtifactRepositoryLayout.class, "default" );
Path sourceBase = getTestFile( "src/test/source-modern-repository" ); Path sourceBase = getTestFile( "src/test/source-modern-repository" );
sourceRepository = sourceRepository =
factory.createArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null ); new MavenArtifactRepository( "source", sourceBase.toUri().toURL().toString(), layout, null, null );
} }
} }

View File

@ -242,6 +242,12 @@
<artifactId>log4j-jcl</artifactId> <artifactId>log4j-jcl</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -60,6 +60,16 @@
<artifactId>indexer-core</artifactId> <artifactId>indexer-core</artifactId>
<classifier>shaded-lucene</classifier> <classifier>shaded-lucene</classifier>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
<!-- <!--
<dependency> <dependency>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>

View File

@ -19,6 +19,8 @@ package org.apache.archiva.common.plexusbridge;
* under the License. * under the License.
*/ */
import com.google.inject.AbstractModule;
import org.apache.maven.bridge.MavenRepositorySystem;
import org.codehaus.plexus.DefaultContainerConfiguration; import org.codehaus.plexus.DefaultContainerConfiguration;
import org.codehaus.plexus.DefaultPlexusContainer; import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.PlexusConstants; import org.codehaus.plexus.PlexusConstants;
@ -26,11 +28,13 @@ import org.codehaus.plexus.PlexusContainerException;
import org.codehaus.plexus.classworlds.ClassWorld; import org.codehaus.plexus.classworlds.ClassWorld;
import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.eclipse.sisu.inject.TypeArguments;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -48,6 +52,8 @@ import java.util.Map;
public class PlexusSisuBridge public class PlexusSisuBridge
{ {
private MavenRepositorySystem mavenRepositorySystem = new MavenRepositorySystem();
private Logger log = LoggerFactory.getLogger( getClass() ); private Logger log = LoggerFactory.getLogger( getClass() );
private boolean containerAutoWiring = true; private boolean containerAutoWiring = true;
@ -62,6 +68,16 @@ public class PlexusSisuBridge
private DefaultPlexusContainer plexusContainer; private DefaultPlexusContainer plexusContainer;
class InternalBinder extends AbstractModule {
@Override
protected void configure( )
{
bind( MavenRepositorySystem.class ).toInstance( mavenRepositorySystem );
// bind(TypeArguments.implicitKey( MavenRepositorySystem.class )).to(MavenRepositorySystem.class);
}
}
@PostConstruct @PostConstruct
public void initialize() public void initialize()
throws PlexusSisuBridgeException throws PlexusSisuBridgeException
@ -88,6 +104,7 @@ public class PlexusSisuBridge
for ( URL url : urls ) for ( URL url : urls )
{ {
containerRealm.addURL( url ); containerRealm.addURL( url );
log.debug("Added url {}", url);
} }
} }
@ -100,11 +117,16 @@ public class PlexusSisuBridge
try try
{ {
Thread.currentThread().setContextClassLoader( containerRealm ); Thread.currentThread().setContextClassLoader( containerRealm );
plexusContainer = new DefaultPlexusContainer( conf ); InternalBinder binder = new InternalBinder( );
plexusContainer = new DefaultPlexusContainer( conf, binder );
} }
catch ( PlexusContainerException e ) catch ( PlexusContainerException e )
{ {
throw new PlexusSisuBridgeException( e.getMessage(), e ); throw new PlexusSisuBridgeException( e.getMessage(), e );
} catch (Throwable ex) {
log.error("PlexusSisuBridge initialization failed {}", ex.getMessage(), ex);
throw new PlexusSisuBridgeException( ex.getMessage(), ex );
} }
finally finally
{ {

View File

@ -28,11 +28,11 @@
default-lazy-init="true"> default-lazy-init="true">
<context:annotation-config/> <context:annotation-config/>
<context:component-scan base-package="org.apache.archiva.common.plexusbridge <context:component-scan base-package="org.apache.archiva.common.plexusbridge, org.apache.maven.*"/>
org.apache.maven.index"/>
<!-- <!--
<bean id="indexer" class="org.apache.maven.index.DefaultIndexer"/> <bean id="indexer" class="org.apache.maven.bridge.MavenRepositorySystem.apache.maven.index.DefaultIndexer"/>
<bean id="scanner" class="org.apache.maven.index.DefaultScanner"/> <bean id="scanner" class="org.apache.maven.index.DefaultScanner"/>
<bean id="indexerEngine" class="org.apache.maven.index.DefaultIndexerEngine"/> <bean id="indexerEngine" class="org.apache.maven.index.DefaultIndexerEngine"/>
<bean id="searchEngine" class="org.apache.maven.index.DefaultSearchEngine"/> <bean id="searchEngine" class="org.apache.maven.index.DefaultSearchEngine"/>

View File

@ -76,7 +76,12 @@
<artifactId>archiva-test-utils</artifactId> <artifactId>archiva-test-utils</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -223,7 +223,7 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Needed for JDK >= 9 --> <!-- START Needed for JDK >= 9 -->
<dependency> <dependency>
<groupId>javax.annotation</groupId> <groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId> <artifactId>javax.annotation-api</artifactId>
@ -235,6 +235,14 @@
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- END Needed for JDK >= 9 -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -260,6 +260,12 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -137,7 +137,11 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -115,6 +115,12 @@
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -202,6 +202,12 @@
<artifactId>archiva-maven2-indexer</artifactId> <artifactId>archiva-maven2-indexer</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -403,6 +403,14 @@
<artifactId>jaxb-runtime</artifactId> <artifactId>jaxb-runtime</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -31,7 +31,8 @@
<properties> <properties>
<webappDirectory>${project.build.directory}/container/webapps/archiva</webappDirectory> <webappDirectory>${project.build.directory}/container/webapps/archiva</webappDirectory>
<container.propertiesPortFilePath>${project.build.directory}/container-port.properties</container.propertiesPortFilePath> <container.propertiesPortFilePath>${project.build.directory}/container-port.properties
</container.propertiesPortFilePath>
<maxWaitTimeInMs>10000</maxWaitTimeInMs> <maxWaitTimeInMs>10000</maxWaitTimeInMs>
<selenium-server.version>3.4.0</selenium-server.version> <selenium-server.version>3.4.0</selenium-server.version>
<fluentlenium.version>3.2.0</fluentlenium.version> <fluentlenium.version>3.2.0</fluentlenium.version>
@ -50,20 +51,20 @@
<artifactId>archiva-webapp</artifactId> <artifactId>archiva-webapp</artifactId>
<type>war</type> <type>war</type>
</dependency> </dependency>
<!-- <dependency> <!-- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<exclusions>
<exclusion>
<artifactId>plexus-component-api</artifactId>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>
</exclusion> <artifactId>plexus-utils</artifactId>
</exclusions> </dependency>
</dependency>--> <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<exclusions>
<exclusion>
<artifactId>plexus-component-api</artifactId>
<groupId>org.codehaus.plexus</groupId>
</exclusion>
</exclusions>
</dependency>-->
<!-- <!--
jcr-oak currently needs guava 15.0 and selenium webdriver needs 22.0 jcr-oak currently needs guava 15.0 and selenium webdriver needs 22.0
@ -174,7 +175,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.seleniumhq.selenium</groupId> <groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId> <artifactId>selenium-server</artifactId>
@ -341,8 +341,26 @@
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<version>1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -811,7 +829,7 @@
<configuration> <configuration>
<failOnError>false</failOnError> <failOnError>false</failOnError>
<target> <target>
<delete file="${user.home}/.m2/archiva.xml" /> <delete file="${user.home}/.m2/archiva.xml"/>
</target> </target>
</configuration> </configuration>
</execution> </execution>

View File

@ -793,6 +793,26 @@
<version>${spring.version}</version> <version>${spring.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -258,7 +258,7 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Needed for JDK >= 9 --> <!-- START Needed for JDK >= 9 -->
<dependency> <dependency>
<groupId>javax.annotation</groupId> <groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId> <artifactId>javax.annotation-api</artifactId>
@ -270,6 +270,13 @@
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- END Needed for JDK >= 9 -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -99,8 +99,7 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId> <artifactId>maven-resolver-provider</artifactId>
<version>3.3.9</version>
</dependency> </dependency>
<!-- <!--
@ -124,13 +123,11 @@
<dependency> <dependency>
<groupId>org.eclipse.aether</groupId> <groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId> <artifactId>aether-api</artifactId>
<version>0.9.0.M2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.aether</groupId> <groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-file</artifactId> <artifactId>aether-connector-file</artifactId>
<version>0.9.0.M2</version>
</dependency> </dependency>
<dependency> <dependency>
@ -225,6 +222,12 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -256,6 +256,7 @@ public class Maven3DependencyTreeBuilder
} }
} }
private RepositorySystem newRepositorySystem() private RepositorySystem newRepositorySystem()

View File

@ -75,6 +75,7 @@ import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelProblem; import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.eclipse.aether.impl.VersionRangeResolver;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
@ -291,7 +292,7 @@ public class Maven2RepositoryStorage
// MRM-1411 // MRM-1411
req.setModelResolver( req.setModelResolver(
new RepositoryModelResolver( managedRepository, pathTranslator, wagonFactory, remoteRepositories, new RepositoryModelResolver( managedRepository, pathTranslator, wagonFactory, remoteRepositories,
networkProxies, managedRepository ) ); networkProxies, managedRepository ));
Model model; Model model;
try try

View File

@ -21,6 +21,8 @@ package org.apache.archiva.metadata.repository.storage.maven2;
import org.apache.archiva.admin.model.beans.NetworkProxy; import org.apache.archiva.admin.model.beans.NetworkProxy;
import org.apache.archiva.common.utils.VersionUtil; import org.apache.archiva.common.utils.VersionUtil;
import org.apache.archiva.dependency.tree.maven2.ArchivaRepositoryConnectorFactory;
import org.apache.archiva.indexer.UnsupportedBaseContextException;
import org.apache.archiva.maven2.metadata.MavenMetadataReader; import org.apache.archiva.maven2.metadata.MavenMetadataReader;
import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator;
import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.model.ArchivaRepositoryMetadata;
@ -34,6 +36,7 @@ import org.apache.archiva.repository.RepositoryCredentials;
import org.apache.archiva.xml.XMLException; import org.apache.archiva.xml.XMLException;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.maven.index.context.IndexingContext;
import org.apache.maven.model.Dependency; import org.apache.maven.model.Dependency;
import org.apache.maven.model.Parent; import org.apache.maven.model.Parent;
import org.apache.maven.model.Repository; import org.apache.maven.model.Repository;
@ -42,6 +45,10 @@ import org.apache.maven.model.building.ModelSource;
import org.apache.maven.model.resolution.InvalidRepositoryException; import org.apache.maven.model.resolution.InvalidRepositoryException;
import org.apache.maven.model.resolution.ModelResolver; import org.apache.maven.model.resolution.ModelResolver;
import org.apache.maven.model.resolution.UnresolvableModelException; import org.apache.maven.model.resolution.UnresolvableModelException;
import org.apache.maven.repository.internal.DefaultArtifactDescriptorReader;
import org.apache.maven.repository.internal.DefaultVersionRangeResolver;
import org.apache.maven.repository.internal.DefaultVersionResolver;
import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
import org.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.TransferFailedException; import org.apache.maven.wagon.TransferFailedException;
@ -50,6 +57,26 @@ import org.apache.maven.wagon.authentication.AuthenticationException;
import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.authorization.AuthorizationException; import org.apache.maven.wagon.authorization.AuthorizationException;
import org.apache.maven.wagon.proxy.ProxyInfo; import org.apache.maven.wagon.proxy.ProxyInfo;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.collection.DependencySelector;
import org.eclipse.aether.impl.ArtifactDescriptorReader;
import org.eclipse.aether.impl.DefaultServiceLocator;
import org.eclipse.aether.impl.VersionRangeResolver;
import org.eclipse.aether.impl.VersionResolver;
import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.LocalRepositoryManager;
import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
import org.eclipse.aether.resolution.VersionRangeRequest;
import org.eclipse.aether.resolution.VersionRangeResolutionException;
import org.eclipse.aether.resolution.VersionRangeResult;
import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
import org.eclipse.aether.util.graph.selector.AndDependencySelector;
import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -63,6 +90,10 @@ import java.util.Map;
public class RepositoryModelResolver public class RepositoryModelResolver
implements ModelResolver implements ModelResolver
{ {
private RepositorySystemSession session;
private VersionRangeResolver versionRangeResolver;
private Path basedir; private Path basedir;
private RepositoryPathTranslator pathTranslator; private RepositoryPathTranslator pathTranslator;
@ -77,6 +108,8 @@ public class RepositoryModelResolver
private static final String METADATA_FILENAME = "maven-metadata.xml"; private static final String METADATA_FILENAME = "maven-metadata.xml";
private DefaultServiceLocator locator;
// key/value: remote repo ID/network proxy // key/value: remote repo ID/network proxy
Map<String, NetworkProxy> networkProxyMap; Map<String, NetworkProxy> networkProxyMap;
@ -91,7 +124,7 @@ public class RepositoryModelResolver
public RepositoryModelResolver( ManagedRepository managedRepository, RepositoryPathTranslator pathTranslator, public RepositoryModelResolver( ManagedRepository managedRepository, RepositoryPathTranslator pathTranslator,
WagonFactory wagonFactory, List<RemoteRepository> remoteRepositories, WagonFactory wagonFactory, List<RemoteRepository> remoteRepositories,
Map<String, NetworkProxy> networkProxiesMap, ManagedRepository targetRepository ) Map<String, NetworkProxy> networkProxiesMap, ManagedRepository targetRepository)
{ {
this( Paths.get( managedRepository.getLocation() ), pathTranslator ); this( Paths.get( managedRepository.getLocation() ), pathTranslator );
@ -104,6 +137,45 @@ public class RepositoryModelResolver
this.networkProxyMap = networkProxiesMap; this.networkProxyMap = networkProxiesMap;
this.targetRepository = targetRepository; this.targetRepository = targetRepository;
this.locator = MavenRepositorySystemUtils.newServiceLocator( );
locator.addService( RepositoryConnectorFactory.class,
ArchivaRepositoryConnectorFactory.class );// FileRepositoryConnectorFactory.class );
locator.addService( VersionResolver.class, DefaultVersionResolver.class );
locator.addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
locator.addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
this.session = newRepositorySystemSession( newRepositorySystem(), managedRepository.getLocalPath().toString() );
this.versionRangeResolver = locator.getService(VersionRangeResolver.class);
}
private RepositorySystem newRepositorySystem()
{
return locator.getService( RepositorySystem.class );
}
private RepositorySystemSession newRepositorySystemSession( RepositorySystem system, String localRepoDir )
{
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession( );
LocalRepository repo = new LocalRepository( localRepoDir );
DependencySelector depFilter = new AndDependencySelector( new ExclusionDependencySelector() );
session.setDependencySelector( depFilter );
SimpleLocalRepositoryManagerFactory repFactory = new SimpleLocalRepositoryManagerFactory( );
try
{
LocalRepositoryManager manager = repFactory.newInstance( session, repo );
session.setLocalRepositoryManager(manager);
}
catch ( NoLocalRepositoryManagerException e )
{
e.printStackTrace( );
}
return session;
} }
@Override @Override
@ -163,18 +235,41 @@ public class RepositoryModelResolver
return new FileModelSource( model.toFile() ); return new FileModelSource( model.toFile() );
} }
// TODO: v3.0.0 Implement this method public ModelSource resolveModel(Parent parent) throws UnresolvableModelException {
@Override try {
public ModelSource resolveModel( Parent parent ) throws UnresolvableModelException Artifact artifact = new DefaultArtifact(parent.getGroupId(), parent.getArtifactId(), "", "pom", parent.getVersion());
{ VersionRangeRequest versionRangeRequest;
return null; versionRangeRequest = new VersionRangeRequest(artifact, null, null);
VersionRangeResult versionRangeResult = this.versionRangeResolver.resolveVersionRange(this.session, versionRangeRequest);
if (versionRangeResult.getHighestVersion() == null) {
throw new UnresolvableModelException(String.format("No versions matched the requested parent version range '%s'", parent.getVersion()), parent.getGroupId(), parent.getArtifactId(), parent.getVersion());
} else if (versionRangeResult.getVersionConstraint() != null && versionRangeResult.getVersionConstraint().getRange() != null && versionRangeResult.getVersionConstraint().getRange().getUpperBound() == null) {
throw new UnresolvableModelException(String.format("The requested parent version range '%s' does not specify an upper bound", parent.getVersion()), parent.getGroupId(), parent.getArtifactId(), parent.getVersion());
} else {
parent.setVersion(versionRangeResult.getHighestVersion().toString());
return this.resolveModel(parent.getGroupId(), parent.getArtifactId(), parent.getVersion());
}
} catch ( VersionRangeResolutionException var5) {
throw new UnresolvableModelException(var5.getMessage(), parent.getGroupId(), parent.getArtifactId(), parent.getVersion(), var5);
}
} }
// TODO: v3.0.0 Implement this method public ModelSource resolveModel(Dependency dependency) throws UnresolvableModelException {
@Override try {
public ModelSource resolveModel( Dependency dependency ) throws UnresolvableModelException Artifact artifact = new DefaultArtifact(dependency.getGroupId(), dependency.getArtifactId(), "", "pom", dependency.getVersion());
{ VersionRangeRequest versionRangeRequest = new VersionRangeRequest(artifact, null, null);
return null; VersionRangeResult versionRangeResult = this.versionRangeResolver.resolveVersionRange(this.session, versionRangeRequest);
if (versionRangeResult.getHighestVersion() == null) {
throw new UnresolvableModelException(String.format("No versions matched the requested dependency version range '%s'", dependency.getVersion()), dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion());
} else if (versionRangeResult.getVersionConstraint() != null && versionRangeResult.getVersionConstraint().getRange() != null && versionRangeResult.getVersionConstraint().getRange().getUpperBound() == null) {
throw new UnresolvableModelException(String.format("The requested dependency version range '%s' does not specify an upper bound", dependency.getVersion()), dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion());
} else {
dependency.setVersion(versionRangeResult.getHighestVersion().toString());
return this.resolveModel(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion());
}
} catch (VersionRangeResolutionException var5) {
throw new UnresolvableModelException(var5.getMessage(), dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion(), var5);
}
} }
protected Path findTimeStampedSnapshotPom( String groupId, String artifactId, String version, protected Path findTimeStampedSnapshotPom( String groupId, String artifactId, String version,
@ -237,7 +332,7 @@ public class RepositoryModelResolver
public ModelResolver newCopy() public ModelResolver newCopy()
{ {
return new RepositoryModelResolver( managedRepository, pathTranslator, wagonFactory, remoteRepositories, return new RepositoryModelResolver( managedRepository, pathTranslator, wagonFactory, remoteRepositories,
networkProxyMap, targetRepository ); networkProxyMap, targetRepository);
} }
// FIXME: we need to do some refactoring, we cannot re-use the proxy components of archiva-proxy in maven2-repository // FIXME: we need to do some refactoring, we cannot re-use the proxy components of archiva-proxy in maven2-repository

View File

@ -179,7 +179,14 @@
<artifactId>metrics-core</artifactId> <artifactId>metrics-core</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
</dependency> </dependency>
</dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build> <build>
<testResources> <testResources>
<testResource> <testResource>

View File

@ -118,6 +118,13 @@
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

86
pom.xml
View File

@ -55,8 +55,9 @@
<commons-lang.version>2.6</commons-lang.version> <commons-lang.version>2.6</commons-lang.version>
<maven3x.version>3.5.4</maven3x.version> <maven3x.version>3.5.4</maven3x.version>
<maven.version>2.0.8</maven.version> <maven.artifact-manager.version>2.2.1</maven.artifact-manager.version>
<aether.version>1.13.1</aether.version> <sonatype.aether.version>1.13.1</sonatype.aether.version>
<eclipse.aether.version>0.9.0.M2</eclipse.aether.version>
<maven-model-converter.version>2.1</maven-model-converter.version> <maven-model-converter.version>2.1</maven-model-converter.version>
<maven.indexer.version>6.0.0</maven.indexer.version> <maven.indexer.version>6.0.0</maven.indexer.version>
@ -89,9 +90,12 @@
<guava.version>15.0</guava.version> <guava.version>15.0</guava.version>
<openjpaVersion>2.4.1</openjpaVersion> <openjpaVersion>2.4.1</openjpaVersion>
<asm.version>5.0.4</asm.version>
<!-- restore when we will be able to use a derby in memory database --> <!-- restore when we will be able to use a derby in memory database -->
<redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl> <redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>
<redbackTestJdbcDriver>org.apache.derby.jdbc.EmbeddedDriver</redbackTestJdbcDriver> <redbackTestJdbcDriver>org.apache.derby.jdbc.EmbeddedDriver</redbackTestJdbcDriver>
<sisu-inject-plexus.version>0.3.3</sisu-inject-plexus.version> <sisu-inject-plexus.version>0.3.3</sisu-inject-plexus.version>
<plexus-digest.version>1.1</plexus-digest.version> <plexus-digest.version>1.1</plexus-digest.version>
<plexus-expression-evaluator.version>2.1</plexus-expression-evaluator.version> <plexus-expression-evaluator.version>2.1</plexus-expression-evaluator.version>
@ -818,6 +822,9 @@
<artifactId>mail</artifactId> <artifactId>mail</artifactId>
<version>${javaxMailVersion}</version> <version>${javaxMailVersion}</version>
</dependency> </dependency>
<!-- Maven related dependencies -->
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId> <artifactId>maven-model</artifactId>
@ -844,12 +851,12 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId> <artifactId>maven-artifact</artifactId>
<version>${maven.version}</version> <version>${maven3x.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId> <artifactId>maven-artifact-manager</artifactId>
<version>${maven.version}</version> <version>${maven.artifact-manager.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>
@ -858,32 +865,54 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-util</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-connector-file</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId> <artifactId>maven-repository-metadata</artifactId>
<version>${maven3x.version}</version> <version>${maven3x.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-resolver-provider</artifactId>
<version>${maven3x.version}</version>
</dependency>
<!-- Eclipse aether -->
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${eclipse.aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-file</artifactId>
<version>${eclipse.aether.version}</version>
</dependency>
<!-- Sonatype aether -->
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${sonatype.aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${sonatype.aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-util</artifactId>
<version>${sonatype.aether.version}</version>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-connector-file</artifactId>
<version>${sonatype.aether.version}</version>
</dependency>
<!-- <!--
<dependency> <dependency>
<groupId>org.codehaus.plexus</groupId> <groupId>org.codehaus.plexus</groupId>
@ -1561,6 +1590,15 @@
<version>2.3.0</version> <version>2.3.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>