From fb1c53d6da3c5de5a64e36b67484ece337a503f1 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Tue, 30 Jun 2009 03:04:34 +0000 Subject: [PATCH] MNG-4221: putting the repository and compat modules together while completely hide the legacy implementation git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@789541 13f79535-47bb-0310-9956-ffa450edef68 --- maven-compat/pom.xml | 6 ++ .../artifact/resolver/ArtifactCollector.java | 7 ++ .../resolver/ArtifactResolutionResult.java | 4 +- .../resolver/DefaultArtifactCollector.java | 11 +++ .../resolver/DefaultArtifactResolver.java | 1 - .../execution/DefaultRuntimeInformation.java | 87 +++++++++++++++++++ .../maven/execution/RuntimeInformation.java | 33 +++++++ .../apache/maven/project/ProjectUtils.java | 0 .../maven/repository/Authentication.java | 0 .../repository/DefaultMirrorBuilder.java | 0 .../DelegatingLocalArtifactRepository.java | 0 .../repository}/LegacyRepositorySystem.java | 3 +- .../repository/LocalArtifactRepository.java | 0 .../repository/MavenArtifactMetadata.java | 0 .../maven/repository/MetadataGraph.java | 0 .../maven/repository/MetadataGraphNode.java | 0 .../repository/MetadataResolutionRequest.java | 0 .../repository/MetadataResolutionResult.java | 4 +- .../maven/repository/MirrorBuilder.java | 0 .../org/apache/maven/repository/Proxy.java | 0 .../maven/repository/RepositorySystem.java | 0 .../UserLocalArtifactRepository.java | 0 .../repository/VersionNotFoundException.java | 0 ...va => DefaultLegacyArtifactCollector.java} | 6 +- ...ctor.java => LegacyArtifactCollector.java} | 2 +- ...efaultRepositorySystemSecurityManager.java | 0 .../RepositorySystemSecurityManager.java | 0 .../LegacyMavenRepositorySystemTest.java | 0 .../maven/repository/MirrorProcessorTest.java | 0 .../legacy/DummyArtifactMetadataSource.java | 1 + .../legacy/LegacyRepositorySystemTest.java | 1 + .../DefaultArtifactCollectorTest.java | 6 +- .../project/TestMavenRepositorySystem.java | 2 +- pom.xml | 3 + 34 files changed, 163 insertions(+), 14 deletions(-) create mode 100644 maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java create mode 100644 maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java create mode 100644 maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java create mode 100644 maven-compat/src/main/java/org/apache/maven/execution/RuntimeInformation.java rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/project/ProjectUtils.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/Authentication.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java (100%) rename {maven-repository/src/main/java/org/apache/maven/repository/legacy => maven-compat/src/main/java/org/apache/maven/repository}/LegacyRepositorySystem.java (99%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MavenArtifactMetadata.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MetadataGraph.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MetadataGraphNode.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java (98%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/MirrorBuilder.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/Proxy.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/RepositorySystem.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/VersionNotFoundException.java (100%) rename maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/{DefaultArtifactCollector.java => DefaultLegacyArtifactCollector.java} (99%) rename maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/{ArtifactCollector.java => LegacyArtifactCollector.java} (98%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/security/DefaultRepositorySystemSecurityManager.java (100%) rename {maven-repository => maven-compat}/src/main/java/org/apache/maven/repository/security/RepositorySystemSecurityManager.java (100%) rename {maven-repository => maven-compat}/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java (100%) rename {maven-repository => maven-compat}/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java (100%) rename {maven-repository => maven-compat}/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java (97%) rename {maven-repository => maven-compat}/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java (96%) diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml index c5d129248f..2499336af7 100644 --- a/maven-compat/pom.xml +++ b/maven-compat/pom.xml @@ -57,6 +57,12 @@ 1.2_Java1.3 test + + + + org.jsecurity + jsecurity + diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java new file mode 100644 index 0000000000..fdb4612113 --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java @@ -0,0 +1,7 @@ +package org.apache.maven.artifact.resolver; + +@Deprecated +public interface ArtifactCollector + extends org.apache.maven.repository.legacy.resolver.LegacyArtifactCollector +{ +} diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java index 2d04533c3f..172f0a28fc 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java @@ -24,7 +24,7 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; -import org.apache.maven.repository.legacy.resolver.DefaultArtifactCollector; +import org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector; /** * Specific problems during resolution that we want to account for: @@ -162,7 +162,7 @@ public class ArtifactResolutionResult /** * @TODO this needs to accept a {@link OverConstrainedVersionException} as returned by * {@link #getVersionRangeViolation(int)} but it's not used like that in - * {@link DefaultArtifactCollector} + * {@link DefaultLegacyArtifactCollector} */ public ArtifactResolutionResult addVersionRangeViolation( Exception e ) { diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java new file mode 100644 index 0000000000..dfc33a217f --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java @@ -0,0 +1,11 @@ +package org.apache.maven.artifact.resolver; + +import org.codehaus.plexus.component.annotations.Component; + +@Deprecated +@Component(role=ArtifactCollector.class) +public class DefaultArtifactCollector + extends org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector + implements ArtifactCollector +{ +} diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index 2484b404c9..e8797a108f 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -37,7 +37,6 @@ import org.apache.maven.artifact.repository.metadata.Versioning; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.repository.legacy.WagonManager; import org.apache.maven.repository.legacy.metadata.ArtifactMetadata; -import org.apache.maven.repository.legacy.resolver.ArtifactCollector; import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver; import org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformationManager; import org.apache.maven.wagon.ResourceDoesNotExistException; diff --git a/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java b/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java new file mode 100644 index 0000000000..5f05388708 --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java @@ -0,0 +1,87 @@ +package org.apache.maven.execution; + +/* + * 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 org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.DefaultArtifactVersion; +import org.codehaus.plexus.component.annotations.Component; +import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; +import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; +import org.codehaus.plexus.util.IOUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +/** + * Describes runtime information about the application. + * + * @author Brett Porter + * @version $Id$ + */ +@Deprecated +@Component(role=RuntimeInformation.class) +public class DefaultRuntimeInformation + implements RuntimeInformation, Initializable +{ + private static final String MAVEN_GROUPID = "org.apache.maven"; + + private static final String MAVEN_PROPERTIES = "META-INF/maven/" + MAVEN_GROUPID + "/maven-core/pom.properties"; + + private ArtifactVersion applicationVersion; + + public ArtifactVersion getApplicationVersion() + { + return applicationVersion; + } + + public void initialize() + throws InitializationException + { + InputStream resourceAsStream = null; + try + { + Properties properties = new Properties(); + resourceAsStream = getClass().getClassLoader().getResourceAsStream( MAVEN_PROPERTIES ); + + if ( resourceAsStream == null ) + { + throw new IllegalStateException( "Unable to find Maven properties in classpath: " + MAVEN_PROPERTIES ); + } + properties.load( resourceAsStream ); + + String property = properties.getProperty( "version" ); + if ( property == null ) + { + throw new InitializationException( "maven-core properties did not include the version" ); + } + + applicationVersion = new DefaultArtifactVersion( property ); + } + catch ( IOException e ) + { + throw new InitializationException( "Unable to read properties file from maven-core", e ); + } + finally + { + IOUtil.close( resourceAsStream ); + } + } +} diff --git a/maven-compat/src/main/java/org/apache/maven/execution/RuntimeInformation.java b/maven-compat/src/main/java/org/apache/maven/execution/RuntimeInformation.java new file mode 100644 index 0000000000..85a87bed9a --- /dev/null +++ b/maven-compat/src/main/java/org/apache/maven/execution/RuntimeInformation.java @@ -0,0 +1,33 @@ +package org.apache.maven.execution; + +/* + * 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 org.apache.maven.artifact.versioning.ArtifactVersion; + +/** + * Describes runtime information about the application. + * + * @author Brett Porter + * @version $Id$ + */ +public interface RuntimeInformation +{ + ArtifactVersion getApplicationVersion(); +} diff --git a/maven-repository/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/project/ProjectUtils.java rename to maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/Authentication.java b/maven-compat/src/main/java/org/apache/maven/repository/Authentication.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/Authentication.java rename to maven-compat/src/main/java/org/apache/maven/repository/Authentication.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java rename to maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorBuilder.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java rename to maven-compat/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java similarity index 99% rename from maven-repository/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java rename to maven-compat/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java index 602d917f99..e5b143bc58 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/LegacyRepositorySystem.java @@ -1,4 +1,4 @@ -package org.apache.maven.repository.legacy; +package org.apache.maven.repository; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -51,6 +51,7 @@ import org.apache.maven.repository.MetadataResolutionRequest; import org.apache.maven.repository.MetadataResolutionResult; import org.apache.maven.repository.MirrorBuilder; import org.apache.maven.repository.RepositorySystem; +import org.apache.maven.repository.legacy.WagonManager; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.TransferFailedException; import org.apache.maven.wagon.events.TransferListener; diff --git a/maven-repository/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java rename to maven-compat/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MavenArtifactMetadata.java b/maven-compat/src/main/java/org/apache/maven/repository/MavenArtifactMetadata.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/MavenArtifactMetadata.java rename to maven-compat/src/main/java/org/apache/maven/repository/MavenArtifactMetadata.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraph.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/MetadataGraph.java rename to maven-compat/src/main/java/org/apache/maven/repository/MetadataGraph.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataGraphNode.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/MetadataGraphNode.java rename to maven-compat/src/main/java/org/apache/maven/repository/MetadataGraphNode.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java rename to maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java similarity index 98% rename from maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java rename to maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index a0655171a5..4450589ca5 100644 --- a/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -30,7 +30,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.artifact.resolver.CyclicDependencyException; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; -import org.apache.maven.repository.legacy.resolver.DefaultArtifactCollector; +import org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector; /** @@ -166,7 +166,7 @@ public class MetadataResolutionResult /** * @TODO this needs to accept a {@link OverConstrainedVersionException} as returned by * {@link #getVersionRangeViolation(int)} but it's not used like that in - * {@link DefaultArtifactCollector} + * {@link DefaultLegacyArtifactCollector} */ public MetadataResolutionResult addVersionRangeViolation( Exception e ) { diff --git a/maven-repository/src/main/java/org/apache/maven/repository/MirrorBuilder.java b/maven-compat/src/main/java/org/apache/maven/repository/MirrorBuilder.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/MirrorBuilder.java rename to maven-compat/src/main/java/org/apache/maven/repository/MirrorBuilder.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/Proxy.java b/maven-compat/src/main/java/org/apache/maven/repository/Proxy.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/Proxy.java rename to maven-compat/src/main/java/org/apache/maven/repository/Proxy.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/RepositorySystem.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/RepositorySystem.java rename to maven-compat/src/main/java/org/apache/maven/repository/RepositorySystem.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java rename to maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/VersionNotFoundException.java b/maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/VersionNotFoundException.java rename to maven-compat/src/main/java/org/apache/maven/repository/VersionNotFoundException.java diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java similarity index 99% rename from maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollector.java rename to maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java index 8d28d9e472..6934a75d58 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java @@ -54,9 +54,9 @@ import org.codehaus.plexus.logging.Logger; * @author Brett Porter * @author Jason van Zyl */ -@Component(role=ArtifactCollector.class) -public class DefaultArtifactCollector - implements ArtifactCollector +@Component(role=LegacyArtifactCollector.class) +public class DefaultLegacyArtifactCollector + implements LegacyArtifactCollector { @Requirement(hint="nearest") private ConflictResolver defaultConflictResolver; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/ArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java similarity index 98% rename from maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/ArtifactCollector.java rename to maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java index 0a2f11c937..b6f2bd0f8b 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/ArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java @@ -39,7 +39,7 @@ import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver; * @version $Id$ */ @Deprecated -public interface ArtifactCollector +public interface LegacyArtifactCollector { ArtifactResolutionResult collect( Set artifacts, diff --git a/maven-repository/src/main/java/org/apache/maven/repository/security/DefaultRepositorySystemSecurityManager.java b/maven-compat/src/main/java/org/apache/maven/repository/security/DefaultRepositorySystemSecurityManager.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/security/DefaultRepositorySystemSecurityManager.java rename to maven-compat/src/main/java/org/apache/maven/repository/security/DefaultRepositorySystemSecurityManager.java diff --git a/maven-repository/src/main/java/org/apache/maven/repository/security/RepositorySystemSecurityManager.java b/maven-compat/src/main/java/org/apache/maven/repository/security/RepositorySystemSecurityManager.java similarity index 100% rename from maven-repository/src/main/java/org/apache/maven/repository/security/RepositorySystemSecurityManager.java rename to maven-compat/src/main/java/org/apache/maven/repository/security/RepositorySystemSecurityManager.java diff --git a/maven-repository/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java similarity index 100% rename from maven-repository/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java rename to maven-compat/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java diff --git a/maven-repository/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java similarity index 100% rename from maven-repository/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java rename to maven-compat/src/test/java/org/apache/maven/repository/MirrorProcessorTest.java diff --git a/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java similarity index 97% rename from maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java rename to maven-compat/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java index 0a5c2377b8..dae5107f5e 100644 --- a/maven-repository/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/DummyArtifactMetadataSource.java @@ -27,6 +27,7 @@ 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.versioning.ArtifactVersion; +import org.apache.maven.repository.LegacyRepositorySystem; import org.codehaus.plexus.component.annotations.Component; /** diff --git a/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java similarity index 96% rename from maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java rename to maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java index 265c03f0e9..6d928d1ba6 100644 --- a/maven-repository/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/LegacyRepositorySystemTest.java @@ -22,6 +22,7 @@ package org.apache.maven.repository.legacy; import java.io.File; import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.repository.LegacyRepositorySystem; import org.apache.maven.repository.RepositorySystem; import org.codehaus.plexus.PlexusTestCase; diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java index 7940af29fa..5989f3831c 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java @@ -47,7 +47,7 @@ import org.apache.maven.artifact.versioning.DefaultArtifactVersion; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; import org.apache.maven.artifact.versioning.VersionRange; -import org.apache.maven.repository.legacy.resolver.ArtifactCollector; +import org.apache.maven.repository.legacy.resolver.LegacyArtifactCollector; import org.codehaus.plexus.PlexusTestCase; /** @@ -59,7 +59,7 @@ import org.codehaus.plexus.PlexusTestCase; public class DefaultArtifactCollectorTest extends PlexusTestCase { - private ArtifactCollector artifactCollector; + private LegacyArtifactCollector artifactCollector; private ArtifactFactory artifactFactory; @@ -77,7 +77,7 @@ public class DefaultArtifactCollectorTest source = new Source(); artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE ); - artifactCollector = (ArtifactCollector) lookup( ArtifactCollector.class ); + artifactCollector = (LegacyArtifactCollector) lookup( LegacyArtifactCollector.class ); projectArtifact = createArtifactSpec( "project", "1.0", null ); } diff --git a/maven-core/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java b/maven-core/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java index c0abdaee5b..9c839095d3 100644 --- a/maven-core/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java +++ b/maven-core/src/test/java/org/apache/maven/project/TestMavenRepositorySystem.java @@ -1,8 +1,8 @@ package org.apache.maven.project; import org.apache.maven.artifact.resolver.ArtifactResolver; +import org.apache.maven.repository.LegacyRepositorySystem; import org.apache.maven.repository.RepositorySystem; -import org.apache.maven.repository.legacy.LegacyRepositorySystem; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; diff --git a/pom.xml b/pom.xml index b35bc24d48..fd9d4e87b6 100644 --- a/pom.xml +++ b/pom.xml @@ -137,7 +137,10 @@ maven-model-builder maven-embedder maven-compat +