diff options
author | Brett Porter <brett@apache.org> | 2009-12-01 16:01:31 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-12-01 16:01:31 +0000 |
commit | 52bcd1b58bb5ba151c1dc577a649cab9135f2a20 (patch) | |
tree | aa39d20e431824ec4f974f0beb0930472b0d284a /archiva-modules/plugins | |
parent | e195adc06c86dafef0353f49993bd836963ce848 (diff) | |
download | archiva-52bcd1b58bb5ba151c1dc577a649cab9135f2a20.tar.gz archiva-52bcd1b58bb5ba151c1dc577a649cab9135f2a20.zip |
[MRM-1292] replace the dependency graph by a maven-dependency-tree based implementation (maven-project is not used)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@885812 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
11 files changed, 1899 insertions, 1 deletions
diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml index 0256af235..89d00adb5 100644 --- a/archiva-modules/plugins/maven2-repository/pom.xml +++ b/archiva-modules/plugins/maven2-repository/pom.xml @@ -55,6 +55,21 @@ <groupId>org.apache.maven</groupId> <artifactId>maven-model-builder</artifactId> </dependency> + <!-- TODO: remove when dependency-tree declares it explicitly, it is currently through the excluded maven-project --> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-artifact</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-dependency-tree</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.archiva</groupId> <artifactId>archiva-configuration</artifactId> diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DefaultDependencyTreeBuilder.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DefaultDependencyTreeBuilder.java new file mode 100644 index 000000000..706349fe4 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DefaultDependencyTreeBuilder.java @@ -0,0 +1,445 @@ +package org.apache.archiva.dependency.tree.maven2; + +/* + * 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.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.archiva.metadata.repository.MetadataResolver; +import org.apache.archiva.metadata.repository.MetadataResolverException; +import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; +import org.apache.archiva.metadata.repository.storage.maven2.RepositoryModelResolver; +import org.apache.commons.lang.StringUtils; +import org.apache.maven.archiva.configuration.ArchivaConfiguration; +import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.factory.ArtifactFactory; +import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; +import org.apache.maven.artifact.metadata.ArtifactMetadataSource; +import org.apache.maven.artifact.metadata.ResolutionGroup; +import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.resolver.ArtifactCollector; +import org.apache.maven.artifact.resolver.ArtifactResolutionException; +import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; +import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter; +import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.DefaultArtifactVersion; +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +import org.apache.maven.artifact.versioning.ManagedVersionMap; +import org.apache.maven.artifact.versioning.VersionRange; +import org.apache.maven.model.Dependency; +import org.apache.maven.model.DependencyManagement; +import org.apache.maven.model.Exclusion; +import org.apache.maven.model.Model; +import org.apache.maven.model.building.DefaultModelBuildingRequest; +import org.apache.maven.model.building.ModelBuilder; +import org.apache.maven.model.building.ModelBuildingException; +import org.apache.maven.model.building.ModelBuildingRequest; +import org.apache.maven.model.resolution.UnresolvableModelException; +import org.apache.maven.shared.dependency.tree.DependencyNode; +import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; +import org.apache.maven.shared.dependency.tree.DependencyTreeResolutionListener; +import org.apache.maven.shared.dependency.tree.filter.AncestorOrSelfDependencyNodeFilter; +import org.apache.maven.shared.dependency.tree.filter.DependencyNodeFilter; +import org.apache.maven.shared.dependency.tree.filter.StateDependencyNodeFilter; +import org.apache.maven.shared.dependency.tree.traversal.BuildingDependencyNodeVisitor; +import org.apache.maven.shared.dependency.tree.traversal.CollectingDependencyNodeVisitor; +import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; +import org.apache.maven.shared.dependency.tree.traversal.FilteringDependencyNodeVisitor; +import org.codehaus.plexus.logging.AbstractLogEnabled; + +/** + * Default implementation of <code>DependencyTreeBuilder</code>. Customized wrapper for maven-dependency-tree to use + * maven-model-builder instead of maven-project. Note that the role must differ to avoid conflicting with the + * maven-shared implementation. + * + * @plexus.component role="org.apache.archiva.dependency.tree.maven2.DependencyTreeBuilder" role-hint="maven2" + */ +public class DefaultDependencyTreeBuilder + extends AbstractLogEnabled + implements DependencyTreeBuilder +{ + /** + * @plexus.requirement + */ + private ArtifactFactory factory; + + /** + * @plexus.requirement + */ + private ArtifactCollector collector; + + /** + * @plexus.requirement + */ + private ModelBuilder builder; + + /** + * @plexus.requirement + */ + private MetadataResolver metadataResolver; + + /** + * @plexus.requirement role-hint="maven2" + */ + private RepositoryPathTranslator pathTranslator; + + /** + * @plexus.requirement + */ + private ArchivaConfiguration archivaConfiguration; + + public void buildDependencyTree( List<String> repositoryIds, String groupId, String artifactId, String version, + DependencyNodeVisitor nodeVisitor ) + throws DependencyTreeBuilderException + { + DependencyTreeResolutionListener listener = new DependencyTreeResolutionListener( getLogger() ); + + Artifact projectArtifact = factory.createProjectArtifact( groupId, artifactId, version ); + File basedir = findArtifactInRepositories( repositoryIds, projectArtifact ); + + if ( basedir == null ) + { + // metadata could not be resolved + return; + } + + try + { + Model model = + buildProject( new RepositoryModelResolver( basedir, pathTranslator ), groupId, artifactId, version ); + + Map managedVersions = createManagedVersionMap( model ); + + Set<Artifact> dependencyArtifacts = createArtifacts( model, null ); + + ArtifactMetadataSource metadataSource = new MetadataArtifactMetadataSource( repositoryIds ); + + // Note that we don't permit going to external repositories. We don't need to pass in a local and remote + // since our metadata source has control over them + collector.collect( dependencyArtifacts, projectArtifact, managedVersions, null, null, metadataSource, null, + Collections.singletonList( listener ) ); + + DependencyNode rootNode = listener.getRootNode(); + + // TODO: remove the need for this when the serializer can calculate last nodes from visitor calls only + DependencyNodeVisitor visitor = new BuildingDependencyNodeVisitor( nodeVisitor ); + + CollectingDependencyNodeVisitor collectingVisitor = new CollectingDependencyNodeVisitor(); + DependencyNodeVisitor firstPassVisitor = + new FilteringDependencyNodeVisitor( collectingVisitor, StateDependencyNodeFilter.INCLUDED ); + rootNode.accept( firstPassVisitor ); + + DependencyNodeFilter secondPassFilter = + new AncestorOrSelfDependencyNodeFilter( collectingVisitor.getNodes() ); + visitor = new FilteringDependencyNodeVisitor( visitor, secondPassFilter ); + + rootNode.accept( visitor ); + } + catch ( ArtifactResolutionException e ) + { + throw new DependencyTreeBuilderException( "Cannot build project dependency tree " + e.getMessage(), e ); + } + catch ( InvalidVersionSpecificationException e ) + { + throw new DependencyTreeBuilderException( "Invalid dependency version for artifact " + projectArtifact ); + } + catch ( ModelBuildingException e ) + { + throw new DependencyTreeBuilderException( "Cannot build project dependency tree " + e.getMessage(), e ); + } + catch ( UnresolvableModelException e ) + { + throw new DependencyTreeBuilderException( "Cannot build project dependency tree " + e.getMessage(), e ); + } + } + + private File findArtifactInRepositories( List<String> repositoryIds, Artifact projectArtifact ) + { + for ( String repoId : repositoryIds ) + { + ManagedRepositoryConfiguration repositoryConfiguration = + archivaConfiguration.getConfiguration().findManagedRepositoryById( repoId ); + + File repoDir = new File( repositoryConfiguration.getLocation() ); + File file = pathTranslator.toFile( repoDir, projectArtifact.getGroupId(), projectArtifact.getArtifactId(), + projectArtifact.getBaseVersion(), + projectArtifact.getArtifactId() + "-" + projectArtifact.getVersion() + + ".pom" ); + + if ( file.exists() ) + { + return repoDir; + } + } + return null; + } + + private Model buildProject( RepositoryModelResolver modelResolver, String groupId, String artifactId, + String version ) + throws ModelBuildingException, UnresolvableModelException + { + ModelBuildingRequest req = new DefaultModelBuildingRequest(); + req.setProcessPlugins( false ); + req.setModelSource( modelResolver.resolveModel( groupId, artifactId, version ) ); + req.setModelResolver( modelResolver ); + req.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL ); + + return builder.build( req ).getEffectiveModel(); + } + + // from maven-project to avoid the dependency on it + private Set<Artifact> createArtifacts( Model model, ArtifactFilter dependencyFilter ) + throws InvalidVersionSpecificationException + { + Collection<Dependency> dependencies = model.getDependencies(); + Set<Artifact> projectArtifacts = new LinkedHashSet<Artifact>( dependencies.size() ); + + for ( Dependency dependency : dependencies ) + { + String scope = dependency.getScope(); + + if ( StringUtils.isEmpty( scope ) ) + { + scope = Artifact.SCOPE_COMPILE; + + dependency.setScope( scope ); + } + + VersionRange versionRange = VersionRange.createFromVersionSpec( dependency.getVersion() ); + Artifact artifact = + factory.createDependencyArtifact( dependency.getGroupId(), dependency.getArtifactId(), versionRange, + dependency.getType(), dependency.getClassifier(), scope, null, + dependency.isOptional() ); + + if ( Artifact.SCOPE_SYSTEM.equals( scope ) ) + { + artifact.setFile( new File( dependency.getSystemPath() ) ); + } + + ArtifactFilter artifactFilter = dependencyFilter; + + // MNG-3769: It would be nice to be able to process relocations here, + // so we could have this filtering step apply to post-relocated dependencies. + // HOWEVER, this would require a much more invasive POM resolution process + // in order to look for relocations, which would make the early steps in + // a Maven build way too heavy. + if ( artifact != null && ( artifactFilter == null || artifactFilter.include( artifact ) ) ) + { + if ( dependency.getExclusions() != null && !dependency.getExclusions().isEmpty() ) + { + List<String> exclusions = new ArrayList<String>(); + for ( Object o : dependency.getExclusions() ) + { + Exclusion e = (Exclusion) o; + exclusions.add( e.getGroupId() + ":" + e.getArtifactId() ); + } + + ArtifactFilter newFilter = new ExcludesArtifactFilter( exclusions ); + + if ( artifactFilter != null ) + { + AndArtifactFilter filter = new AndArtifactFilter(); + filter.add( artifactFilter ); + filter.add( newFilter ); + artifactFilter = filter; + } + else + { + artifactFilter = newFilter; + } + } + + artifact.setDependencyFilter( artifactFilter ); + + projectArtifacts.add( artifact ); + } + } + + return projectArtifacts; + + } + + // from maven-project to avoid the dependency on it + + private Map createManagedVersionMap( Model model ) + throws InvalidVersionSpecificationException + { + DependencyManagement dependencyManagement = model.getDependencyManagement(); + + Map<String, Artifact> map = null; + List<Dependency> deps; + if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null ) && + ( deps.size() > 0 ) ) + { + map = new ManagedVersionMap( map ); + + for ( Dependency dependency : dependencyManagement.getDependencies() ) + { + + VersionRange versionRange = VersionRange.createFromVersionSpec( dependency.getVersion() ); + + Artifact artifact = + factory.createDependencyArtifact( dependency.getGroupId(), dependency.getArtifactId(), versionRange, + dependency.getType(), dependency.getClassifier(), + dependency.getScope(), dependency.isOptional() ); + if ( getLogger().isDebugEnabled() ) + { + getLogger().debug( " " + artifact ); + } + + // If the dependencyManagement section listed exclusions, + // add them to the managed artifacts here so that transitive + // dependencies will be excluded if necessary. + if ( ( null != dependency.getExclusions() ) && !dependency.getExclusions().isEmpty() ) + { + List<String> exclusions = new ArrayList<String>(); + + for ( Exclusion exclusion : dependency.getExclusions() ) + { + exclusions.add( exclusion.getGroupId() + ":" + exclusion.getArtifactId() ); + } + ExcludesArtifactFilter eaf = new ExcludesArtifactFilter( exclusions ); + artifact.setDependencyFilter( eaf ); + } + else + { + artifact.setDependencyFilter( null ); + } + map.put( dependency.getManagementKey(), artifact ); + } + } + else + { + map = Collections.emptyMap(); + } + + return map; + } + + private class MetadataArtifactMetadataSource + implements ArtifactMetadataSource + { + private final List<String> repositoryIds; + + public MetadataArtifactMetadataSource( List<String> repositoryIds ) + { + this.repositoryIds = repositoryIds; + } + + // modified version from MavenMetadataSource to work with the simpler environment + public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository, + List remoteRepositories ) + throws ArtifactMetadataRetrievalException + { + // TODO: we removed relocation support here. This is something that might need to be generically handled + // throughout this module + + Artifact pomArtifact = + factory.createProjectArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), + artifact.getScope() ); + + File basedir = findArtifactInRepositories( repositoryIds, pomArtifact ); + + Model project = null; + if ( !Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) && basedir != null ) + { + try + { + project = + buildProject( new RepositoryModelResolver( basedir, pathTranslator ), artifact.getGroupId(), + artifact.getArtifactId(), artifact.getVersion() ); + } + catch ( ModelBuildingException e ) + { + throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact ); + } + catch ( UnresolvableModelException e ) + { + throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact ); + } + } + + ResolutionGroup result; + + if ( project == null ) + { + // TODO: we could record this so that it is displayed in the dependency tree as (...) or similar + + // if the project is null, we encountered an invalid model (read: m1 POM) + // we'll just return an empty resolution group. + // or used the inherited scope (should that be passed to the buildFromRepository method above?) + result = new ResolutionGroup( pomArtifact, Collections.emptySet(), Collections.emptyList() ); + } + else + { + Set artifacts = Collections.emptySet(); + if ( !artifact.getArtifactHandler().isIncludesDependencies() ) + { + try + { + artifacts = createArtifacts( project, artifact.getDependencyFilter() ); + } + catch ( InvalidVersionSpecificationException e ) + { + throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact ); + } + } + + result = new ResolutionGroup( pomArtifact, artifacts, Collections.emptyList() ); + } + + return result; + } + + public List retrieveAvailableVersions( Artifact artifact, ArtifactRepository localRepository, + List remoteRepositories ) + throws ArtifactMetadataRetrievalException + { + try + { + Set<ArtifactVersion> versions = new HashSet<ArtifactVersion>(); + for ( String repoId : repositoryIds ) + { + Collection<String> projectVersions = + metadataResolver.getProjectVersions( repoId, artifact.getGroupId(), artifact.getArtifactId() ); + for ( String version : projectVersions ) + { + versions.add( new DefaultArtifactVersion( version ) ); + } + } + + return new ArrayList<ArtifactVersion>( versions ); + } + catch ( MetadataResolverException e ) + { + throw new ArtifactMetadataRetrievalException( e.getMessage(), e, artifact ); + } + } + } +} diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilder.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilder.java new file mode 100644 index 000000000..963d4733c --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilder.java @@ -0,0 +1,47 @@ +package org.apache.archiva.dependency.tree.maven2; + +/* + * 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.List; + +import org.apache.maven.artifact.factory.DefaultArtifactFactory; +import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; +import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; + +/** + * Builds a tree of dependencies for a given Maven project. Customized wrapper for maven-dependency-tree to use + * maven-model-builder instead of maven-project. + */ +public interface DependencyTreeBuilder +{ + /** + * Builds a tree of dependencies for the specified Maven project. + * + * @param repositoryIds the list of repositories to search for metadata + * @param groupId the project groupId to build the tree for + * @param artifactId the project artifactId to build the tree for + * @param version the project version to build the tree for + * @param nodeVisitor visitor to apply to all nodes discovered + * @throws DependencyTreeBuilderException if the dependency tree cannot be resolved + */ + public void buildDependencyTree( List<String> repositoryIds, String groupId, String artifactId, String version, + DependencyNodeVisitor nodeVisitor ) + throws DependencyTreeBuilderException; +} diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.java new file mode 100644 index 000000000..7f2836f77 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.java @@ -0,0 +1,268 @@ +package org.apache.archiva.dependency.tree.maven2; + +/* + * 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 org.apache.maven.archiva.configuration.ArchivaConfiguration; +import org.apache.maven.archiva.configuration.Configuration; +import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.artifact.factory.ArtifactFactory; +import org.apache.maven.artifact.versioning.VersionRange; +import org.apache.maven.shared.dependency.tree.DependencyNode; +import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; +import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; +import org.codehaus.plexus.spring.PlexusInSpringTestCase; +import org.easymock.MockControl; + +public class DependencyTreeBuilderTest + extends PlexusInSpringTestCase +{ + private DependencyTreeBuilder builder; + + private static final String TEST_REPO_ID = "test"; + + private static final String TEST_VERSION = "1.2.1"; + + private static final String TEST_ARTIFACT_ID = "archiva-common"; + + private static final String TEST_GROUP_ID = "org.apache.archiva"; + + private ArtifactFactory artifactFactory; + + @Override + protected void setUp() + throws Exception + { + super.setUp(); + + ArchivaConfiguration config = (ArchivaConfiguration) lookup( ArchivaConfiguration.class ); + + Configuration configuration = new Configuration(); + ManagedRepositoryConfiguration repoConfig = new ManagedRepositoryConfiguration(); + repoConfig.setId( TEST_REPO_ID ); + repoConfig.setLocation( getTestPath( "src/test/repositories/test" ) ); + configuration.addManagedRepository( repoConfig ); + config.save( configuration ); + + builder = (DependencyTreeBuilder) lookup( DependencyTreeBuilder.class, "maven2" ); + artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.class ); + } + + public void testBuilder() + throws DependencyTreeBuilderException + { + MockControl control = MockControl.createStrictControl( DependencyNodeVisitor.class ); + DependencyNodeVisitor visitor = (DependencyNodeVisitor) control.getMock(); + + DependencyNode springContext = + new DependencyNode( createArtifact( "org.springframework", "spring-context", "2.5.6" ) ); + springContext.setPremanagedVersion( "2.5.5" ); + DependencyNode springTest = + new DependencyNode( createArtifact( "org.springframework", "spring-test", "2.5.5", "test" ) ); + DependencyNode plexusUtils = + new DependencyNode( createArtifact( "org.codehaus.plexus", "plexus-utils", "1.4.5" ) ); + plexusUtils.setPremanagedVersion( "1.5.1" ); + DependencyNode slf4jLog4j12 = + new DependencyNode( createArtifact( "org.slf4j", "slf4j-log4j12", "1.5.0", "runtime" ) ); + slf4jLog4j12.setPremanagedScope( "test" ); + DependencyNode plexusLog4j = new DependencyNode( + createArtifact( "org.codehaus.plexus", "plexus-log4j-logging", "1.1-alpha-3", "test" ) ); + DependencyNode log4j = new DependencyNode( createArtifact( "log4j", "log4j", "1.2.14", "test" ) ); + DependencyNode mavenArtifact = + new DependencyNode( createArtifact( "org.apache.maven", "maven-artifact", "2.0.8", "test" ) ); + DependencyNode mavenProject = + new DependencyNode( createArtifact( "org.apache.maven", "maven-project", "2.0.8", "test" ) ); + DependencyNode mavenCore = + new DependencyNode( createArtifact( "org.apache.maven", "maven-core", "2.0.8", "test" ) ); + DependencyNode mavenSettings = + new DependencyNode( createArtifact( "org.apache.maven", "maven-settings", "2.0.8", "test" ) ); + DependencyNode mavenModel = + new DependencyNode( createArtifact( "org.apache.maven", "maven-model", "2.0.8", "test" ) ); + DependencyNode plexusCommandLine = + new DependencyNode( createArtifact( "org.codehaus.plexus", "plexus-command-line", "1.0-alpha-2", "test" ) ); + DependencyNode plexusRegistryCommons = new DependencyNode( + createArtifact( "org.codehaus.plexus.registry", "plexus-registry-commons", "1.0-alpha-2", "test" ) ); + plexusRegistryCommons.setPremanagedVersion( "1.0-alpha-3" ); + DependencyNode plexusRegistryApi = new DependencyNode( + createArtifact( "org.codehaus.plexus.registry", "plexus-registry-api", "1.0-alpha-2", "test" ) ); + plexusRegistryApi.setPremanagedVersion( "1.0-alpha-3" ); + + DependencyNode plexusSpring = + new DependencyNode( createArtifact( "org.codehaus.plexus", "plexus-spring", "1.2", "test" ) ); + plexusSpring.addChild( springContext ); + plexusSpring.addChild( springTest ); + plexusSpring.addChild( plexusUtils ); + plexusSpring.addChild( slf4jLog4j12 ); + plexusSpring.addChild( plexusLog4j ); + plexusSpring.addChild( log4j ); + plexusSpring.addChild( mavenArtifact ); + plexusSpring.addChild( mavenProject ); + plexusSpring.addChild( mavenCore ); + plexusSpring.addChild( mavenSettings ); + plexusSpring.addChild( mavenModel ); + plexusSpring.addChild( plexusCommandLine ); + plexusSpring.addChild( plexusRegistryCommons ); + plexusSpring.addChild( plexusRegistryApi ); + + DependencyNode commonsLang = new DependencyNode( createArtifact( "commons-lang", "commons-lang", "2.2" ) ); + DependencyNode commonsIO = new DependencyNode( createArtifact( "commons-io", "commons-io", "1.4" ) ); + DependencyNode slf4j = new DependencyNode( createArtifact( "org.slf4j", "slf4j-api", "1.5.0" ) ); + DependencyNode plexusAPI = + new DependencyNode( createArtifact( "org.codehaus.plexus", "plexus-component-api", "1.0-alpha-22" ) ); + DependencyNode xalan = new DependencyNode( createArtifact( "xalan", "xalan", "2.7.0" ) ); + DependencyNode dom4j = new DependencyNode( createArtifact( "dom4j", "dom4j", "1.6.1", "test" ) ); + dom4j.setFailedUpdateScope( "compile" ); + DependencyNode junit = new DependencyNode( createArtifact( "junit", "junit", "3.8.1", "test" ) ); + DependencyNode easymock = new DependencyNode( createArtifact( "easymock", "easymock", "1.2_Java1.3", "test" ) ); + DependencyNode easymockExt = + new DependencyNode( createArtifact( "easymock", "easymockclassextension", "1.2", "test" ) ); + + DependencyNode mainNode = + new DependencyNode( createProjectArtifact( TEST_GROUP_ID, TEST_ARTIFACT_ID, TEST_VERSION ) ); + mainNode.addChild( commonsLang ); + mainNode.addChild( commonsIO ); + mainNode.addChild( slf4j ); + mainNode.addChild( plexusAPI ); + mainNode.addChild( plexusSpring ); + mainNode.addChild( xalan ); + mainNode.addChild( dom4j ); + mainNode.addChild( junit ); + mainNode.addChild( easymock ); + mainNode.addChild( easymockExt ); + + control.expectAndReturn( visitor.visit( mainNode ), true ); + + control.expectAndReturn( visitor.visit( commonsLang ), true ); + control.expectAndReturn( visitor.endVisit( commonsLang ), true ); + + control.expectAndReturn( visitor.visit( commonsIO ), true ); + control.expectAndReturn( visitor.endVisit( commonsIO ), true ); + + control.expectAndReturn( visitor.visit( slf4j ), true ); + control.expectAndReturn( visitor.endVisit( slf4j ), true ); + + control.expectAndReturn( visitor.visit( plexusAPI ), true ); + control.expectAndReturn( visitor.endVisit( plexusAPI ), true ); + + control.expectAndReturn( visitor.visit( plexusSpring ), true ); + + control.expectAndReturn( visitor.visit( springContext ), true ); + control.expectAndReturn( visitor.endVisit( springContext ), true ); + + control.expectAndReturn( visitor.visit( springTest ), true ); + control.expectAndReturn( visitor.endVisit( springTest ), true ); + + control.expectAndReturn( visitor.visit( plexusUtils ), true ); + control.expectAndReturn( visitor.endVisit( plexusUtils ), true ); + + control.expectAndReturn( visitor.visit( slf4jLog4j12 ), true ); + control.expectAndReturn( visitor.endVisit( slf4jLog4j12 ), true ); + + control.expectAndReturn( visitor.visit( plexusLog4j ), true ); + control.expectAndReturn( visitor.endVisit( plexusLog4j ), true ); + + control.expectAndReturn( visitor.visit( log4j ), true ); + control.expectAndReturn( visitor.endVisit( log4j ), true ); + + control.expectAndReturn( visitor.visit( mavenArtifact ), true ); + control.expectAndReturn( visitor.endVisit( mavenArtifact ), true ); + + control.expectAndReturn( visitor.visit( mavenProject ), true ); + control.expectAndReturn( visitor.endVisit( mavenProject ), true ); + + control.expectAndReturn( visitor.visit( mavenCore ), true ); + control.expectAndReturn( visitor.endVisit( mavenCore ), true ); + + control.expectAndReturn( visitor.visit( mavenSettings ), true ); + control.expectAndReturn( visitor.endVisit( mavenSettings ), true ); + + control.expectAndReturn( visitor.visit( mavenModel ), true ); + control.expectAndReturn( visitor.endVisit( mavenModel ), true ); + + control.expectAndReturn( visitor.visit( plexusCommandLine ), true ); + control.expectAndReturn( visitor.endVisit( plexusCommandLine ), true ); + + control.expectAndReturn( visitor.visit( plexusRegistryCommons ), true ); + control.expectAndReturn( visitor.endVisit( plexusRegistryCommons ), true ); + + control.expectAndReturn( visitor.visit( plexusRegistryApi ), true ); + control.expectAndReturn( visitor.endVisit( plexusRegistryApi ), true ); + + control.expectAndReturn( visitor.endVisit( plexusSpring ), true ); + + control.expectAndReturn( visitor.visit( xalan ), true ); + control.expectAndReturn( visitor.endVisit( xalan ), true ); + + control.expectAndReturn( visitor.visit( dom4j ), true ); + control.expectAndReturn( visitor.endVisit( dom4j ), true ); + + control.expectAndReturn( visitor.visit( junit ), true ); + control.expectAndReturn( visitor.endVisit( junit ), true ); + + control.expectAndReturn( visitor.visit( easymock ), true ); + control.expectAndReturn( visitor.endVisit( easymock ), true ); + + control.expectAndReturn( visitor.visit( easymockExt ), true ); + control.expectAndReturn( visitor.endVisit( easymockExt ), true ); + + control.expectAndReturn( visitor.endVisit( mainNode ), true ); + + control.replay(); + + builder.buildDependencyTree( Collections.singletonList( TEST_REPO_ID ), TEST_GROUP_ID, TEST_ARTIFACT_ID, + TEST_VERSION, visitor ); + + control.verify(); + } + + private Artifact createProjectArtifact( String groupId, String artifactId, String version ) + { + return artifactFactory.createProjectArtifact( groupId, artifactId, version ); + } + + private Artifact createArtifact( String groupId, String artifactId, String version, String scope ) + { + return artifactFactory.createDependencyArtifact( groupId, artifactId, VersionRange.createFromVersion( version ), + "jar", null, scope ); + } + + private Artifact createArtifact( String groupId, String artifactId, String version ) + { + return createArtifact( groupId, artifactId, version, Artifact.SCOPE_COMPILE ); + } + + public void testBuilderMissingDependency() + throws DependencyTreeBuilderException + { + MockControl control = MockControl.createStrictControl( DependencyNodeVisitor.class ); + DependencyNodeVisitor visitor = (DependencyNodeVisitor) control.getMock(); + + // not visited + + control.replay(); + + builder.buildDependencyTree( Collections.singletonList( TEST_REPO_ID ), TEST_GROUP_ID, TEST_ARTIFACT_ID, + "not-a-version", visitor ); + + control.verify(); + } +} diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataResolver.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataResolver.java new file mode 100644 index 000000000..48afc6940 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataResolver.java @@ -0,0 +1,75 @@ +package org.apache.archiva.metadata.repository; + +import java.util.Collection; + +import org.apache.archiva.metadata.model.ProjectMetadata; +import org.apache.archiva.metadata.model.ProjectVersionMetadata; +import org.apache.archiva.metadata.model.ProjectVersionReference; + +/* + * 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. + */ + +public class TestMetadataResolver + implements MetadataResolver +{ + public ProjectMetadata getProject( String repoId, String namespace, String projectId ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId, + String projectVersion ) + throws MetadataResolverException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<String> getArtifactVersions( String repoId, String namespace, String projectId, + String projectVersion ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<ProjectVersionReference> getProjectReferences( String repoId, String namespace, String projectId, + String projectVersion ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<String> getRootNamespaces( String repoId ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<String> getNamespaces( String repoId, String namespace ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<String> getProjects( String repoId, String namespace ) + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public Collection<String> getProjectVersions( String repoId, String namespace, String projectId ) + throws MetadataResolverException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } +} diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java index ea3a53379..99a072c01 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java @@ -231,7 +231,7 @@ public class Maven2RepositoryMetadataResolverTest assertEquals( Arrays.asList( "test" ), resolver.getNamespaces( TEST_REPO_ID, "com.example" ) ); assertEquals( Collections.<String>emptyList(), resolver.getNamespaces( TEST_REPO_ID, "com.example.test" ) ); - assertEquals( Arrays.asList( "apache" ), resolver.getNamespaces( TEST_REPO_ID, "org" ) ); + assertEquals( Arrays.asList( "apache", "codehaus" ), resolver.getNamespaces( TEST_REPO_ID, "org" ) ); assertEquals( Arrays.asList( "archiva", "maven" ), resolver.getNamespaces( TEST_REPO_ID, "org.apache" ) ); assertEquals( Collections.<String>emptyList(), resolver.getNamespaces( TEST_REPO_ID, "org.apache.archiva" ) ); assertEquals( Arrays.asList( "plugins", "shared" ), @@ -240,6 +240,9 @@ public class Maven2RepositoryMetadataResolverTest resolver.getNamespaces( TEST_REPO_ID, "org.apache.maven.plugins" ) ); assertEquals( Collections.<String>emptyList(), resolver.getNamespaces( TEST_REPO_ID, "org.apache.maven.shared" ) ); + + assertEquals( Arrays.asList( "plexus" ), resolver.getNamespaces( TEST_REPO_ID, "org.codehaus" ) ); + assertEquals( Collections.<String>emptyList(), resolver.getNamespaces( TEST_REPO_ID, "org.codehaus.plexus" ) ); } public void testGetProjects() diff --git a/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-components/1.1.12/plexus-components-1.1.12.pom b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-components/1.1.12/plexus-components-1.1.12.pom new file mode 100644 index 000000000..87df0c9f4 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-components/1.1.12/plexus-components-1.1.12.pom @@ -0,0 +1,88 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>plexus</artifactId> + <groupId>org.codehaus.plexus</groupId> + <version>1.0.10</version> + <relativePath>../pom/pom.xml</relativePath> + </parent> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-components</artifactId> + <packaging>pom</packaging> + <version>1.1.12</version> + <name>Plexus Components Parent Project</name> + <url>http://plexus.codehaus.org/plexus-components</url> + <dependencies> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-component-api</artifactId> + <version>1.0-alpha-20</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> + <version>1.0-alpha-20</version> + <scope>test</scope> + </dependency> + </dependencies> + <modules> + <module>plexus-action</module> + <module>plexus-archiver</module> + <module>plexus-bayesian</module> + <module>plexus-command</module> + <module>plexus-compiler</module> + <module>plexus-drools</module> + <module>plexus-formica</module> + <module>plexus-formica-web</module> + <module>plexus-hibernate</module> + <module>plexus-i18n</module> + <module>plexus-interactivity</module> + <module>plexus-ircbot</module> + <module>plexus-jdo</module> + <module>plexus-jetty-httpd</module> + <module>plexus-jetty</module> + <module>plexus-mimetyper</module> + <module>plexus-mail-sender</module> + <module>plexus-notification</module> + <module>plexus-resources</module> + <module>plexus-taskqueue</module> + <module>plexus-velocity</module> + <module>plexus-xmlrpc</module> + </modules> + <scm> + <connection>scm:svn:http://svn.codehaus.org/plexus/plexus-components/trunk/</connection> + <developerConnection>scm:svn:https://svn.codehaus.org/plexus/plexus-components/trunk</developerConnection> + <url>http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/</url> + </scm> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-maven-plugin</artifactId> + <version>1.3.4</version> + <executions> + <execution> + <goals> + <goal>descriptor</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <reporting> + <plugins> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-jxr-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-maven-plugin</artifactId> + <version>1.3.4</version> + </plugin> + </plugins> + </reporting> +</project> diff --git a/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-spring/1.2/plexus-spring-1.2.pom b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-spring/1.2/plexus-spring-1.2.pom new file mode 100644 index 000000000..1b13027c1 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus-spring/1.2/plexus-spring-1.2.pom @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-components</artifactId> + <version>1.1.12</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-spring</artifactId> + <version>1.2</version> + <name>Plexus to Spring Adapter</name> + + <description>Bridge utility to use plexus components in a SpringFramework context.</description> + <properties> + <springVersion>2.5.5</springVersion> + </properties> + <dependencies> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${springVersion}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${springVersion}</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${springVersion}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-component-api</artifactId> + <version>1.0-alpha-22</version> + </dependency> + <dependency> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + <version>1.6.1</version> + </dependency> + <dependency> + <groupId>com.opensymphony</groupId> + <artifactId>webwork</artifactId> + <version>2.2.6</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + <version>1.5.1</version> + </dependency> + + <!-- for struts2 integration --> + <dependency> + <groupId>org.apache.struts</groupId> + <artifactId>struts2-spring-plugin</artifactId> + <version>2.1.2</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.0</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.2</version> + <scope>compile</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-log4j-logging</artifactId> + <version>1.1-alpha-3</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.14</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-artifact</artifactId> + <scope>test</scope> + <version>2.0.8</version> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.0.8</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-core</artifactId> + <version>2.0.8</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-settings</artifactId> + <version>2.0.8</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-model</artifactId> + <version>2.0.8</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-command-line</artifactId> + <version>1.0-alpha-2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.codehaus.plexus.registry</groupId> + <artifactId>plexus-registry-commons</artifactId> + <version>1.0-alpha-3</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>ant</groupId> + <artifactId>ant-optional</artifactId> + </exclusion> + <exclusion> + <groupId>jdom</groupId> + <artifactId>jdom</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.codehaus.plexus.registry</groupId> + <artifactId>plexus-registry-api</artifactId> + <version>1.0-alpha-3</version> + <scope>test</scope> + </dependency> + </dependencies> + + <developers> + <developer> + <email>nicolas@apache.org</email> + <name>Nicolas De Loof</name> + </developer> + </developers> + + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.0.2</version> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-release-plugin</artifactId> + <version>2.0-beta-7</version> + <configuration> + <useReleaseProfile>true</useReleaseProfile> + <tagBase>https://svn.codehaus.org/plexus/plexus-components/tags/</tagBase> + <arguments>-Prelease</arguments> + </configuration> + </plugin> + </plugins> + </build> + + <scm> + <connection>scm:svn:http://svn.codehaus.org/plexus/plexus-components/tags/plexus-spring-1.2</connection> + <developerConnection>scm:svn:https://svn.codehaus.org/plexus/plexus-components/tags/plexus-spring-1.2</developerConnection> + <url>http://fisheye.codehaus.org/browse/plexus/plexus-components/tags/plexus-spring-1.2</url> + </scm> + +</project> diff --git a/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus/1.0.10/plexus-1.0.10.pom b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus/1.0.10/plexus-1.0.10.pom new file mode 100644 index 000000000..9c02e387a --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/repositories/test/org/codehaus/plexus/plexus/1.0.10/plexus-1.0.10.pom @@ -0,0 +1,273 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus</artifactId>
+ <packaging>pom</packaging>
+ <name>Plexus</name>
+ <version>1.0.10</version>
+ <ciManagement>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>dev@plexus.codehaus.org</address>
+ </configuration>
+ </notifier>
+ <notifier>
+ <type>irc</type>
+ <configuration>
+ <host>irc.codehaus.org</host>
+ <port>6667</port>
+ <channel>#plexus</channel>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <inceptionYear>2001</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>Plexus User List</name>
+ <subscribe>http://xircles.codehaus.org/manage_email/user%40plexus.codehaus.org</subscribe>
+ <unsubscribe>http://xircles.codehaus.org/manage_email/user%40plexus.codehaus.org</unsubscribe>
+ <archive>http://archive.plexus.codehaus.org/user</archive>
+ </mailingList>
+ <mailingList>
+ <name>Plexus Developer List</name>
+ <subscribe>http://xircles.codehaus.org/manage_email/dev%40plexus.codehaus.org</subscribe>
+ <unsubscribe>http://xircles.codehaus.org/manage_email/dev%40plexus.codehaus.org</unsubscribe>
+ <archive>http://archive.plexus.codehaus.org/dev</archive>
+ </mailingList>
+ <mailingList>
+ <name>Plexus Announce List</name>
+ <subscribe>http://xircles.codehaus.org/manage_email/announce%40plexus.codehaus.org</subscribe>
+ <unsubscribe>http://xircles.codehaus.org/manage_email/announce%40plexus.codehaus.org</unsubscribe>
+ <archive>http://archive.plexus.codehaus.org/announce</archive>
+ </mailingList>
+ <mailingList>
+ <name>Plexus Commit List</name>
+ <subscribe>http://xircles.codehaus.org/manage_email/scm%40plexus.codehaus.org</subscribe>
+ <unsubscribe>http://xircles.codehaus.org/manage_email/scm%40plexus.codehaus.org</unsubscribe>
+ <archive>http://archive.plexus.codehaus.org/scm</archive>
+ </mailingList>
+ </mailingLists>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.codehaus.org/browse/PLX</url>
+ </issueManagement>
+
+ <distributionManagement>
+ <repository>
+ <id>codehaus.org</id>
+ <name>Plexus Central Repository</name>
+ <url>dav:https://dav.codehaus.org/repository/plexus</url>
+ </repository>
+ <snapshotRepository>
+ <id>codehaus.org</id>
+ <name>Plexus Central Development Repository</name>
+ <url>dav:https://dav.codehaus.org/snapshots.repository/plexus</url>
+ </snapshotRepository>
+ <site>
+ <id>codehaus.org</id>
+ <url>dav:https://dav.codehaus.org/plexus</url>
+ </site>
+ </distributionManagement>
+ <repositories>
+ <repository>
+ <id>codehaus.snapshots</id>
+ <name>Codehaus Snapshot Development Repository</name>
+ <url>http://snapshots.repository.codehaus.org</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <developers>
+ <developer>
+ <id>jvanzyl</id>
+ <name>Jason van Zyl</name>
+ <email>jason@maven.org</email>
+ <roles>
+ <role>Developer</role>
+ <role>Release Manager</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>kaz</id>
+ <name>Pete Kazmier</name>
+ <email />
+ <organization />
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>jtaylor</id>
+ <name>James Taylor</name>
+ <email>james@jamestaylor.org</email>
+ <organization />
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>dandiep</id>
+ <name>Dan Diephouse</name>
+ <email>dan@envoisolutions.com</email>
+ <organization>Envoi solutions</organization>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>kasper</id>
+ <name>Kasper Nielsen</name>
+ <email>apache@kav.dk</email>
+ <organization />
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>bwalding</id>
+ <name>Ben Walding</name>
+ <email>bwalding@codehaus.org</email>
+ <organization>Walding Consulting Services</organization>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>mhw</id>
+ <name>Mark Wilkinson</name>
+ <email>mhw@kremvax.net</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>michal</id>
+ <name>Michal Maczka</name>
+ <email>mmaczka@interia.pl</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>evenisse</id>
+ <name>Emmanuel Venisse</name>
+ <email>evenisse@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Trygve Laugstol</name>
+ <id>trygvis</id>
+ <email>trygvis@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Kenney Westerhof</name>
+ <id>kenney</id>
+ <email>kenney@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Carlos Sanchez</name>
+ <id>carlos</id>
+ <email>carlos@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Brett Porter</name>
+ <id>brett</id>
+ <email>brett@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>John Casey</name>
+ <id>jdcasey</id>
+ <email>jdcasey@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Andrew Williams</name>
+ <id>handyande</id>
+ <email>andy@handyande.co.uk</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Rahul Thakur</name>
+ <id>rahul</id>
+ <email>rahul.thakur.xdev@gmail.com</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Joakim Erdfelt</name>
+ <id>joakime</id>
+ <email>joakim@erdfelt.com</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Olivier Lamy</name>
+ <id>olamy</id>
+ <email>olamy@codehaus.org</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ </developers>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <scm>
+ <connection>scm:svn:http://svn.codehaus.org/plexus/pom/tags/plexus-1.0.10</connection>
+ <developerConnection>scm:svn:https://svn.codehaus.org/plexus/pom/tags/plexus-1.0.10</developerConnection>
+ <url>http://fisheye.codehaus.org/browse/plexus/pom/tags/plexus-1.0.10</url>
+ </scm>
+ <organization>
+ <name>Codehaus</name>
+ <url>http://www.codehaus.org/</url>
+ </organization>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ </build>
+</project>
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/commons-io/commons-io/1.4/commons-io-1.4.pom b/archiva-modules/plugins/maven2-repository/src/test/resources/commons-io/commons-io/1.4/commons-io-1.4.pom new file mode 100644 index 000000000..df250af94 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/resources/commons-io/commons-io/1.4/commons-io-1.4.pom @@ -0,0 +1,419 @@ +<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>7</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ <name>Commons IO</name>
+
+ <inceptionYear>2002</inceptionYear>
+ <description>
+ Commons-IO contains utility classes, stream implementations, file filters, file comparators and endian classes.
+ </description>
+
+ <url>http://commons.apache.org/io/</url>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://issues.apache.org/jira/browse/IO</url>
+ </issueManagement>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/io/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/io/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/commons/proper/io/trunk</url>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Scott Sanders</name>
+ <id>sanders</id>
+ <email>sanders@apache.org</email>
+ <organization></organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>dIon Gillard</name>
+ <id>dion</id>
+ <email>dion@apache.org</email>
+ <organization></organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Nicola Ken Barozzi</name>
+ <id>nicolaken</id>
+ <email>nicolaken@apache.org</email>
+ <organization></organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Henri Yandell</name>
+ <id>bayard</id>
+ <email>bayard@apache.org</email>
+ <organization></organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Stephen Colebourne</name>
+ <id>scolebourne</id>
+ <organization></organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ <timezone>0</timezone>
+ </developer>
+ <developer>
+ <name>Jeremias Maerki</name>
+ <id>jeremias</id>
+ <email>jeremias@apache.org</email>
+ <organization/>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
+ <name>Matthew Hawthorne</name>
+ <id>matth</id>
+ <email>matth@apache.org</email>
+ <organization/>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Martin Cooper</name>
+ <id>martinc</id>
+ <email>martinc@apache.org</email>
+ <organization/>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Rob Oxspring</name>
+ <id>roxspring</id>
+ <email>roxspring@apache.org</email>
+ <organization/>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Jochen Wiedmann</name>
+ <id>jochen</id>
+ <email>jochen.wiedmann@gmail.com</email>
+ </developer>
+ <developer>
+ <name>Niall Pemberton</name>
+ <id>niallp</id>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Jukka Zitting</name>
+ <id>jukka</id>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>Rahul Akolkar</name>
+ </contributor>
+ <contributor>
+ <name>Jason Anderson</name>
+ </contributor>
+ <contributor>
+ <name>Nathan Beyer</name>
+ </contributor>
+ <contributor>
+ <name>Emmanuel Bourg</name>
+ </contributor>
+ <contributor>
+ <name>Chris Eldredge</name>
+ </contributor>
+ <contributor>
+ <name>Magnus Grimsell</name>
+ </contributor>
+ <contributor>
+ <name>Jim Harrington</name>
+ </contributor>
+ <contributor>
+ <name>Thomas Ledoux</name>
+ </contributor>
+ <contributor>
+ <name>Andy Lehane</name>
+ </contributor>
+ <contributor>
+ <name>Marcelo Liberato</name>
+ </contributor>
+ <contributor>
+ <name>Alban Peignier</name>
+ <email>alban.peignier at free.fr</email>
+ </contributor>
+ <contributor>
+ <name>Ian Springer</name>
+ </contributor>
+ <contributor>
+ <name>Masato Tezuka</name>
+ </contributor>
+ <contributor>
+ <name>James Urie</name>
+ </contributor>
+ <contributor>
+ <name>Frank W. Zammetti</name>
+ </contributor>
+ </contributors>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <sourceDirectory>src/java</sourceDirectory>
+ <testSourceDirectory>src/test</testSourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test*</include>
+ </includes>
+ <excludes>
+ <exclude>**/*AbstractTestCase*</exclude>
+ <exclude>**/AllIOTestSuite*</exclude>
+ <exclude>**/PackageTestSuite*</exclude>
+ <exclude>**/testtools/**</exclude>
+
+ <!-- http://jira.codehaus.org/browse/SUREFIRE-44 -->
+ <exclude>**/*$*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <!--
+ Configure OSGi bundle information
+ (remove when maven bundle plugin is added to commons-parent pom)
+ -->
+ <manifestEntries>
+ <Bundle-SymbolicName>org.apache.commons.io</Bundle-SymbolicName>
+ <Bundle-License>http://www.apache.org/licenses/LICENSE-2.0.txt</Bundle-License>
+ <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
+ <Bundle-Name>Apache Commons IO Bundle</Bundle-Name>
+ <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
+ <Bundle-Version>${project.version}</Bundle-Version>
+ <Export-Package>
+org.apache.commons.io;version=${project.version},
+org.apache.commons.io.comparator;version=${project.version},
+org.apache.commons.io.filefilter;version=${project.version},
+org.apache.commons.io.input;version=${project.version},
+org.apache.commons.io.output;version=${project.version}
+ </Export-Package>
+ <Import-Package>
+org.apache.commons.io;version=${project.version},
+org.apache.commons.io.comparator;version=${project.version},
+org.apache.commons.io.filefilter;version=${project.version},
+org.apache.commons.io.input;version=${project.version},
+org.apache.commons.io.output;version=${project.version}
+ </Import-Package>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.0-beta-3</version>
+ <configuration>
+ <issueLinkTemplate>%URL%/../%ISSUE%</issueLinkTemplate>
+ <!--
+ JIRA Search parameters:
+ - resolution=1 specifies "Fixed"
+ - fixfor=12312101 specifies "Commons IO version 1.4"
+
+ If/when http://jira.codehaus.org/browse/MCHANGES-92
+ is fixed this will be easier/less messy
+ -->
+ <filter>&&resolution=1&fixfor=12312101</filter>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>jira-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <configLocation>checkstyle.xml</configLocation>
+ <enableRulesSummary>false</enableRulesSummary>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <source>1.4</source>
+ <links>
+ <link>http://java.sun.com/j2se/1.4.2/docs/api</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <comparisonVersion>1.3.2</comparisonVersion>
+ <minSeverity>info</minSeverity>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>site</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy todir="${project.build.directory}/site/api-release">
+ <fileset dir="${project.build.directory}/site/apidocs"/>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>rc</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>site</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.xml b/archiva-modules/plugins/maven2-repository/src/test/resources/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.xml new file mode 100644 index 000000000..3edfb8e56 --- /dev/null +++ b/archiva-modules/plugins/maven2-repository/src/test/resources/org/apache/archiva/dependency/tree/maven2/DependencyTreeBuilderTest.xml @@ -0,0 +1,33 @@ +<!-- + ~ 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. + --> + +<component-set> + <components> + <component> + <role>org.apache.archiva.metadata.repository.MetadataResolver</role> + <implementation>org.apache.archiva.metadata.repository.TestMetadataResolver</implementation> + <role-hint>default</role-hint> + <instantiation-strategy>per-lookup</instantiation-strategy> + </component> + <component> + <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> + <implementation>org.apache.archiva.configuration.TestConfiguration</implementation> + </component> + </components> +</component-set>
\ No newline at end of file |