diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index f73fb6787924..161db00b6f20 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -45,11 +45,6 @@ under the License.
org.apache.mavenmaven-core
-
- org.apache.maven
- maven-compat
-
-
commons-clicommons-cli
diff --git a/maven-bom/pom.xml b/maven-bom/pom.xml
index e3941069b68f..9e127f4c690a 100644
--- a/maven-bom/pom.xml
+++ b/maven-bom/pom.xml
@@ -64,7 +64,6 @@ under the License.
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
deleted file mode 100644
index e42eba4687e9..000000000000
--- a/maven-compat/pom.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.apache.maven
- maven
- 4.0.0-beta-4-SNAPSHOT
-
-
- maven-compat
-
- Maven Compat (deprecated)
- Deprecated Maven2 classes maintained as compatibility layer.
-
-
-
- org.apache.maven
- maven-model
-
-
- org.apache.maven
- maven-model-builder
-
-
- org.apache.maven
- maven-settings
-
-
- org.apache.maven
- maven-settings-builder
-
-
- org.apache.maven
- maven-artifact
-
-
- org.apache.maven
- maven-core
-
-
- org.apache.maven
- maven-resolver-provider
-
-
- org.apache.maven
- maven-repository-metadata
-
-
- org.apache.maven.resolver
- maven-resolver-api
-
-
- org.apache.maven.resolver
- maven-resolver-util
-
-
- org.apache.maven.resolver
- maven-resolver-impl
-
-
- org.codehaus.plexus
- plexus-interpolation
-
-
- org.apache.maven.wagon
- wagon-provider-api
-
-
-
- javax.inject
- javax.inject
- provided
-
-
- org.eclipse.sisu
- org.eclipse.sisu.plexus
- provided
-
-
-
- org.hamcrest
- hamcrest
- test
-
-
- org.eclipse.sisu
- org.eclipse.sisu.inject
- test
-
-
- com.google.inject
- guice
- test
-
-
-
- org.codehaus.plexus
- plexus-testing
- test
-
-
- org.mockito
- mockito-core
- test
-
-
- org.apache.maven.wagon
- wagon-file
- test
-
-
- org.apache.maven.resolver
- maven-resolver-connector-basic
- test
-
-
- org.apache.maven.resolver
- maven-resolver-transport-wagon
- test
-
-
-
-
-
-
- org.eclipse.sisu
- sisu-maven-plugin
-
-
- org.codehaus.modello
- modello-maven-plugin
-
- 1.0.0
-
- src/main/mdo/profiles.mdo
- src/main/mdo/paramdoc.mdo
-
-
-
-
- modello
-
- java
- xpp3-reader
- xpp3-writer
-
-
-
-
-
-
-
-
diff --git a/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManager.java b/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManager.java
deleted file mode 100644
index e756a9ce4a1a..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManager.java
+++ /dev/null
@@ -1,56 +0,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.
- */
-package org.apache.maven;
-
-import java.util.Set;
-
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-
-/**
- * ArtifactFilterManager
- */
-@Deprecated
-public interface ArtifactFilterManager {
- /**
- * Returns a filter for core + extension artifacts.
- *
- * @return the artifact filter
- * @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
- * extensions.
- */
- ArtifactFilter getArtifactFilter();
-
- /**
- * Returns a filter for only the core artifacts.
- *
- * @return the artifact filter
- */
- ArtifactFilter getCoreArtifactFilter();
-
- /**
- * Exclude an extension artifact (doesn't affect getArtifactFilter's result, only getExtensionArtifactFilter).
- *
- * @param artifactId an artifact id
- * @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
- * extensions.
- */
- void excludeArtifact(String artifactId);
-
- Set getCoreArtifactExcludes();
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManagerDelegate.java b/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManagerDelegate.java
deleted file mode 100644
index c9e752e453fd..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/ArtifactFilterManagerDelegate.java
+++ /dev/null
@@ -1,32 +0,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.
- */
-package org.apache.maven;
-
-import java.util.Set;
-
-/**
- * @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core extensions.
- */
-@Deprecated
-public interface ArtifactFilterManagerDelegate {
-
- void addExcludes(Set excludes);
-
- void addCoreExcludes(Set excludes);
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java b/maven-compat/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java
deleted file mode 100644
index f698d53c652c..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/DefaultArtifactFilterManager.java
+++ /dev/null
@@ -1,97 +0,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.
- */
-package org.apache.maven;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
-import org.apache.maven.extension.internal.CoreExports;
-
-/**
- */
-@Named
-@Singleton
-@Deprecated
-public class DefaultArtifactFilterManager implements ArtifactFilterManager {
-
- // this is a live injected collection
- protected final List delegates;
-
- protected Set excludedArtifacts;
-
- private final Set coreArtifacts;
-
- @Inject
- public DefaultArtifactFilterManager(List delegates, CoreExports coreExports) {
- this.delegates = delegates;
- this.coreArtifacts = coreExports.getExportedArtifacts();
- }
-
- private synchronized Set getExcludedArtifacts() {
- if (excludedArtifacts == null) {
- excludedArtifacts = new LinkedHashSet<>(coreArtifacts);
- }
- return excludedArtifacts;
- }
-
- /**
- * Returns the artifact filter for the core + extension artifacts.
- *
- * @see org.apache.maven.ArtifactFilterManager#getArtifactFilter()
- */
- public ArtifactFilter getArtifactFilter() {
- Set excludes = new LinkedHashSet<>(getExcludedArtifacts());
-
- for (ArtifactFilterManagerDelegate delegate : delegates) {
- delegate.addExcludes(excludes);
- }
-
- return new ExclusionSetFilter(excludes);
- }
-
- /**
- * Returns the artifact filter for the standard core artifacts.
- *
- * @see org.apache.maven.ArtifactFilterManager#getCoreArtifactFilter()
- */
- public ArtifactFilter getCoreArtifactFilter() {
- return new ExclusionSetFilter(getCoreArtifactExcludes());
- }
-
- public void excludeArtifact(String artifactId) {
- getExcludedArtifacts().add(artifactId);
- }
-
- public Set getCoreArtifactExcludes() {
- Set excludes = new LinkedHashSet<>(coreArtifacts);
-
- for (ArtifactFilterManagerDelegate delegate : delegates) {
- delegate.addCoreExcludes(excludes);
- }
-
- return excludes;
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-compat/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
deleted file mode 100644
index ce24588292b1..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
+++ /dev/null
@@ -1,222 +0,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.
- */
-package org.apache.maven;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
-import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
-import org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException;
-import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
-import org.apache.maven.artifact.resolver.filter.CumulativeScopeArtifactFilter;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.ProjectArtifact;
-import org.apache.maven.repository.RepositorySystem;
-
-/**
- * @deprecated As of 3.2.2, and there is no direct replacement. This is an internal class which was not marked as such,
- * but should have been.
- *
- */
-@Named
-@Singleton
-@Deprecated
-public class DefaultProjectDependenciesResolver implements ProjectDependenciesResolver {
-
- private final RepositorySystem repositorySystem;
-
- private final ResolutionErrorHandler resolutionErrorHandler;
-
- @Inject
- public DefaultProjectDependenciesResolver(
- RepositorySystem repositorySystem, ResolutionErrorHandler resolutionErrorHandler) {
- this.repositorySystem = repositorySystem;
- this.resolutionErrorHandler = resolutionErrorHandler;
- }
-
- public Set resolve(MavenProject project, Collection scopesToResolve, MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException {
- return resolve(Collections.singleton(project), scopesToResolve, session);
- }
-
- public Set resolve(
- MavenProject project,
- Collection scopesToCollect,
- Collection scopesToResolve,
- MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException {
- Set mavenProjects = Collections.singleton(project);
- return resolveImpl(
- mavenProjects, scopesToCollect, scopesToResolve, session, getIgnorableArtifacts(mavenProjects));
- }
-
- public Set resolve(
- Collection extends MavenProject> projects, Collection scopesToResolve, MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException {
- return resolveImpl(projects, null, scopesToResolve, session, getIgnorableArtifacts(projects));
- }
-
- public Set resolve(
- MavenProject project,
- Collection scopesToCollect,
- Collection scopesToResolve,
- MavenSession session,
- Set ignorableArtifacts)
- throws ArtifactResolutionException, ArtifactNotFoundException {
- return resolveImpl(
- Collections.singleton(project),
- scopesToCollect,
- scopesToResolve,
- session,
- getIgnorableArtifacts(ignorableArtifacts));
- }
-
- private Set resolveImpl(
- Collection extends MavenProject> projects,
- Collection scopesToCollect,
- Collection scopesToResolve,
- MavenSession session,
- Set projectIds)
- throws ArtifactResolutionException, ArtifactNotFoundException {
- Set resolved = new LinkedHashSet<>();
-
- if (projects == null || projects.isEmpty()) {
- return resolved;
- }
-
- if ((scopesToCollect == null || scopesToCollect.isEmpty())
- && (scopesToResolve == null || scopesToResolve.isEmpty())) {
- return resolved;
- }
-
- /*
-
- Logic for transitive global exclusions
-
- List exclusions = new ArrayList();
-
- for ( Dependency d : project.getDependencies() )
- {
- if ( d.getExclusions() != null )
- {
- for ( Exclusion e : d.getExclusions() )
- {
- exclusions.add( e.getGroupId() + ":" + e.getArtifactId() );
- }
- }
- }
-
- ArtifactFilter scopeFilter = new ScopeArtifactFilter( scope );
-
- ArtifactFilter filter;
-
- if ( ! exclusions.isEmpty() )
- {
- filter = new AndArtifactFilter( Arrays.asList( new ArtifactFilter[]{
- new ExcludesArtifactFilter( exclusions ), scopeFilter } ) );
- }
- else
- {
- filter = scopeFilter;
- }
- */
-
- CumulativeScopeArtifactFilter resolutionScopeFilter = new CumulativeScopeArtifactFilter(scopesToResolve);
-
- CumulativeScopeArtifactFilter collectionScopeFilter = new CumulativeScopeArtifactFilter(scopesToCollect);
- collectionScopeFilter = new CumulativeScopeArtifactFilter(collectionScopeFilter, resolutionScopeFilter);
-
- ArtifactResolutionRequest request = new ArtifactResolutionRequest()
- .setResolveRoot(false)
- .setResolveTransitively(true)
- .setCollectionFilter(collectionScopeFilter)
- .setResolutionFilter(resolutionScopeFilter)
- .setLocalRepository(session.getLocalRepository())
- .setOffline(session.isOffline())
- .setForceUpdate(session.getRequest().isUpdateSnapshots());
- request.setServers(session.getRequest().getServers());
- request.setMirrors(session.getRequest().getMirrors());
- request.setProxies(session.getRequest().getProxies());
-
- for (MavenProject project : projects) {
- request.setArtifact(new ProjectArtifact(project));
- request.setArtifactDependencies(project.getDependencyArtifacts());
- request.setManagedVersionMap(project.getManagedVersionMap());
- request.setRemoteRepositories(project.getRemoteArtifactRepositories());
-
- ArtifactResolutionResult result = repositorySystem.resolve(request);
-
- try {
- resolutionErrorHandler.throwErrors(request, result);
- } catch (MultipleArtifactsNotFoundException e) {
-
- Collection missing = new HashSet<>(e.getMissingArtifacts());
-
- for (Iterator it = missing.iterator(); it.hasNext(); ) {
- String key = ArtifactUtils.key(it.next());
- if (projectIds.contains(key)) {
- it.remove();
- }
- }
-
- if (!missing.isEmpty()) {
- throw e;
- }
- }
-
- resolved.addAll(result.getArtifacts());
- }
-
- return resolved;
- }
-
- private Set getIgnorableArtifacts(Collection extends MavenProject> projects) {
- Set projectIds = new HashSet<>(projects.size() * 2);
-
- for (MavenProject p : projects) {
- String key = ArtifactUtils.key(p.getGroupId(), p.getArtifactId(), p.getVersion());
- projectIds.add(key);
- }
- return projectIds;
- }
-
- private Set getIgnorableArtifacts(Iterable artifactIterable) {
- Set projectIds = new HashSet<>();
-
- for (Artifact artifact : artifactIterable) {
- String key = ArtifactUtils.key(artifact);
- projectIds.add(key);
- }
- return projectIds;
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/ProjectDependenciesResolver.java b/maven-compat/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
deleted file mode 100644
index 509ee5e9ed93..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
+++ /dev/null
@@ -1,105 +0,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.
- */
-package org.apache.maven;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.project.MavenProject;
-
-/**
- * @deprecated As of 3.2.2, and there is no direct replacement. This is an internal class which was not marked as such,
- * but should have been.
- *
- */
-@Deprecated
-public interface ProjectDependenciesResolver {
-
- /**
- * Resolves the transitive dependencies of the specified project.
- *
- * @param project The project whose dependencies should be resolved, must not be {@code null}.
- * @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}.
- * @param session The current build session, must not be {@code null}.
- * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
- * @throws ArtifactResolutionException in case of resolution issue
- * @throws ArtifactNotFoundException if an artifact is not found
- */
- Set resolve(MavenProject project, Collection scopesToResolve, MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException;
-
- /**
- * Resolves the transitive dependencies of the specified project.
- *
- * @param project The project whose dependencies should be resolved, must not be {@code null}.
- * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}.
- * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
- * @param session The current build session, must not be {@code null}.
- * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
- * @throws ArtifactResolutionException in case of resolution issue
- * @throws ArtifactNotFoundException if an artifact is not found
- */
- Set resolve(
- MavenProject project,
- Collection scopesToCollect,
- Collection scopesToResolve,
- MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException;
-
- /**
- * Resolves the transitive dependencies of the specified project.
- *
- * @param project The project whose dependencies should be resolved, must not be {@code null}.
- * @param scopesToCollect The dependency scopes that should be collected, may be {@code null}.
- * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
- * @param session The current build session, must not be {@code null}.
- * @param ignorableArtifacts Artifacts that need not be resolved
- * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
- * @throws ArtifactResolutionException in case of resolution issue
- * @throws ArtifactNotFoundException if an artifact is not found
- */
- Set resolve(
- MavenProject project,
- Collection scopesToCollect,
- Collection scopesToResolve,
- MavenSession session,
- Set ignorableArtifacts)
- throws ArtifactResolutionException, ArtifactNotFoundException;
-
- /**
- * Resolves the transitive dependencies of the specified projects. Note that dependencies which can't be resolved
- * from any repository but are present among the set of specified projects will not cause an exception. Instead,
- * those unresolved artifacts will be returned in the result set, allowing the caller to take special care of
- * artifacts that haven't been build yet.
- *
- * @param projects The projects whose dependencies should be resolved, may be {@code null}.
- * @param scopes The dependency scopes that should be resolved, may be {@code null}.
- * @param session The current build session, must not be {@code null}.
- * @return The transitive dependencies of the specified projects that match the requested scopes, never
- * {@code null}.
- * @throws ArtifactResolutionException in case of resolution issue
- * @throws ArtifactNotFoundException if an artifact is not found
- */
- Set resolve(Collection extends MavenProject> projects, Collection scopes, MavenSession session)
- throws ArtifactResolutionException, ArtifactNotFoundException;
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
deleted file mode 100644
index 34178d5bc4ff..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
+++ /dev/null
@@ -1,114 +0,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.
- */
-package org.apache.maven.artifact;
-
-/**
- * Type safe reincarnation of Artifact scope. Also supplies the {@code DEFAULT_SCOPE} as well
- * as convenience method to deal with scope relationships.
- *
- *
- */
-@Deprecated
-public enum ArtifactScopeEnum {
- compile(1),
- test(2),
- runtime(3),
- provided(4),
- system(5),
- runtime_plus_system(6);
-
- public static final ArtifactScopeEnum DEFAULT_SCOPE = compile;
-
- private int id;
-
- // Constructor
- ArtifactScopeEnum(int id) {
- this.id = id;
- }
-
- int getId() {
- return id;
- }
-
- /**
- * Helper method to simplify null processing
- *
- * @param scope a scope or {@code null}
- * @return the provided scope or DEFAULT_SCOPE
- */
- public static ArtifactScopeEnum checkScope(ArtifactScopeEnum scope) {
- return scope == null ? DEFAULT_SCOPE : scope;
- }
-
- /**
- *
- * @return unsafe String representation of this scope.
- */
- public String getScope() {
- if (id == 1) {
- return Artifact.SCOPE_COMPILE;
- } else if (id == 2) {
- return Artifact.SCOPE_TEST;
-
- } else if (id == 3) {
- return Artifact.SCOPE_RUNTIME;
-
- } else if (id == 4) {
- return Artifact.SCOPE_PROVIDED;
- } else if (id == 5) {
- return Artifact.SCOPE_SYSTEM;
- } else {
- return Artifact.SCOPE_RUNTIME_PLUS_SYSTEM;
- }
- }
-
- private static final ArtifactScopeEnum[][][] COMPLIANCY_SETS = {
- {{compile}, {compile, provided, system}},
- {{test}, {compile, test, provided, system}},
- {{runtime}, {compile, runtime, system}},
- {{provided}, {compile, test, provided}}
- };
-
- /**
- * scope relationship function. Used by the graph conflict resolution policies
- *
- * @param scope a scope
- * @return true is supplied scope is an inclusive sub-scope of current one.
- */
- public boolean encloses(ArtifactScopeEnum scope) {
- final ArtifactScopeEnum s = checkScope(scope);
-
- // system scope is historic only - and simple
- if (id == system.id) {
- return scope.id == system.id;
- }
-
- for (ArtifactScopeEnum[][] set : COMPLIANCY_SETS) {
- if (id == set[0][0].id) {
- for (ArtifactScopeEnum ase : set[1]) {
- if (s.id == ase.id) {
- return true;
- }
- }
- break;
- }
- }
- return false;
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactStatus.java b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactStatus.java
deleted file mode 100644
index 3a6a2bdf5014..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactStatus.java
+++ /dev/null
@@ -1,110 +0,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.
- */
-package org.apache.maven.artifact;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Type safe enumeration for the artifact status field.
- *
- */
-@Deprecated
-public final class ArtifactStatus implements Comparable {
- /**
- * No trust - no information about status.
- */
- public static final ArtifactStatus NONE = new ArtifactStatus("none", 0);
-
- /**
- * No trust - information was generated with defaults.
- */
- public static final ArtifactStatus GENERATED = new ArtifactStatus("generated", 1);
-
- /**
- * Low trust - was converted from the Maven 1.x repository.
- */
- public static final ArtifactStatus CONVERTED = new ArtifactStatus("converted", 2);
-
- /**
- * Moderate trust - it was deployed directly from a partner.
- */
- public static final ArtifactStatus PARTNER = new ArtifactStatus("partner", 3);
-
- /**
- * Moderate trust - it was deployed directly by a user.
- */
- public static final ArtifactStatus DEPLOYED = new ArtifactStatus("deployed", 4);
-
- /**
- * Trusted, as it has had its data verified by hand.
- */
- public static final ArtifactStatus VERIFIED = new ArtifactStatus("verified", 5);
-
- private final int rank;
-
- private final String key;
-
- private static Map map;
-
- private ArtifactStatus(String key, int rank) {
- this.rank = rank;
- this.key = key;
-
- if (map == null) {
- map = new HashMap<>();
- }
- map.put(key, this);
- }
-
- public static ArtifactStatus valueOf(String status) {
- ArtifactStatus retVal = null;
-
- if (status != null) {
- retVal = map.get(status);
- }
-
- return retVal != null ? retVal : NONE;
- }
-
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- final ArtifactStatus that = (ArtifactStatus) o;
-
- return rank == that.rank;
- }
-
- public int hashCode() {
- return rank;
- }
-
- public String toString() {
- return key;
- }
-
- public int compareTo(ArtifactStatus s) {
- return rank - s.rank;
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java b/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
deleted file mode 100644
index dcaa874cb6dd..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/UnknownRepositoryLayoutException.java
+++ /dev/null
@@ -1,47 +0,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.
- */
-package org.apache.maven.artifact;
-
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-
-/**
- * Exception which is meant to occur when a layout specified for a particular
- * repository doesn't have a corresponding {@link org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout}
- * component in the current container.
- *
- */
-@Deprecated
-public class UnknownRepositoryLayoutException extends InvalidRepositoryException {
-
- private final String layoutId;
-
- public UnknownRepositoryLayoutException(String repositoryId, String layoutId) {
- super("Cannot find ArtifactRepositoryLayout instance for: " + layoutId, repositoryId);
- this.layoutId = layoutId;
- }
-
- public UnknownRepositoryLayoutException(String repositoryId, String layoutId, ComponentLookupException e) {
- super("Cannot find ArtifactRepositoryLayout instance for: " + layoutId, repositoryId, e);
- this.layoutId = layoutId;
- }
-
- public String getLayoutId() {
- return layoutId;
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
deleted file mode 100644
index 43dbd13ea591..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
+++ /dev/null
@@ -1,67 +0,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.
- */
-package org.apache.maven.artifact.deployer;
-
-import java.io.File;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-
-/**
- * ArtifactDeployer
- */
-@Deprecated
-public interface ArtifactDeployer {
- String ROLE = ArtifactDeployer.class.getName();
-
- /**
- * Deploy an artifact from a particular directory. The artifact handler is used to determine the
- * filename of the source file.
- *
- * @param basedir the directory where the artifact is stored
- * @param finalName the name of the artifact without extension
- * @param artifact the artifact definition
- * @param deploymentRepository the repository to deploy to
- * @param localRepository the local repository to install into
- * @throws ArtifactDeploymentException if an error occurred deploying the artifact
- * @deprecated to be removed before 2.0 after the install/deploy plugins use the alternate
- * method
- */
- @Deprecated
- void deploy(
- String basedir,
- String finalName,
- Artifact artifact,
- ArtifactRepository deploymentRepository,
- ArtifactRepository localRepository)
- throws ArtifactDeploymentException;
-
- /**
- * Deploy an artifact from a particular file.
- *
- * @param source the file to deploy
- * @param artifact the artifact definition
- * @param deploymentRepository the repository to deploy to
- * @param localRepository the local repository to install into
- * @throws ArtifactDeploymentException if an error occurred deploying the artifact
- */
- void deploy(
- File source, Artifact artifact, ArtifactRepository deploymentRepository, ArtifactRepository localRepository)
- throws ArtifactDeploymentException;
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeploymentException.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeploymentException.java
deleted file mode 100644
index 6351873bfa12..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeploymentException.java
+++ /dev/null
@@ -1,36 +0,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.
- */
-package org.apache.maven.artifact.deployer;
-
-/**
- */
-@Deprecated
-public class ArtifactDeploymentException extends Exception {
- public ArtifactDeploymentException(String message) {
- super(message);
- }
-
- public ArtifactDeploymentException(Throwable cause) {
- super(cause);
- }
-
- public ArtifactDeploymentException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
deleted file mode 100644
index 3ecc9ab80e0b..000000000000
--- a/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
+++ /dev/null
@@ -1,149 +0,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.
- */
-package org.apache.maven.artifact.deployer;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import java.io.File;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.maven.RepositoryUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.LegacyLocalRepositoryManager;
-import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
-import org.apache.maven.artifact.repository.metadata.MetadataBridge;
-import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
-import org.apache.maven.plugin.LegacySupport;
-import org.apache.maven.project.artifact.ProjectArtifactMetadata;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.RequestTrace;
-import org.eclipse.aether.deployment.DeployRequest;
-import org.eclipse.aether.deployment.DeployResult;
-import org.eclipse.aether.deployment.DeploymentException;
-import org.eclipse.aether.metadata.MergeableMetadata;
-import org.eclipse.aether.repository.RemoteRepository;
-import org.eclipse.aether.util.artifact.SubArtifact;
-
-/**
- * DefaultArtifactDeployer
- */
-@Named
-@Deprecated
-public class DefaultArtifactDeployer extends AbstractLogEnabled implements ArtifactDeployer {
-
- @Inject
- private RepositorySystem repoSystem;
-
- @Inject
- private LegacySupport legacySupport;
-
- private Map