mirror of https://github.com/apache/maven.git
[MNG-8179] Upgrade Parent to 43
This commit is contained in:
parent
fd8f99ed90
commit
d35864e348
|
@ -18,7 +18,11 @@
|
|||
*/
|
||||
package org.apache.maven.api;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
abstract class ExtensibleEnums {
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
*/
|
||||
package org.apache.maven.api;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.maven.api.annotations.Experimental;
|
||||
import org.apache.maven.api.annotations.Immutable;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
package org.apache.maven.api;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.api.annotations.Experimental;
|
||||
import org.apache.maven.api.annotations.Immutable;
|
||||
|
|
|
@ -177,6 +177,7 @@ public interface ArtifactCoordinateFactoryRequest {
|
|||
private final String type;
|
||||
private final String coordinateString;
|
||||
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
DefaultArtifactFactoryRequestArtifact(
|
||||
@Nonnull Session session,
|
||||
String groupId,
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
*/
|
||||
package org.apache.maven.api.services;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collection;
|
||||
|
|
|
@ -360,6 +360,7 @@ public interface DependencyResolverRequest {
|
|||
* @param rootArtifact The root dependency whose transitive dependencies should be collected, may be {@code
|
||||
* null}.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
DefaultDependencyResolverRequest(
|
||||
@Nonnull Session session,
|
||||
@Nonnull RequestType requestType,
|
||||
|
|
|
@ -19,9 +19,17 @@
|
|||
package org.apache.maven.api.services;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Artifact;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.ProjectScope;
|
||||
import org.apache.maven.api.RemoteRepository;
|
||||
import org.apache.maven.api.Service;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.annotations.Experimental;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
|
|
|
@ -22,7 +22,9 @@ import java.lang.annotation.Documented;
|
|||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
@Target({FIELD, CONSTRUCTOR, METHOD})
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.maven.api.di;
|
|||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
@Qualifier
|
||||
|
|
|
@ -22,7 +22,9 @@ import java.lang.annotation.Documented;
|
|||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
@Target({FIELD, METHOD, TYPE})
|
||||
|
|
|
@ -60,7 +60,31 @@ import org.apache.maven.api.VersionRange;
|
|||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
import org.apache.maven.api.model.Repository;
|
||||
import org.apache.maven.api.services.*;
|
||||
import org.apache.maven.api.services.ArtifactCoordinateFactory;
|
||||
import org.apache.maven.api.services.ArtifactDeployer;
|
||||
import org.apache.maven.api.services.ArtifactDeployerException;
|
||||
import org.apache.maven.api.services.ArtifactFactory;
|
||||
import org.apache.maven.api.services.ArtifactInstaller;
|
||||
import org.apache.maven.api.services.ArtifactInstallerException;
|
||||
import org.apache.maven.api.services.ArtifactManager;
|
||||
import org.apache.maven.api.services.ArtifactResolver;
|
||||
import org.apache.maven.api.services.ArtifactResolverException;
|
||||
import org.apache.maven.api.services.DependencyCoordinateFactory;
|
||||
import org.apache.maven.api.services.DependencyResolver;
|
||||
import org.apache.maven.api.services.DependencyResolverException;
|
||||
import org.apache.maven.api.services.DependencyResolverRequest;
|
||||
import org.apache.maven.api.services.LanguageRegistry;
|
||||
import org.apache.maven.api.services.LocalRepositoryManager;
|
||||
import org.apache.maven.api.services.Lookup;
|
||||
import org.apache.maven.api.services.LookupException;
|
||||
import org.apache.maven.api.services.PackagingRegistry;
|
||||
import org.apache.maven.api.services.PathScopeRegistry;
|
||||
import org.apache.maven.api.services.ProjectScopeRegistry;
|
||||
import org.apache.maven.api.services.RepositoryFactory;
|
||||
import org.apache.maven.api.services.TypeRegistry;
|
||||
import org.apache.maven.api.services.VersionParser;
|
||||
import org.apache.maven.api.services.VersionRangeResolver;
|
||||
import org.apache.maven.api.services.VersionResolver;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.RepositorySystem;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.apache.maven.api.services.ArtifactDeployer;
|
|||
import org.apache.maven.api.services.ArtifactDeployerException;
|
||||
import org.apache.maven.api.services.ArtifactDeployerRequest;
|
||||
import org.eclipse.aether.deployment.DeployRequest;
|
||||
import org.eclipse.aether.deployment.DeployResult;
|
||||
import org.eclipse.aether.deployment.DeploymentException;
|
||||
|
||||
import static org.apache.maven.internal.impl.Utils.nonNull;
|
||||
|
@ -52,7 +51,7 @@ public class DefaultArtifactDeployer implements ArtifactDeployer {
|
|||
.setRepository(session.toRepository(repository))
|
||||
.setArtifacts(session.toArtifacts(artifacts));
|
||||
|
||||
DeployResult result = session.getRepositorySystem().deploy(session.getSession(), deployRequest);
|
||||
session.getRepositorySystem().deploy(session.getSession(), deployRequest);
|
||||
} catch (DeploymentException e) {
|
||||
throw new ArtifactDeployerException("Unable to deploy artifacts", e);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.apache.maven.api.services.ArtifactInstallerException;
|
|||
import org.apache.maven.api.services.ArtifactInstallerRequest;
|
||||
import org.eclipse.aether.RepositorySystem;
|
||||
import org.eclipse.aether.installation.InstallRequest;
|
||||
import org.eclipse.aether.installation.InstallResult;
|
||||
import org.eclipse.aether.installation.InstallationException;
|
||||
|
||||
import static org.apache.maven.internal.impl.Utils.nonNull;
|
||||
|
@ -51,7 +50,7 @@ public class DefaultArtifactInstaller implements ArtifactInstaller {
|
|||
InstallRequest installRequest =
|
||||
new InstallRequest().setArtifacts(session.toArtifacts(request.getArtifacts()));
|
||||
|
||||
InstallResult result = repositorySystem.install(session.getSession(), installRequest);
|
||||
repositorySystem.install(session.getSession(), installRequest);
|
||||
} catch (InstallationException e) {
|
||||
throw new ArtifactInstallerException(e.getMessage(), e);
|
||||
}
|
||||
|
|
|
@ -28,17 +28,26 @@ import java.util.Set;
|
|||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Artifact;
|
||||
import org.apache.maven.api.ArtifactCoordinate;
|
||||
import org.apache.maven.api.Dependency;
|
||||
import org.apache.maven.api.DependencyCoordinate;
|
||||
import org.apache.maven.api.DependencyScope;
|
||||
import org.apache.maven.api.Node;
|
||||
import org.apache.maven.api.PathScope;
|
||||
import org.apache.maven.api.PathType;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.RemoteRepository;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.services.*;
|
||||
import org.apache.maven.api.services.ArtifactResolverException;
|
||||
import org.apache.maven.api.services.DependencyResolver;
|
||||
import org.apache.maven.api.services.DependencyResolverException;
|
||||
import org.apache.maven.api.services.DependencyResolverRequest;
|
||||
import org.apache.maven.api.services.DependencyResolverResult;
|
||||
import org.apache.maven.api.services.ProjectManager;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
import org.eclipse.aether.collection.CollectRequest;
|
||||
|
|
|
@ -40,6 +40,7 @@ public class DefaultSettingsValidator {
|
|||
|
||||
private static final String ILLEGAL_REPO_ID_CHARS = "\\/:\"<>|?*"; // ILLEGAL_FS_CHARS
|
||||
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public void validate(Settings settings, boolean isProjectSettings, List<BuilderProblem> problems) {
|
||||
if (isProjectSettings) {
|
||||
String msgS = "is not supported on project settings.";
|
||||
|
|
|
@ -27,7 +27,6 @@ import java.util.Objects;
|
|||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.model.InputSource;
|
||||
import org.apache.maven.api.services.xml.ToolchainsXmlFactory;
|
||||
import org.apache.maven.api.services.xml.XmlReaderException;
|
||||
import org.apache.maven.api.services.xml.XmlReaderRequest;
|
||||
|
@ -53,10 +52,6 @@ public class DefaultToolchainsXmlFactory implements ToolchainsXmlFactory {
|
|||
throw new IllegalArgumentException("reader or inputStream must be non null");
|
||||
}
|
||||
try {
|
||||
InputSource source = null;
|
||||
if (request.getModelId() != null || request.getLocation() != null) {
|
||||
source = new InputSource(request.getModelId(), request.getLocation());
|
||||
}
|
||||
MavenToolchainsStaxReader xml = new MavenToolchainsStaxReader();
|
||||
xml.setAddDefaultEntities(request.isAddDefaultEntities());
|
||||
if (reader != null) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.apache.maven.api.services.BuilderProblem.Severity;
|
|||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblem.Version;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.DependencyManagementImporter;
|
||||
|
||||
/**
|
||||
* Handles the import of dependency management from other models into the target model.
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.maven.api.model.Exclusion;
|
|||
import org.apache.maven.api.model.Model;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.DependencyManagementInjector;
|
||||
|
||||
/**
|
||||
* Handles injection of dependency management into the model.
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.apache.maven.api.model.ReportPlugin;
|
|||
import org.apache.maven.api.model.Reporting;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.InheritanceAssembler;
|
||||
|
||||
/**
|
||||
* Handles inheritance of model values.
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.apache.maven.api.services.ModelBuilderRequest;
|
|||
import org.apache.maven.api.services.ModelProblem.Version;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.PackagingRegistry;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.LifecycleBindingsInjector;
|
||||
|
||||
/**
|
||||
* Handles injection of plugin executions induced by the lifecycle bindings for a packaging.
|
||||
|
|
|
@ -78,7 +78,25 @@ import org.apache.maven.api.services.ModelTransformerException;
|
|||
import org.apache.maven.api.services.Source;
|
||||
import org.apache.maven.api.services.SuperPomProvider;
|
||||
import org.apache.maven.api.services.VersionParserException;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.DependencyManagementImporter;
|
||||
import org.apache.maven.api.services.model.DependencyManagementInjector;
|
||||
import org.apache.maven.api.services.model.InheritanceAssembler;
|
||||
import org.apache.maven.api.services.model.LifecycleBindingsInjector;
|
||||
import org.apache.maven.api.services.model.ModelBuildingEvent;
|
||||
import org.apache.maven.api.services.model.ModelBuildingListener;
|
||||
import org.apache.maven.api.services.model.ModelInterpolator;
|
||||
import org.apache.maven.api.services.model.ModelNormalizer;
|
||||
import org.apache.maven.api.services.model.ModelPathTranslator;
|
||||
import org.apache.maven.api.services.model.ModelProcessor;
|
||||
import org.apache.maven.api.services.model.ModelUrlNormalizer;
|
||||
import org.apache.maven.api.services.model.ModelValidator;
|
||||
import org.apache.maven.api.services.model.ModelVersionParser;
|
||||
import org.apache.maven.api.services.model.PluginConfigurationExpander;
|
||||
import org.apache.maven.api.services.model.PluginManagementInjector;
|
||||
import org.apache.maven.api.services.model.ProfileActivationContext;
|
||||
import org.apache.maven.api.services.model.ProfileInjector;
|
||||
import org.apache.maven.api.services.model.ProfileSelector;
|
||||
import org.apache.maven.api.services.model.WorkspaceModelResolver;
|
||||
import org.apache.maven.api.services.xml.XmlReaderException;
|
||||
import org.apache.maven.api.services.xml.XmlReaderRequest;
|
||||
import org.apache.maven.internal.impl.resolver.DefaultModelCache;
|
||||
|
|
|
@ -39,7 +39,10 @@ import org.apache.maven.api.services.BuilderProblem;
|
|||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblem;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelInterpolator;
|
||||
import org.apache.maven.api.services.model.PathTranslator;
|
||||
import org.apache.maven.api.services.model.RootLocator;
|
||||
import org.apache.maven.api.services.model.UrlNormalizer;
|
||||
import org.apache.maven.model.v4.MavenTransformer;
|
||||
import org.codehaus.plexus.interpolation.AbstractDelegatingValueSource;
|
||||
import org.codehaus.plexus.interpolation.AbstractValueSource;
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.apache.maven.api.model.Model;
|
|||
import org.apache.maven.api.model.Plugin;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelNormalizer;
|
||||
|
||||
/**
|
||||
* Handles normalization of a model.
|
||||
|
|
|
@ -32,7 +32,8 @@ import org.apache.maven.api.model.Model;
|
|||
import org.apache.maven.api.model.Reporting;
|
||||
import org.apache.maven.api.model.Resource;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelPathTranslator;
|
||||
import org.apache.maven.api.services.model.PathTranslator;
|
||||
|
||||
/**
|
||||
* Resolves relative paths within a model against a specific base directory.
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.maven.api.di.Inject;
|
|||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.model.Model;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelProcessor;
|
||||
import org.apache.maven.api.services.xml.ModelXmlFactory;
|
||||
import org.apache.maven.api.services.xml.XmlReaderRequest;
|
||||
import org.apache.maven.api.spi.ModelParser;
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.apache.maven.api.model.Model;
|
||||
import org.apache.maven.api.services.ModelTransformerContext;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelProcessor;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -68,7 +68,8 @@ import org.apache.maven.api.services.BuilderProblem.Severity;
|
|||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblem.Version;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelValidator;
|
||||
import org.apache.maven.api.services.model.ModelVersionProcessor;
|
||||
import org.apache.maven.model.v4.MavenModelVersion;
|
||||
import org.apache.maven.model.v4.MavenTransformer;
|
||||
|
||||
|
@ -294,6 +295,7 @@ public class DefaultModelValidator implements ModelValidator {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public void validateFileModel(Model m, ModelBuilderRequest request, ModelProblemCollector problems) {
|
||||
|
||||
Parent parent = m.getParent();
|
||||
|
@ -632,6 +634,7 @@ public class DefaultModelValidator implements ModelValidator {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public void validateEffectiveModel(Model m, ModelBuilderRequest request, ModelProblemCollector problems) {
|
||||
validateStringNotEmpty("modelVersion", problems, Severity.ERROR, Version.BASE, m.getModelVersion(), m);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Properties;
|
|||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ModelVersionProcessor;
|
||||
|
||||
/**
|
||||
* Maven default implementation of the {@link ModelVersionProcessor} to support
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.nio.file.Path;
|
|||
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.PathTranslator;
|
||||
|
||||
/**
|
||||
* Resolves relative paths against a specific base directory.
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ProfileActivationContext;
|
||||
|
||||
/**
|
||||
* Describes the environmental context used to determine the activation status of profiles.
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.apache.maven.api.model.ReportSet;
|
|||
import org.apache.maven.api.model.Reporting;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ProfileInjector;
|
||||
|
||||
/**
|
||||
* Handles profile injection into the model.
|
||||
|
|
|
@ -31,7 +31,9 @@ import org.apache.maven.api.model.Profile;
|
|||
import org.apache.maven.api.services.BuilderProblem.Severity;
|
||||
import org.apache.maven.api.services.ModelProblem.Version;
|
||||
import org.apache.maven.api.services.ModelProblemCollector;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ProfileActivationContext;
|
||||
import org.apache.maven.api.services.model.ProfileActivator;
|
||||
import org.apache.maven.api.services.model.ProfileSelector;
|
||||
|
||||
/**
|
||||
* Calculates the active profiles among a given collection of profiles.
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.RootLocator;
|
||||
|
||||
@Named
|
||||
public class DefaultRootLocator implements RootLocator {
|
||||
|
|
|
@ -44,7 +44,6 @@ public class PluginsMetadataGeneratorFactory implements MetadataGeneratorFactory
|
|||
return new PluginsMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 10; // G level MD should be deployed as 3rd MD
|
||||
|
|
|
@ -44,7 +44,6 @@ public class SnapshotMetadataGeneratorFactory implements MetadataGeneratorFactor
|
|||
return new RemoteSnapshotMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 30; // GAV level metadata should be deployed 1st MD
|
||||
|
|
|
@ -44,7 +44,6 @@ public class VersionsMetadataGeneratorFactory implements MetadataGeneratorFactor
|
|||
return new VersionsMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 20; // GA level metadata should be deployed 2nd MD
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.slf4j.LoggerFactory;
|
|||
@Singleton
|
||||
@Named(DistributionManagementArtifactRelocationSource.NAME)
|
||||
@Priority(5)
|
||||
@SuppressWarnings("checkstyle:MagicNumber")
|
||||
public final class DistributionManagementArtifactRelocationSource implements MavenArtifactRelocationSource {
|
||||
public static final String NAME = "distributionManagement";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DistributionManagementArtifactRelocationSource.class);
|
||||
|
|
|
@ -47,7 +47,6 @@ import org.slf4j.LoggerFactory;
|
|||
@Singleton
|
||||
@Named(UserPropertiesArtifactRelocationSource.NAME)
|
||||
@Priority(50)
|
||||
@SuppressWarnings("checkstyle:MagicNumber")
|
||||
public final class UserPropertiesArtifactRelocationSource implements MavenArtifactRelocationSource {
|
||||
public static final String NAME = "userProperties";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(UserPropertiesArtifactRelocationSource.class);
|
||||
|
|
|
@ -50,15 +50,57 @@ import org.apache.maven.api.services.PackagingRegistry;
|
|||
import org.apache.maven.api.services.RepositoryFactory;
|
||||
import org.apache.maven.api.services.SettingsBuilder;
|
||||
import org.apache.maven.api.services.TypeRegistry;
|
||||
import org.apache.maven.api.services.model.*;
|
||||
import org.apache.maven.api.services.model.ProfileActivator;
|
||||
import org.apache.maven.api.settings.Settings;
|
||||
import org.apache.maven.api.spi.ModelParser;
|
||||
import org.apache.maven.api.spi.TypeProvider;
|
||||
import org.apache.maven.di.Injector;
|
||||
import org.apache.maven.di.Key;
|
||||
import org.apache.maven.di.impl.DIException;
|
||||
import org.apache.maven.internal.impl.*;
|
||||
import org.apache.maven.internal.impl.model.*;
|
||||
import org.apache.maven.internal.impl.AbstractSession;
|
||||
import org.apache.maven.internal.impl.DefaultArtifactCoordinateFactory;
|
||||
import org.apache.maven.internal.impl.DefaultArtifactDeployer;
|
||||
import org.apache.maven.internal.impl.DefaultArtifactFactory;
|
||||
import org.apache.maven.internal.impl.DefaultArtifactInstaller;
|
||||
import org.apache.maven.internal.impl.DefaultArtifactResolver;
|
||||
import org.apache.maven.internal.impl.DefaultChecksumAlgorithmService;
|
||||
import org.apache.maven.internal.impl.DefaultDependencyCoordinateFactory;
|
||||
import org.apache.maven.internal.impl.DefaultDependencyResolver;
|
||||
import org.apache.maven.internal.impl.DefaultLocalRepositoryManager;
|
||||
import org.apache.maven.internal.impl.DefaultMessageBuilderFactory;
|
||||
import org.apache.maven.internal.impl.DefaultModelUrlNormalizer;
|
||||
import org.apache.maven.internal.impl.DefaultModelVersionParser;
|
||||
import org.apache.maven.internal.impl.DefaultModelXmlFactory;
|
||||
import org.apache.maven.internal.impl.DefaultPluginConfigurationExpander;
|
||||
import org.apache.maven.internal.impl.DefaultRepositoryFactory;
|
||||
import org.apache.maven.internal.impl.DefaultSettingsBuilder;
|
||||
import org.apache.maven.internal.impl.DefaultSettingsXmlFactory;
|
||||
import org.apache.maven.internal.impl.DefaultSuperPomProvider;
|
||||
import org.apache.maven.internal.impl.DefaultToolchainsBuilder;
|
||||
import org.apache.maven.internal.impl.DefaultToolchainsXmlFactory;
|
||||
import org.apache.maven.internal.impl.DefaultTransportProvider;
|
||||
import org.apache.maven.internal.impl.DefaultUrlNormalizer;
|
||||
import org.apache.maven.internal.impl.DefaultVersionParser;
|
||||
import org.apache.maven.internal.impl.ExtensibleEnumRegistries;
|
||||
import org.apache.maven.internal.impl.InternalSession;
|
||||
import org.apache.maven.internal.impl.model.BuildModelTransformer;
|
||||
import org.apache.maven.internal.impl.model.DefaultDependencyManagementImporter;
|
||||
import org.apache.maven.internal.impl.model.DefaultDependencyManagementInjector;
|
||||
import org.apache.maven.internal.impl.model.DefaultInheritanceAssembler;
|
||||
import org.apache.maven.internal.impl.model.DefaultLifecycleBindingsInjector;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelBuilder;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelInterpolator;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelNormalizer;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelPathTranslator;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelProcessor;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelValidator;
|
||||
import org.apache.maven.internal.impl.model.DefaultModelVersionProcessor;
|
||||
import org.apache.maven.internal.impl.model.DefaultPathTranslator;
|
||||
import org.apache.maven.internal.impl.model.DefaultPluginManagementInjector;
|
||||
import org.apache.maven.internal.impl.model.DefaultProfileInjector;
|
||||
import org.apache.maven.internal.impl.model.DefaultProfileSelector;
|
||||
import org.apache.maven.internal.impl.model.DefaultRootLocator;
|
||||
import org.apache.maven.internal.impl.model.ProfileActivationFilePathInterpolator;
|
||||
import org.apache.maven.internal.impl.resolver.DefaultVersionRangeResolver;
|
||||
import org.apache.maven.internal.impl.resolver.DefaultVersionResolver;
|
||||
import org.apache.maven.internal.impl.resolver.MavenVersionScheme;
|
||||
|
|
|
@ -79,8 +79,34 @@ import org.eclipse.aether.impl.UpdateCheckManager;
|
|||
import org.eclipse.aether.impl.UpdatePolicyAnalyzer;
|
||||
import org.eclipse.aether.impl.VersionRangeResolver;
|
||||
import org.eclipse.aether.impl.VersionResolver;
|
||||
import org.eclipse.aether.internal.impl.*;
|
||||
import org.eclipse.aether.internal.impl.DefaultArtifactPredicateFactory;
|
||||
import org.eclipse.aether.internal.impl.DefaultArtifactResolver;
|
||||
import org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider;
|
||||
import org.eclipse.aether.internal.impl.DefaultChecksumProcessor;
|
||||
import org.eclipse.aether.internal.impl.DefaultDeployer;
|
||||
import org.eclipse.aether.internal.impl.DefaultInstaller;
|
||||
import org.eclipse.aether.internal.impl.DefaultLocalPathComposer;
|
||||
import org.eclipse.aether.internal.impl.DefaultLocalPathPrefixComposerFactory;
|
||||
import org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider;
|
||||
import org.eclipse.aether.internal.impl.DefaultMetadataResolver;
|
||||
import org.eclipse.aether.internal.impl.DefaultOfflineController;
|
||||
import org.eclipse.aether.internal.impl.DefaultPathProcessor;
|
||||
import org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager;
|
||||
import org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider;
|
||||
import org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher;
|
||||
import org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider;
|
||||
import org.eclipse.aether.internal.impl.DefaultRepositorySystem;
|
||||
import org.eclipse.aether.internal.impl.DefaultRepositorySystemLifecycle;
|
||||
import org.eclipse.aether.internal.impl.DefaultTrackingFileManager;
|
||||
import org.eclipse.aether.internal.impl.DefaultTransporterProvider;
|
||||
import org.eclipse.aether.internal.impl.DefaultUpdateCheckManager;
|
||||
import org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer;
|
||||
import org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory;
|
||||
import org.eclipse.aether.internal.impl.LocalPathComposer;
|
||||
import org.eclipse.aether.internal.impl.LocalPathPrefixComposerFactory;
|
||||
import org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory;
|
||||
import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
|
||||
import org.eclipse.aether.internal.impl.TrackingFileManager;
|
||||
import org.eclipse.aether.internal.impl.checksum.DefaultChecksumAlgorithmFactorySelector;
|
||||
import org.eclipse.aether.internal.impl.checksum.Md5ChecksumAlgorithmFactory;
|
||||
import org.eclipse.aether.internal.impl.checksum.Sha1ChecksumAlgorithmFactory;
|
||||
|
|
|
@ -19,7 +19,12 @@
|
|||
package org.apache.maven.artifact;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.maven.artifact.handler.ArtifactHandler;
|
||||
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
||||
|
@ -90,6 +95,7 @@ public class DefaultArtifact implements Artifact {
|
|||
false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
public DefaultArtifact(
|
||||
String groupId,
|
||||
String artifactId,
|
||||
|
|
|
@ -167,7 +167,6 @@ public class ArtifactRepositoryPolicy {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
private int ordinalOfUpdatePolicy(String policy) {
|
||||
if (ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY.equals(policy)) {
|
||||
return 1440;
|
||||
|
|
|
@ -22,7 +22,7 @@ under the License.
|
|||
<parent>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>apache</artifactId>
|
||||
<version>32</version>
|
||||
<version>33</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -29,7 +29,16 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -515,7 +524,6 @@ class ReactorReader implements MavenWorkspaceReader {
|
|||
public void init(Context context) throws Exception {}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("checkstyle:MissingSwitchDefault")
|
||||
public void onEvent(Object event) throws Exception {
|
||||
if (event instanceof ExecutionEvent) {
|
||||
ReactorReader reactorReader = lookup.lookup(ReactorReader.class);
|
||||
|
|
|
@ -87,7 +87,6 @@ public class MavenSession implements Cloneable {
|
|||
* ({@link PluginDescriptor#getPluginLookupKey()}). Plugin contexts itself are mappings of {@link String} keys to
|
||||
* {@link Object} values.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private final ConcurrentMap<String, ConcurrentMap<String, ConcurrentMap<String, Object>>>
|
||||
pluginContextsByProjectAndPluginKey = new ConcurrentHashMap<>();
|
||||
|
||||
|
|
|
@ -51,14 +51,21 @@ import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
|
|||
import org.apache.maven.settings.crypto.SettingsDecrypter;
|
||||
import org.apache.maven.settings.crypto.SettingsDecryptionResult;
|
||||
import org.codehaus.plexus.configuration.PlexusConfiguration;
|
||||
import org.eclipse.aether.*;
|
||||
import org.eclipse.aether.ConfigurationProperties;
|
||||
import org.eclipse.aether.RepositoryListener;
|
||||
import org.eclipse.aether.RepositorySystem;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
import org.eclipse.aether.RepositorySystemSession.SessionBuilder;
|
||||
import org.eclipse.aether.artifact.Artifact;
|
||||
import org.eclipse.aether.artifact.DefaultArtifact;
|
||||
import org.eclipse.aether.collection.VersionFilter;
|
||||
import org.eclipse.aether.repository.RepositoryPolicy;
|
||||
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
|
||||
import org.eclipse.aether.util.graph.version.*;
|
||||
import org.eclipse.aether.util.graph.version.ChainedVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.ContextualSnapshotVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.HighestVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.LowestVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.PredicateVersionFilter;
|
||||
import org.eclipse.aether.util.listener.ChainedRepositoryListener;
|
||||
import org.eclipse.aether.util.repository.AuthenticationBuilder;
|
||||
import org.eclipse.aether.util.repository.ChainedLocalRepositoryManager;
|
||||
|
|
|
@ -31,7 +31,11 @@ import java.nio.file.Path;
|
|||
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.plugin.descriptor.PluginDescriptor;
|
||||
import org.apache.maven.api.services.xml.*;
|
||||
import org.apache.maven.api.services.xml.PluginXmlFactory;
|
||||
import org.apache.maven.api.services.xml.XmlReaderException;
|
||||
import org.apache.maven.api.services.xml.XmlReaderRequest;
|
||||
import org.apache.maven.api.services.xml.XmlWriterException;
|
||||
import org.apache.maven.api.services.xml.XmlWriterRequest;
|
||||
import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxReader;
|
||||
import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxWriter;
|
||||
|
||||
|
|
|
@ -19,10 +19,21 @@
|
|||
package org.apache.maven.internal.impl;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.maven.RepositoryUtils;
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Artifact;
|
||||
import org.apache.maven.api.DependencyCoordinate;
|
||||
import org.apache.maven.api.DependencyScope;
|
||||
import org.apache.maven.api.Exclusion;
|
||||
import org.apache.maven.api.Packaging;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.Type;
|
||||
import org.apache.maven.api.VersionConstraint;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
import org.apache.maven.api.model.DependencyManagement;
|
||||
|
|
|
@ -23,15 +23,25 @@ import javax.inject.Named;
|
|||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.RepositoryUtils;
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Artifact;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.ProjectScope;
|
||||
import org.apache.maven.api.RemoteRepository;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.di.SessionScoped;
|
||||
import org.apache.maven.api.model.Resource;
|
||||
import org.apache.maven.api.services.*;
|
||||
import org.apache.maven.api.services.ArtifactManager;
|
||||
import org.apache.maven.api.services.ProjectManager;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.eclipse.sisu.Typed;
|
||||
|
||||
|
|
|
@ -20,11 +20,17 @@ package org.apache.maven.internal.impl;
|
|||
|
||||
import java.nio.file.Path;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.apache.maven.RepositoryUtils;
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.RemoteRepository;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.Version;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
import org.apache.maven.api.services.Lookup;
|
||||
|
|
|
@ -18,9 +18,14 @@
|
|||
*/
|
||||
package org.apache.maven.internal.impl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.maven.project.CycleDetectedException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
class Graph {
|
||||
private enum DfsState {
|
||||
|
|
|
@ -52,6 +52,7 @@ class TransformedArtifact extends DefaultArtifact {
|
|||
private final RepositorySystemSession session;
|
||||
private final AtomicReference<String> sourceState;
|
||||
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
TransformedArtifact(
|
||||
DefaultConsumerPomArtifactTransformer defaultConsumerPomArtifactTransformer,
|
||||
MavenProject project,
|
||||
|
|
|
@ -18,7 +18,10 @@
|
|||
*/
|
||||
package org.apache.maven.lifecycle;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
|
||||
|
|
|
@ -24,7 +24,15 @@ import javax.inject.Singleton;
|
|||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.api.plugin.descriptor.lifecycle.Execution;
|
||||
import org.apache.maven.api.plugin.descriptor.lifecycle.Phase;
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
*/
|
||||
package org.apache.maven.lifecycle.internal;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class BomLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: bom
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"install", "org.apache.maven.plugins:maven-install-plugin:" + INSTALL_PLUGIN_VERSION + ":install",
|
||||
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:" + DEPLOY_PLUGIN_VERSION + ":deploy"
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class EarLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: ear
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"generate-resources",
|
||||
"org.apache.maven.plugins:maven-ear-plugin:" + EAR_PLUGIN_VERSION + ":generate-application-xml",
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class EjbLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: ejb
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"process-resources",
|
||||
"org.apache.maven.plugins:maven-resources-plugin:" + RESOURCES_PLUGIN_VERSION + ":resources",
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class JarLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: jar
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"process-resources",
|
||||
"org.apache.maven.plugins:maven-resources-plugin:" + RESOURCES_PLUGIN_VERSION + ":resources",
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class MavenPluginLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: maven-plugin
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"process-resources",
|
||||
"org.apache.maven.plugins:maven-resources-plugin:" + RESOURCES_PLUGIN_VERSION + ":resources",
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class PomLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: pom
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"install", "org.apache.maven.plugins:maven-install-plugin:" + INSTALL_PLUGIN_VERSION + ":install",
|
||||
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:" + DEPLOY_PLUGIN_VERSION + ":deploy"
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class RarLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: rar
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"process-resources",
|
||||
"org.apache.maven.plugins:maven-resources-plugin:" + RESOURCES_PLUGIN_VERSION + ":resources",
|
||||
|
|
|
@ -29,7 +29,6 @@ import javax.inject.Singleton;
|
|||
@Singleton
|
||||
public final class WarLifecycleMappingProvider extends AbstractLifecycleMappingProvider {
|
||||
// START SNIPPET: war
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
private static final String[] BINDINGS = {
|
||||
"process-resources",
|
||||
"org.apache.maven.plugins:maven-resources-plugin:" + RESOURCES_PLUGIN_VERSION + ":resources",
|
||||
|
|
|
@ -22,14 +22,23 @@ import javax.inject.Inject;
|
|||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
@ -749,7 +758,6 @@ public class DefaultMavenPluginManager implements MavenPluginManager {
|
|||
pomConfiguration = XmlPlexusConfiguration.toPlexusConfiguration(dom);
|
||||
}
|
||||
|
||||
InternalMavenSession sessionV4 = InternalMavenSession.from(session.getSession());
|
||||
ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator(session, mojoExecution);
|
||||
|
||||
for (MavenPluginConfigurationValidator validator : configurationValidators) {
|
||||
|
@ -1033,7 +1041,6 @@ public class DefaultMavenPluginManager implements MavenPluginManager {
|
|||
return this.value;
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:MagicNumber")
|
||||
public int hashCode() {
|
||||
return 127 * "value".hashCode() ^ this.value.hashCode();
|
||||
}
|
||||
|
|
|
@ -28,8 +28,26 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
|
@ -42,7 +60,16 @@ import org.apache.maven.RepositoryUtils;
|
|||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.SessionData;
|
||||
import org.apache.maven.api.feature.Features;
|
||||
import org.apache.maven.api.model.*;
|
||||
import org.apache.maven.api.model.Build;
|
||||
import org.apache.maven.api.model.Dependency;
|
||||
import org.apache.maven.api.model.DependencyManagement;
|
||||
import org.apache.maven.api.model.DeploymentRepository;
|
||||
import org.apache.maven.api.model.Extension;
|
||||
import org.apache.maven.api.model.Model;
|
||||
import org.apache.maven.api.model.Parent;
|
||||
import org.apache.maven.api.model.Plugin;
|
||||
import org.apache.maven.api.model.Profile;
|
||||
import org.apache.maven.api.model.ReportPlugin;
|
||||
import org.apache.maven.api.services.ModelBuilder;
|
||||
import org.apache.maven.api.services.ModelBuilderException;
|
||||
import org.apache.maven.api.services.ModelBuilderRequest;
|
||||
|
|
|
@ -18,7 +18,14 @@
|
|||
*/
|
||||
package org.apache.maven.project;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
class Graph {
|
||||
private enum DfsState {
|
||||
|
|
|
@ -88,6 +88,7 @@ public class ProjectModelResolver implements ModelResolver {
|
|||
|
||||
private final Map<String, Future<Result>> parentCache;
|
||||
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
public ProjectModelResolver(
|
||||
RepositorySystemSession session,
|
||||
RequestTrace trace,
|
||||
|
|
|
@ -19,7 +19,13 @@
|
|||
package org.apache.maven.resolver;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.api.model.Model;
|
||||
|
|
|
@ -43,12 +43,20 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
|
|||
import org.eclipse.aether.ConfigurationProperties;
|
||||
import org.eclipse.aether.collection.VersionFilter;
|
||||
import org.eclipse.aether.repository.RepositoryPolicy;
|
||||
import org.eclipse.aether.util.graph.version.*;
|
||||
import org.eclipse.aether.util.graph.version.ChainedVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.ContextualSnapshotVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.HighestVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.LowestVersionFilter;
|
||||
import org.eclipse.aether.util.graph.version.PredicateVersionFilter;
|
||||
import org.eclipse.aether.version.VersionScheme;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrowsExactly;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* UT for {@link DefaultRepositorySystemSessionFactory}.
|
||||
|
|
|
@ -28,11 +28,16 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.api.services.ChecksumAlgorithmService;
|
||||
import org.eclipse.aether.internal.impl.checksum.*;
|
||||
import org.eclipse.aether.internal.impl.checksum.DefaultChecksumAlgorithmFactorySelector;
|
||||
import org.eclipse.aether.internal.impl.checksum.Md5ChecksumAlgorithmFactory;
|
||||
import org.eclipse.aether.internal.impl.checksum.Sha1ChecksumAlgorithmFactory;
|
||||
import org.eclipse.aether.internal.impl.checksum.Sha256ChecksumAlgorithmFactory;
|
||||
import org.eclipse.aether.internal.impl.checksum.Sha512ChecksumAlgorithmFactory;
|
||||
import org.eclipse.aether.spi.connector.checksum.ChecksumAlgorithmFactory;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class DefaultChecksumAlgorithmServiceTest {
|
||||
private static Map<String, ChecksumAlgorithmFactory> getChecksumAlgorithmFactories() {
|
||||
|
|
|
@ -31,7 +31,16 @@ import java.util.Objects;
|
|||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.Artifact;
|
||||
import org.apache.maven.api.ArtifactCoordinate;
|
||||
import org.apache.maven.api.Dependency;
|
||||
import org.apache.maven.api.DependencyCoordinate;
|
||||
import org.apache.maven.api.JavaPathType;
|
||||
import org.apache.maven.api.Node;
|
||||
import org.apache.maven.api.PathScope;
|
||||
import org.apache.maven.api.PathType;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.services.DependencyResolver;
|
||||
import org.apache.maven.api.services.DependencyResolverResult;
|
||||
import org.apache.maven.api.services.ProjectBuilder;
|
||||
|
|
|
@ -31,7 +31,22 @@ import org.apache.maven.lifecycle.Lifecycle;
|
|||
import org.codehaus.plexus.PlexusContainer;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.*;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.CLEAN;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.COMPILE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.INITIALIZE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.INSTALL;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.PACKAGE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.POST_CLEAN;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.POST_SITE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.PRE_CLEAN;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.PRE_SITE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.PROCESS_RESOURCES;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.PROCESS_TEST_RESOURCES;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.SITE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.SITE_DEPLOY;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.TEST;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.VALIDATE;
|
||||
import static org.apache.maven.lifecycle.internal.stub.LifecycleExecutionPlanCalculatorStub.WRAPPER;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
|
|
@ -30,7 +30,12 @@ import org.apache.maven.lifecycle.DefaultLifecycles;
|
|||
import org.apache.maven.lifecycle.LifecycleNotFoundException;
|
||||
import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException;
|
||||
import org.apache.maven.lifecycle.MavenExecutionPlan;
|
||||
import org.apache.maven.lifecycle.internal.*;
|
||||
import org.apache.maven.lifecycle.internal.DefaultLifecyclePluginAnalyzer;
|
||||
import org.apache.maven.lifecycle.internal.ExecutionPlanItem;
|
||||
import org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculator;
|
||||
import org.apache.maven.lifecycle.internal.ProjectBuildList;
|
||||
import org.apache.maven.lifecycle.internal.ProjectSegment;
|
||||
import org.apache.maven.lifecycle.internal.Task;
|
||||
import org.apache.maven.model.InputLocation;
|
||||
import org.apache.maven.model.InputSource;
|
||||
import org.apache.maven.model.Plugin;
|
||||
|
|
|
@ -43,7 +43,11 @@ import org.apache.maven.execution.DefaultMavenExecutionRequest;
|
|||
import org.apache.maven.execution.DefaultMavenExecutionResult;
|
||||
import org.apache.maven.execution.MavenExecutionRequest;
|
||||
import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.internal.impl.*;
|
||||
import org.apache.maven.internal.impl.DefaultLookup;
|
||||
import org.apache.maven.internal.impl.DefaultMojoExecution;
|
||||
import org.apache.maven.internal.impl.DefaultProject;
|
||||
import org.apache.maven.internal.impl.DefaultSession;
|
||||
import org.apache.maven.internal.impl.InternalMavenSession;
|
||||
import org.apache.maven.model.Build;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.building.DefaultModelBuildingRequest;
|
||||
|
|
|
@ -21,7 +21,9 @@ package org.apache.maven.plugin.internal;
|
|||
import org.eclipse.aether.util.version.GenericVersionScheme;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class MavenPluginJavaPrerequisiteCheckerTest {
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
package org.apache.maven.di.impl;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
*/
|
||||
package org.apache.maven.di.impl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
|
|
@ -26,7 +26,21 @@ import java.lang.reflect.Method;
|
|||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.AbstractList;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.AbstractSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
|
|
@ -19,8 +19,21 @@
|
|||
package org.apache.maven.di.impl;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Executable;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Member;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
@ -28,7 +41,10 @@ import java.util.regex.Pattern;
|
|||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
import org.apache.maven.api.di.*;
|
||||
import org.apache.maven.api.di.Inject;
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Priority;
|
||||
import org.apache.maven.api.di.Qualifier;
|
||||
import org.apache.maven.di.Key;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
|
|
@ -18,8 +18,20 @@
|
|||
*/
|
||||
package org.apache.maven.di.impl;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import java.lang.reflect.GenericArrayType;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.lang.reflect.TypeVariable;
|
||||
import java.lang.reflect.WildcardType;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
|
@ -25,13 +25,23 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.apache.maven.api.di.*;
|
||||
import org.apache.maven.api.di.Inject;
|
||||
import org.apache.maven.api.di.Named;
|
||||
import org.apache.maven.api.di.Priority;
|
||||
import org.apache.maven.api.di.Provides;
|
||||
import org.apache.maven.api.di.Qualifier;
|
||||
import org.apache.maven.api.di.Singleton;
|
||||
import org.apache.maven.api.di.Typed;
|
||||
import org.apache.maven.di.Injector;
|
||||
import org.apache.maven.di.Key;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class InjectorImplTest {
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
package org.apache.maven.di.impl;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.di.Key;
|
||||
|
|
|
@ -130,7 +130,7 @@ public class CLIManager {
|
|||
|
||||
protected Options options;
|
||||
|
||||
@SuppressWarnings("checkstyle:linelength")
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public CLIManager() {
|
||||
options = new Options();
|
||||
options.addOption(Option.builder(Character.toString(HELP))
|
||||
|
|
|
@ -31,8 +31,17 @@ import java.nio.charset.Charset;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -62,7 +71,10 @@ import org.apache.maven.cli.logging.Slf4jConfiguration;
|
|||
import org.apache.maven.cli.logging.Slf4jConfigurationFactory;
|
||||
import org.apache.maven.cli.logging.Slf4jLoggerManager;
|
||||
import org.apache.maven.cli.logging.Slf4jStdoutLogger;
|
||||
import org.apache.maven.cli.transfer.*;
|
||||
import org.apache.maven.cli.transfer.ConsoleMavenTransferListener;
|
||||
import org.apache.maven.cli.transfer.QuietMavenTransferListener;
|
||||
import org.apache.maven.cli.transfer.SimplexTransferListener;
|
||||
import org.apache.maven.cli.transfer.Slf4jMavenTransferListener;
|
||||
import org.apache.maven.eventspy.internal.EventSpyDispatcher;
|
||||
import org.apache.maven.exception.DefaultExceptionHandler;
|
||||
import org.apache.maven.exception.ExceptionHandler;
|
||||
|
|
|
@ -121,7 +121,6 @@ public class FileSizeFormat {
|
|||
format(builder, size, unit, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
private void format(StringBuilder builder, long size, ScaleUnit unit, boolean omitSymbol) {
|
||||
if (size < 0L) {
|
||||
throw new IllegalArgumentException("file size cannot be negative: " + size);
|
||||
|
@ -153,7 +152,6 @@ public class FileSizeFormat {
|
|||
format(builder, size, unit, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
private void format(MessageBuilder builder, long size, ScaleUnit unit, boolean omitSymbol) {
|
||||
if (size < 0L) {
|
||||
throw new IllegalArgumentException("file size cannot be negative: " + size);
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.ArrayList;
|
|||
* with maven-shared-utils, while Maven has migrated to JLine (into which Jansi has been merged
|
||||
* since JLine 3.25.0).
|
||||
*/
|
||||
@SuppressWarnings({"checkstyle:MagicNumber", "unused"})
|
||||
@SuppressWarnings("unused")
|
||||
public class Ansi implements Appendable {
|
||||
|
||||
private static final char FIRST_ESC_CHAR = 27;
|
||||
|
|
|
@ -31,6 +31,11 @@ under the License.
|
|||
<name>Maven Model Builder</name>
|
||||
<description>The effective model builder, with inheritance, profile activation, interpolation, ...</description>
|
||||
|
||||
<properties>
|
||||
<!-- in: DefaultModelValidator, DefaultModelBuilder -->
|
||||
<checkstyle.violation.ignore>FileLength</checkstyle.violation.ignore>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
|
|
@ -18,7 +18,15 @@
|
|||
*/
|
||||
package org.apache.maven.model.building;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
class Graph {
|
||||
|
||||
|
|
|
@ -21,7 +21,14 @@ package org.apache.maven.model.composition;
|
|||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.api.model.Dependency;
|
||||
import org.apache.maven.api.model.DependencyManagement;
|
||||
|
|
|
@ -25,8 +25,6 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
/**
|
||||
* Describes the environmental context used to determine the activation status of profiles.
|
||||
*
|
||||
|
|
|
@ -297,6 +297,7 @@ public class DefaultModelValidator implements ModelValidator {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public void validateFileModel(Model ma, ModelBuildingRequest request, ModelProblemCollector problems) {
|
||||
|
||||
org.apache.maven.api.model.Model m = ma.getDelegate();
|
||||
|
@ -623,6 +624,7 @@ public class DefaultModelValidator implements ModelValidator {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("checkstyle:MethodLength")
|
||||
public void validateEffectiveModel(Model ma, ModelBuildingRequest request, ModelProblemCollector problems) {
|
||||
org.apache.maven.api.model.Model m = ma.getDelegate();
|
||||
|
||||
|
|
|
@ -30,7 +30,10 @@ import org.apache.maven.model.resolution.ModelResolver;
|
|||
import org.apache.maven.model.resolution.UnresolvableModelException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,9 @@ import org.apache.maven.model.profile.ProfileActivationContext;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Tests {@link JdkVersionProfileActivator}.
|
||||
|
|
|
@ -30,7 +30,16 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.maven.api.model.InputSource;
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||
import org.openjdk.jmh.annotations.Level;
|
||||
import org.openjdk.jmh.annotations.Measurement;
|
||||
import org.openjdk.jmh.annotations.Mode;
|
||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||
import org.openjdk.jmh.annotations.Scope;
|
||||
import org.openjdk.jmh.annotations.Setup;
|
||||
import org.openjdk.jmh.annotations.State;
|
||||
import org.openjdk.jmh.annotations.Warmup;
|
||||
import org.openjdk.jmh.runner.Runner;
|
||||
import org.openjdk.jmh.runner.RunnerException;
|
||||
import org.openjdk.jmh.runner.options.Options;
|
||||
|
|
|
@ -79,6 +79,7 @@ public class DefaultArtifactDescriptorReader implements ArtifactDescriptorReader
|
|||
private final ArtifactDescriptorReaderDelegate delegate;
|
||||
|
||||
@Inject
|
||||
@SuppressWarnings("checkstyle:ParameterNumber")
|
||||
public DefaultArtifactDescriptorReader(
|
||||
RemoteRepositoryManager remoteRepositoryManager,
|
||||
VersionResolver versionResolver,
|
||||
|
|
|
@ -45,7 +45,6 @@ public class PluginsMetadataGeneratorFactory implements MetadataGeneratorFactory
|
|||
return new PluginsMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 10; // G level MD should be deployed as 3rd MD
|
||||
|
|
|
@ -45,7 +45,6 @@ public class SnapshotMetadataGeneratorFactory implements MetadataGeneratorFactor
|
|||
return new RemoteSnapshotMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 30; // GAV level metadata should be deployed 1st MD
|
||||
|
|
|
@ -45,7 +45,6 @@ public class VersionsMetadataGeneratorFactory implements MetadataGeneratorFactor
|
|||
return new VersionsMetadataGenerator(session, request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:magicnumber")
|
||||
@Override
|
||||
public float getPriority() {
|
||||
return 20; // GA level metadata should be deployed 2nd MD
|
||||
|
|
|
@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory;
|
|||
@Singleton
|
||||
@Named(DistributionManagementArtifactRelocationSource.NAME)
|
||||
@Priority(5)
|
||||
@SuppressWarnings("checkstyle:MagicNumber")
|
||||
public final class DistributionManagementArtifactRelocationSource implements MavenArtifactRelocationSource {
|
||||
public static final String NAME = "distributionManagement";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DistributionManagementArtifactRelocationSource.class);
|
||||
|
|
|
@ -48,7 +48,6 @@ import org.slf4j.LoggerFactory;
|
|||
@Singleton
|
||||
@Named(UserPropertiesArtifactRelocationSource.NAME)
|
||||
@Priority(50)
|
||||
@SuppressWarnings("checkstyle:MagicNumber")
|
||||
public final class UserPropertiesArtifactRelocationSource implements MavenArtifactRelocationSource {
|
||||
public static final String NAME = "userProperties";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(UserPropertiesArtifactRelocationSource.class);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue