From d92508179410897404bcc7e826bb0877be2d08b8 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Thu, 1 Feb 2018 22:57:39 +0100 Subject: [PATCH] Reduce number of global checkstyle rule violations Fix code for following checkstyle rules: ConstantName, FileLength, InnerAssignment, JavadocType, MagicNumber, MethodLength, MethodName, NewlineAtEndOfFile, ParameterNumber, RedundantThrows, VisibilityModifier Fixes #149 --- .../apache/maven/artifact/ArtifactUtils.java | 3 ++ .../maven/artifact/DefaultArtifact.java | 1 + .../artifact/metadata/ArtifactMetadata.java | 3 ++ .../repository/ArtifactRepositoryPolicy.java | 1 + .../artifact/repository/Authentication.java | 3 ++ .../layout/ArtifactRepositoryLayout2.java | 3 ++ .../versioning/ComparableVersion.java | 13 +++-- .../org/apache/maven/repository/Proxy.java | 3 ++ maven-compat/pom.xml | 4 -- .../artifact/deployer/ArtifactDeployer.java | 3 ++ .../deployer/DefaultArtifactDeployer.java | 3 ++ .../artifact/manager/DefaultWagonManager.java | 3 ++ .../layout/FlatRepositoryLayout.java | 3 ++ .../repository/metadata/MetadataBridge.java | 2 +- .../artifact/resolver/ArtifactCollector.java | 4 ++ .../artifact/resolver/ArtifactResolver.java | 1 + .../resolver/DefaultArtifactCollector.java | 4 ++ .../resolver/DefaultArtifactResolver.java | 11 ++-- .../filter/InversionArtifactFilter.java | 3 ++ .../versioning/ManagedVersionMap.java | 3 ++ .../profiles/DefaultMavenProfilesBuilder.java | 3 ++ .../maven/profiles/DefaultProfileManager.java | 3 ++ .../apache/maven/profiles/ProfileManager.java | 3 ++ .../profiles/ProfilesConversionUtils.java | 3 ++ .../activation/DetectedProfileActivator.java | 3 ++ .../activation/FileProfileActivator.java | 3 ++ .../activation/JdkPrefixProfileActivator.java | 3 ++ .../OperatingSystemProfileActivator.java | 3 ++ .../ProfileActivationException.java | 3 ++ .../profiles/activation/ProfileActivator.java | 3 ++ .../SystemPropertyProfileActivator.java | 3 ++ .../DefaultProjectBuilderConfiguration.java | 3 ++ .../project/InvalidProjectModelException.java | 3 ++ .../MissingRepositoryElementException.java | 4 +- .../apache/maven/project/ProjectUtils.java | 3 ++ .../DefaultModelInheritanceAssembler.java | 3 ++ .../StringSearchModelInterpolator.java | 7 ++- .../project/path/DefaultPathTranslator.java | 3 ++ .../validation/DefaultModelValidator.java | 2 +- .../repository/DefaultMirrorSelector.java | 3 ++ .../repository/MetadataResolutionResult.java | 5 +- .../UserLocalArtifactRepository.java | 3 ++ .../legacy/DefaultUpdateCheckManager.java | 3 ++ .../legacy/DefaultWagonManager.java | 5 ++ .../legacy/LegacyRepositorySystem.java | 2 +- .../repository/legacy/MavenArtifact.java | 2 +- .../legacy/TransferListenerAdapter.java | 3 ++ .../repository/legacy/UpdateCheckManager.java | 3 ++ .../legacy/WagonConfigurationException.java | 4 +- .../maven/repository/legacy/WagonManager.java | 3 ++ .../DefaultLegacyArtifactCollector.java | 4 ++ .../resolver/LegacyArtifactCollector.java | 1 + .../ArtifactTransformationManager.java | 4 +- .../LatestArtifactTransformation.java | 3 ++ .../repository/metadata/ArtifactMetadata.java | 21 +++----- .../metadata/MetadataGraphEdge.java | 1 + .../metadata/MetadataResolutionException.java | 3 ++ .../MetadataResolutionRequestTypeEnum.java | 3 ++ .../ExpressionDocumentationException.java | 3 ++ .../plugin/ExpressionDocumenter.java | 3 ++ maven-core/pom.xml | 4 -- .../apache/maven/ArtifactFilterManager.java | 3 ++ .../DefaultProjectDependenciesResolver.java | 5 ++ .../src/main/java/org/apache/maven/Maven.java | 1 + .../apache/maven/MissingModuleException.java | 3 ++ .../maven/ProjectDependenciesResolver.java | 2 +- .../artifact/factory/ArtifactFactory.java | 4 ++ .../factory/DefaultArtifactFactory.java | 5 ++ .../metadata/AbstractArtifactMetadata.java | 3 ++ .../ArtifactMetadataRetrievalException.java | 3 ++ .../metadata/ArtifactMetadataSource.java | 4 ++ .../artifact/metadata/ResolutionGroup.java | 3 ++ .../repository/MavenArtifactRepository.java | 4 ++ .../metadata/RepositoryMetadataManager.java | 3 ++ .../artifact/resolver/ResolutionNode.java | 3 ++ .../maven/bridge/MavenRepositorySystem.java | 53 ++++++++++--------- .../org/apache/maven/eventspy/EventSpy.java | 4 +- .../exception/DefaultExceptionHandler.java | 3 ++ ...DefaultMavenExecutionRequestPopulator.java | 3 ++ .../apache/maven/execution/MavenSession.java | 2 + .../maven/execution/ReactorManager.java | 3 ++ .../scope/internal/MojoExecutionScope.java | 7 ++- .../MojoExecutionScopeCoreModule.java | 3 ++ .../internal/MojoExecutionScopeModule.java | 3 ++ .../internal/CoreExportsProvider.java | 3 ++ .../internal/CoreExtensionEntry.java | 8 +-- .../maven/graph/DefaultGraphBuilder.java | 3 ++ .../maven/lifecycle/MavenExecutionPlan.java | 3 ++ .../DefaultLifecycleMappingDelegate.java | 5 ++ .../DefaultProjectArtifactFactory.java | 3 ++ .../internal/LifecycleDependencyResolver.java | 2 +- .../builder/BuilderNotFoundException.java | 3 ++ .../multithreaded/ThreadOutputMuxer.java | 2 +- .../singlethreaded/SingleThreadedBuilder.java | 5 ++ .../mapping/DefaultLifecycleMapping.java | 3 ++ .../lifecycle/mapping/LifecycleMapping.java | 3 ++ .../lifecycle/mapping/LifecycleMojo.java | 3 ++ .../lifecycle/mapping/LifecyclePhase.java | 3 ++ .../DefaultLifecycleBindingsInjector.java | 4 ++ .../plugin/DefaultBuildPluginManager.java | 3 ++ .../plugin/DefaultExtensionRealmCache.java | 6 ++- .../plugin/DefaultPluginArtifactsCache.java | 8 +-- .../maven/plugin/DefaultPluginRealmCache.java | 6 ++- .../maven/plugin/ExtensionRealmCache.java | 23 ++++++-- .../InvalidPluginDescriptorException.java | 3 ++ .../maven/plugin/MavenPluginValidator.java | 3 ++ .../apache/maven/plugin/MojoExecution.java | 3 ++ .../maven/plugin/PluginArtifactsCache.java | 19 +++++-- .../plugin/PluginExecutionException.java | 3 ++ .../plugin/PluginParameterException.java | 3 ++ .../PluginParameterExpressionEvaluator.java | 1 + .../apache/maven/plugin/PluginRealmCache.java | 20 +++++-- .../internal/DefaultMavenPluginManager.java | 12 ++--- .../NoPluginFoundForPrefixException.java | 3 ++ .../PluginVersionNotFoundException.java | 3 ++ .../PluginVersionResolutionException.java | 3 ++ .../project/DefaultMavenProjectHelper.java | 3 ++ .../project/DefaultModelBuildingListener.java | 4 +- .../maven/project/DefaultProjectBuilder.java | 24 +++++---- .../project/DefaultProjectBuildingHelper.java | 6 +-- .../DefaultProjectBuildingRequest.java | 3 ++ .../project/DefaultProjectRealmCache.java | 6 ++- .../InvalidProjectVersionException.java | 3 ++ .../maven/project/ProjectBuildingRequest.java | 3 ++ .../maven/project/ProjectRealmCache.java | 17 +++++- .../apache/maven/project/ProjectSorter.java | 5 +- .../maven/project/ReactorModelPool.java | 2 +- .../artifact/ArtifactWithDependencies.java | 3 ++ .../artifact/DefaultMavenMetadataCache.java | 9 ++++ .../DefaultProjectArtifactsCache.java | 8 +-- .../project/artifact/MavenMetadataCache.java | 3 ++ .../project/artifact/MavenMetadataSource.java | 2 +- .../project/artifact/PluginArtifact.java | 3 ++ .../project/artifact/ProjectArtifact.java | 3 ++ .../artifact/ProjectArtifactsCache.java | 17 +++++- .../ArtifactDoesNotExistException.java | 3 ++ .../ArtifactTransferFailedException.java | 3 ++ .../repository/ArtifactTransferListener.java | 3 ++ .../repository/LocalArtifactRepository.java | 3 ++ .../maven/repository/RepositorySystem.java | 3 ++ .../legacy/metadata/ResolutionGroup.java | 3 ++ .../session/scope/internal/SessionScope.java | 12 +++-- .../scope/internal/SessionScopeModule.java | 3 ++ .../toolchain/merge/MavenToolchainMerger.java | 6 +-- .../project/LegacyLocalRepositoryManager.java | 2 +- .../org/apache/maven/cli/CleanArgument.java | 3 ++ .../java/org/apache/maven/cli/CliRequest.java | 3 ++ .../java/org/apache/maven/cli/MavenCli.java | 4 +- .../configuration/ConfigurationProcessor.java | 3 ++ .../SettingsXmlConfigurationProcessor.java | 3 ++ .../cli/event/DefaultEventSpyContext.java | 3 ++ .../BootstrapCoreExtensionManager.java | 3 ++ .../maven/cli/logging/Slf4jConfiguration.java | 3 ++ .../AbstractMavenTransferListener.java | 4 ++ .../BatchModeMavenTransferListener.java | 3 ++ .../transfer/Slf4jMavenTransferListener.java | 3 ++ .../model/building/DefaultModelBuilder.java | 2 + .../model/building/DefaultModelProblem.java | 1 + .../model/building/DefaultModelProcessor.java | 3 ++ .../maven/model/building/ModelData.java | 2 +- .../maven/model/building/ModelProblem.java | 3 ++ .../model/building/ModelProblemUtils.java | 4 +- .../maven/model/building/ModelProcessor.java | 3 ++ .../DefaultInheritanceAssembler.java | 4 ++ .../interpolation/MavenBuildTimestamp.java | 3 ++ .../StringSearchModelInterpolator.java | 3 ++ .../DefaultDependencyManagementInjector.java | 4 ++ .../DefaultPluginManagementInjector.java | 8 ++- .../maven/model/merge/MavenModelMerger.java | 1 + .../normalization/DefaultModelNormalizer.java | 3 ++ .../model/profile/DefaultProfileInjector.java | 4 ++ .../resolution/WorkspaceModelResolver.java | 3 ++ .../validation/DefaultModelValidator.java | 2 + .../maven/plugin/MojoNotFoundException.java | 3 ++ .../DuplicateMojoDescriptorException.java | 3 ++ .../DuplicateParameterException.java | 3 ++ .../InvalidPluginDescriptorException.java | 3 ++ .../descriptor/PluginDescriptorBuilder.java | 1 + .../internal/DefaultVersionResolver.java | 3 +- .../internal/MavenResolverModule.java | 3 ++ .../internal/MavenWorkspaceReader.java | 3 ++ .../slf4j/impl/MavenSimpleLoggerFactory.java | 3 ++ pom.xml | 2 +- 183 files changed, 658 insertions(+), 145 deletions(-) diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java index 2c1bddd7f7..cf7d27d6d1 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java @@ -29,6 +29,9 @@ import java.util.regex.Matcher; import org.apache.commons.lang3.Validate; import org.apache.maven.artifact.versioning.VersionRange; +/** + * ArtifactUtils + */ public final class ArtifactUtils { diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java index bd2e8ed1ac..1167e91a53 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java @@ -94,6 +94,7 @@ public class DefaultArtifact this( groupId, artifactId, versionRange, scope, type, classifier, artifactHandler, false ); } + @SuppressWarnings( "checkstyle:parameternumber" ) public DefaultArtifact( String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler, boolean optional ) { diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadata.java b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadata.java index 452c9f4add..7bf8c6128b 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadata.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadata.java @@ -19,6 +19,9 @@ package org.apache.maven.artifact.metadata; * under the License. */ +/** + * Contains metadata about an artifact, and methods to retrieve/store it from an artifact repository. + */ @Deprecated public interface ArtifactMetadata extends org.apache.maven.repository.legacy.metadata.ArtifactMetadata diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java index c5d24732ee..5a795e9205 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java @@ -198,6 +198,7 @@ public class ArtifactRepositoryPolicy } } + @SuppressWarnings( "checkstyle:magicnumber" ) private int ordinalOfUpdatePolicy( String policy ) { if ( ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY.equals( policy ) ) diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/Authentication.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/Authentication.java index 323fb25bd1..f02d1c5d7f 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/Authentication.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/Authentication.java @@ -19,6 +19,9 @@ package org.apache.maven.artifact.repository; * under the License. */ +/** + * Authentication + */ public class Authentication { diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/ArtifactRepositoryLayout2.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/ArtifactRepositoryLayout2.java index c0544e5cb1..f6bc573005 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/ArtifactRepositoryLayout2.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/ArtifactRepositoryLayout2.java @@ -22,6 +22,9 @@ package org.apache.maven.artifact.repository.layout; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; +/** + * ArtifactRepositoryLayout2 + */ public interface ArtifactRepositoryLayout2 extends ArtifactRepositoryLayout { diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java index 8eb9a8fc11..4c64d2b0b7 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java @@ -148,10 +148,8 @@ public class ComparableVersion private static class StringItem implements Item { - private static final String[] QUALIFIERS = { "alpha", "beta", "milestone", "rc", "snapshot", "", "sp" }; - - @SuppressWarnings( "checkstyle:constantname" ) - private static final List _QUALIFIERS = Arrays.asList( QUALIFIERS ); + private static final List QUALIFIERS = + Arrays.asList( "alpha", "beta", "milestone", "rc", "snapshot", "", "sp" ); private static final Properties ALIASES = new Properties(); static @@ -165,7 +163,7 @@ public class ComparableVersion * A comparable value for the empty-string qualifier. This one is used to determine if a given qualifier makes * the version older than one without a qualifier, or more recent. */ - private static final String RELEASE_VERSION_INDEX = String.valueOf( _QUALIFIERS.indexOf( "" ) ); + private static final String RELEASE_VERSION_INDEX = String.valueOf( QUALIFIERS.indexOf( "" ) ); private String value; @@ -216,9 +214,9 @@ public class ComparableVersion */ public static String comparableQualifier( String qualifier ) { - int i = _QUALIFIERS.indexOf( qualifier ); + int i = QUALIFIERS.indexOf( qualifier ); - return i == -1 ? ( _QUALIFIERS.size() + "-" + qualifier ) : String.valueOf( i ); + return i == -1 ? ( QUALIFIERS.size() + "-" + qualifier ) : String.valueOf( i ); } public int compareTo( Item item ) @@ -350,6 +348,7 @@ public class ComparableVersion parseVersion( version ); } + @SuppressWarnings( "checkstyle:innerassignment" ) public final void parseVersion( String version ) { this.value = version; diff --git a/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java b/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java index e42f1ed8f8..960d7beb70 100644 --- a/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java +++ b/maven-artifact/src/main/java/org/apache/maven/repository/Proxy.java @@ -19,6 +19,9 @@ package org.apache.maven.repository; * under the License. */ +/** + * Proxy + */ public class Proxy { public static final String PROXY_SOCKS5 = "SOCKS_5"; diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml index 7ec94e241b..20de667630 100644 --- a/maven-compat/pom.xml +++ b/maven-compat/pom.xml @@ -33,10 +33,6 @@ under the License. Maven Compat Maven2 classes maintained as compatibility layer. - - false - - org.apache.maven 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 index 072552cc8f..bf15206958 100644 --- 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 @@ -24,6 +24,9 @@ import java.io.File; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; +/** + * ArtifactDeployer + */ public interface ArtifactDeployer { String ROLE = ArtifactDeployer.class.getName(); 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 index 1463c5acfa..87d9c46df2 100644 --- 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 @@ -47,6 +47,9 @@ import org.eclipse.aether.metadata.MergeableMetadata; import org.eclipse.aether.repository.RemoteRepository; import org.eclipse.aether.util.artifact.SubArtifact; +/** + * DefaultArtifactDeployer + */ @Component( role = ArtifactDeployer.class, instantiationStrategy = "per-lookup" ) public class DefaultArtifactDeployer extends AbstractLogEnabled diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java index fe89d1e2d6..5f7957e706 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java @@ -42,6 +42,9 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.logging.Logger; +/** + * Manages Wagon related operations in Maven. + */ @Component( role = WagonManager.class ) public class DefaultWagonManager extends org.apache.maven.repository.legacy.DefaultWagonManager diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java index 58143e0077..4426611570 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/layout/FlatRepositoryLayout.java @@ -25,6 +25,9 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.codehaus.plexus.component.annotations.Component; +/** + * FlatRepositoryLayout + */ @Component( role = ArtifactRepositoryLayout.class, hint = "flat" ) public class FlatRepositoryLayout implements ArtifactRepositoryLayout diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java index bf19921826..0fd49dd344 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java @@ -149,7 +149,7 @@ public final class MetadataBridge private File metadataFile; - public MetadataRepository( File metadataFile ) + MetadataRepository( File metadataFile ) { super( "local", "", null ); this.metadataFile = metadataFile; diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java index 5ef8602264..3526be4081 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java @@ -27,6 +27,10 @@ import org.apache.maven.artifact.metadata.ArtifactMetadataSource; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +/** + * Artifact collector - takes a set of original artifacts and resolves all of the best versions to use + * along with their metadata. No artifacts are downloaded. + */ @Deprecated public interface ArtifactCollector extends org.apache.maven.repository.legacy.resolver.LegacyArtifactCollector diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java index d36ebdef7a..45204f8479 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java @@ -79,6 +79,7 @@ public interface ArtifactResolver throws ArtifactResolutionException, ArtifactNotFoundException; @Deprecated + @SuppressWarnings( "checkstyle:parameternumber" ) ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository, diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java index cefb9e28b9..25e92c4202 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java @@ -21,6 +21,10 @@ package org.apache.maven.artifact.resolver; import org.codehaus.plexus.component.annotations.Component; +/** + * Artifact collector - takes a set of original artifacts and resolves all of the best versions to use + * along with their metadata. No artifacts are downloaded. + */ @Deprecated @Component( role = ArtifactCollector.class ) public class DefaultArtifactCollector diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index 915ee725f9..2d1d8d9492 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -258,7 +258,8 @@ public class DefaultArtifactResolver throws ArtifactResolutionException, ArtifactNotFoundException { - return resolveTransitively( artifacts, originatingArtifact, Collections.emptyMap(), localRepository, + return resolveTransitively( + artifacts, originatingArtifact, Collections.emptyMap(), localRepository, remoteRepositories, source, filter ); } @@ -305,10 +306,12 @@ public class DefaultArtifactResolver throws ArtifactResolutionException, ArtifactNotFoundException { - return resolveTransitively( artifacts, originatingArtifact, Collections.emptyMap(), localRepository, + return resolveTransitively( + artifacts, originatingArtifact, Collections.emptyMap(), localRepository, remoteRepositories, source, null, listeners ); } + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository, @@ -322,6 +325,7 @@ public class DefaultArtifactResolver remoteRepositories, source, filter, listeners, null ); } + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository, @@ -366,6 +370,7 @@ public class DefaultArtifactResolver // // ------------------------------------------------------------------------ + @SuppressWarnings( "checkstyle:methodlength" ) public ArtifactResolutionResult resolve( ArtifactResolutionRequest request ) { Artifact rootArtifact = request.getArtifact(); @@ -599,7 +604,7 @@ public class DefaultArtifactResolver private final ArtifactResolutionResult result; - public ResolveTask( ClassLoader classLoader, CountDownLatch latch, Artifact artifact, + ResolveTask( ClassLoader classLoader, CountDownLatch latch, Artifact artifact, RepositorySystemSession session, List remoteRepositories, ArtifactResolutionResult result ) { diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/InversionArtifactFilter.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/InversionArtifactFilter.java index 0499db51ba..fa66574d60 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/InversionArtifactFilter.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/InversionArtifactFilter.java @@ -21,6 +21,9 @@ package org.apache.maven.artifact.resolver.filter; import org.apache.maven.artifact.Artifact; +/** + * InversionArtifactFilter + */ public class InversionArtifactFilter implements ArtifactFilter { diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java index 02ac24cbe5..c098d7fdea 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java @@ -25,6 +25,9 @@ import java.util.Map; import org.apache.maven.artifact.Artifact; +/** + * ManagedVersionMap + */ @Deprecated public class ManagedVersionMap extends HashMap diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java index 98ff3d0502..8ee9001c89 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java @@ -34,6 +34,9 @@ import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; +/** + * DefaultMavenProfilesBuilder + */ @Deprecated @Component( role = MavenProfilesBuilder.class ) public class DefaultMavenProfilesBuilder diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java index e3e0cb788b..9890622710 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java @@ -39,6 +39,9 @@ import java.util.Map; import java.util.Properties; import org.apache.maven.model.building.ModelProblemCollectorRequest; +/** + * DefaultProfileManager + */ @Deprecated public class DefaultProfileManager implements ProfileManager diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java b/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java index 98064eff84..5fab100684 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/ProfileManager.java @@ -26,6 +26,9 @@ import java.util.List; import java.util.Map; import java.util.Properties; +/** + * ProfileManager + */ @Deprecated public interface ProfileManager { diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java index 72527b0933..154176eecf 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java @@ -27,6 +27,9 @@ import org.apache.maven.model.Repository; import java.util.List; +/** + * ProfilesConversionUtils + */ @Deprecated public class ProfilesConversionUtils { diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java index 5d6a8bf681..f034245053 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java @@ -21,6 +21,9 @@ package org.apache.maven.profiles.activation; import org.apache.maven.model.Profile; +/** + * DetectedProfileActivator + */ @Deprecated public abstract class DetectedProfileActivator implements ProfileActivator diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java index de4ba2ed69..e7044f54e1 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java @@ -33,6 +33,9 @@ import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; +/** + * FileProfileActivator + */ @Deprecated public class FileProfileActivator extends DetectedProfileActivator diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java index dfae95f6f5..1c835f814b 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java @@ -26,6 +26,9 @@ import org.apache.maven.model.Activation; import org.apache.maven.model.Profile; import org.codehaus.plexus.util.StringUtils; +/** + * JdkPrefixProfileActivator + */ @Deprecated public class JdkPrefixProfileActivator extends DetectedProfileActivator diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/OperatingSystemProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/OperatingSystemProfileActivator.java index 7464a30313..378c3c9481 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/OperatingSystemProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/OperatingSystemProfileActivator.java @@ -24,6 +24,9 @@ import org.apache.maven.model.ActivationOS; import org.apache.maven.model.Profile; import org.codehaus.plexus.util.Os; +/** + * OperatingSystemProfileActivator + */ @Deprecated public class OperatingSystemProfileActivator implements ProfileActivator diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivationException.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivationException.java index 7fc372cb21..59f70bed0e 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivationException.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivationException.java @@ -19,6 +19,9 @@ package org.apache.maven.profiles.activation; * under the License. */ +/** + * ProfileActivationException + */ @Deprecated public class ProfileActivationException extends Exception diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java index 268878594a..6482018560 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java @@ -21,6 +21,9 @@ package org.apache.maven.profiles.activation; import org.apache.maven.model.Profile; +/** + * ProfileActivator + */ @Deprecated public interface ProfileActivator { diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java index a03267dc2d..d7e4003428 100644 --- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java +++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java @@ -28,6 +28,9 @@ import org.codehaus.plexus.context.ContextException; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; import org.codehaus.plexus.util.StringUtils; +/** + * SystemPropertyProfileActivator + */ @Deprecated public class SystemPropertyProfileActivator extends DetectedProfileActivator implements Contextualizable diff --git a/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java b/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java index d08f18e0b9..aca6a0342a 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java +++ b/maven-compat/src/main/java/org/apache/maven/project/DefaultProjectBuilderConfiguration.java @@ -25,6 +25,9 @@ import java.util.Properties; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.profiles.ProfileManager; +/** + * DefaultProjectBuilderConfiguration + */ @Deprecated public class DefaultProjectBuilderConfiguration implements ProjectBuilderConfiguration diff --git a/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java b/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java index cf85aa9e1e..d7241fdc36 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java +++ b/maven-compat/src/main/java/org/apache/maven/project/InvalidProjectModelException.java @@ -23,6 +23,9 @@ import java.io.File; import org.apache.maven.project.validation.ModelValidationResult; +/** + * InvalidProjectModelException + */ @Deprecated public class InvalidProjectModelException extends ProjectBuildingException diff --git a/maven-compat/src/main/java/org/apache/maven/project/MissingRepositoryElementException.java b/maven-compat/src/main/java/org/apache/maven/project/MissingRepositoryElementException.java index 17c267e3a9..75384e1515 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/MissingRepositoryElementException.java +++ b/maven-compat/src/main/java/org/apache/maven/project/MissingRepositoryElementException.java @@ -20,7 +20,9 @@ package org.apache.maven.project; */ import org.apache.maven.artifact.InvalidRepositoryException; - +/** + * Error constructing an artifact repository. + */ public class MissingRepositoryElementException extends InvalidRepositoryException { diff --git a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java index 72ea6d1718..21a4ac745a 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java @@ -37,6 +37,9 @@ import org.eclipse.aether.RepositorySystemSession; // This class needs to stick around because it was exposed the the remote resources plugin started using it instead of // getting the repositories from the project. +/** + * ProjectUtils + */ @Deprecated public final class ProjectUtils { diff --git a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java index 07e9473b83..81ea92d99a 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java +++ b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java @@ -47,6 +47,9 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.Xpp3Dom; +/** + * DefaultModelInheritanceAssembler + */ @Component( role = ModelInheritanceAssembler.class ) public class DefaultModelInheritanceAssembler implements ModelInheritanceAssembler diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java index ecde27f170..f137c6ef2e 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java @@ -41,6 +41,9 @@ import java.util.List; import java.util.Map; import java.util.WeakHashMap; +/** + * StringSearchModelInterpolator + */ @Deprecated @Component( role = ModelInterpolator.class ) public class StringSearchModelInterpolator @@ -111,7 +114,7 @@ public class StringSearchModelInterpolator private final List valueSources; private final List postProcessors; - public InterpolateObjectAction( Object target, List valueSources, + InterpolateObjectAction( Object target, List valueSources, List postProcessors, boolean debugEnabled, StringSearchModelInterpolator modelInterpolator, Logger logger ) { @@ -145,7 +148,7 @@ public class StringSearchModelInterpolator return null; } - @SuppressWarnings( "unchecked" ) + @SuppressWarnings( { "unchecked", "checkstyle:methodlength" } ) private void traverseObjectWithParents( Class cls, Object target ) throws ModelInterpolationException { diff --git a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java index eb3f24d9ea..79e1f410e1 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java @@ -29,6 +29,9 @@ import org.apache.maven.model.Reporting; import org.apache.maven.model.Resource; import org.codehaus.plexus.component.annotations.Component; +/** + * DefaultPathTranslator + */ @Deprecated @Component( role = PathTranslator.class ) public class DefaultPathTranslator diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java index 0095f80382..6406b5844d 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java @@ -60,7 +60,7 @@ public class DefaultModelValidator ModelValidationResult result; - public SimpleModelProblemCollector( ModelValidationResult result ) + SimpleModelProblemCollector( ModelValidationResult result ) { this.result = result; } diff --git a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java index 53e7bd4a68..6fa2c554a7 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java @@ -29,6 +29,9 @@ import org.apache.maven.settings.Mirror; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.util.StringUtils; +/** + * DefaultMirrorSelector + */ @Component( role = MirrorSelector.class ) public class DefaultMirrorSelector implements MirrorSelector diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index 28fb723e06..70b9c3fdc5 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -74,7 +74,7 @@ public class MetadataResolutionResult return originatingArtifact; } - public MetadataResolutionResult ListOriginatingArtifact( final Artifact originatingArtifact ) + public MetadataResolutionResult listOriginatingArtifact( final Artifact originatingArtifact ) { this.originatingArtifact = originatingArtifact; @@ -323,8 +323,9 @@ public class MetadataResolutionResult public String toString() { if ( artifacts == null ) + { return ""; - + } StringBuilder sb = new StringBuilder( 256 ); int i = 1; sb.append( "---------\n" ); diff --git a/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java index 70d3e0a0de..a88b0096e4 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/UserLocalArtifactRepository.java @@ -25,6 +25,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; +/** + * UserLocalArtifactRepository + */ public class UserLocalArtifactRepository extends LocalArtifactRepository { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java index 4839d689b7..cd01ec910f 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java @@ -39,6 +39,9 @@ import java.nio.channels.FileLock; import java.util.Date; import java.util.Properties; +/** + * DefaultUpdateCheckManager + */ @Component( role = UpdateCheckManager.class ) public class DefaultUpdateCheckManager extends AbstractLogEnabled diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java index 8dd6b368c8..d8f590bb6b 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java @@ -59,6 +59,10 @@ import org.eclipse.aether.util.ConfigUtils; //TODO remove the update check manager //TODO separate into retriever and publisher //TODO remove hardcoding of checksum logic + +/** + * Manages Wagon related operations in Maven. + */ @Component( role = WagonManager.class ) public class DefaultWagonManager implements WagonManager @@ -333,6 +337,7 @@ public class DefaultWagonManager return proxyInfo; } + @SuppressWarnings( "checkstyle:methodlength" ) @Override public void getRemoteFile( ArtifactRepository repository, File destination, String remotePath, TransferListener downloadMonitor, String checksumPolicy, boolean force ) diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java index 8d4d40798d..0acab4f94a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java @@ -882,7 +882,7 @@ public class LegacyRepositorySystem private final ArtifactRepositoryLayout fallback; - public UnknownRepositoryLayout( String id, ArtifactRepositoryLayout fallback ) + UnknownRepositoryLayout( String id, ArtifactRepositoryLayout fallback ) { this.id = id; this.fallback = fallback; diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/MavenArtifact.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/MavenArtifact.java index 29b9b82d11..07d2cdb67f 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/MavenArtifact.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/MavenArtifact.java @@ -32,7 +32,7 @@ class MavenArtifact private long transferStartTime; - public MavenArtifact( String repositoryUrl, Resource resource ) + MavenArtifact( String repositoryUrl, Resource resource ) { if ( repositoryUrl == null ) { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java index 017dd9bbc1..c3bc5e9518 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/TransferListenerAdapter.java @@ -30,6 +30,9 @@ import org.apache.maven.wagon.events.TransferListener; import org.apache.maven.wagon.repository.Repository; import org.apache.maven.wagon.resource.Resource; +/** + * TransferListenerAdapter + */ public class TransferListenerAdapter implements TransferListener { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java index f4e969b693..0ef8c6ae4a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/UpdateCheckManager.java @@ -25,6 +25,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; +/** + * UpdateCheckManager + */ public interface UpdateCheckManager { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonConfigurationException.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonConfigurationException.java index 078de00c5e..554212586a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonConfigurationException.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonConfigurationException.java @@ -21,7 +21,9 @@ package org.apache.maven.repository.legacy; import org.apache.maven.wagon.TransferFailedException; - +/** + * WagonConfigurationException + */ public class WagonConfigurationException extends TransferFailedException { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java index 35fcf42179..61568186ee 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/WagonManager.java @@ -32,6 +32,9 @@ import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.events.TransferListener; import org.apache.maven.wagon.repository.Repository; +/** + * WagonManager + */ public interface WagonManager { @Deprecated diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java index c3603a660f..ffc9e9a962 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java @@ -87,6 +87,7 @@ public class DefaultLegacyArtifactCollector } } + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository, List remoteRepositories, @@ -102,6 +103,7 @@ public class DefaultLegacyArtifactCollector conflictResolvers ); } + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactResolutionRequest repositoryRequest, @@ -239,6 +241,7 @@ public class DefaultLegacyArtifactCollector return versionMap; } + @SuppressWarnings( { "checkstyle:parameternumber", "checkstyle:methodlength" } ) private void recurse( ArtifactResolutionResult result, ResolutionNode node, Map> resolvedArtifacts, ManagedVersionMap managedVersions, ArtifactResolutionRequest request, ArtifactMetadataSource source, ArtifactFilter filter, @@ -791,6 +794,7 @@ public class DefaultLegacyArtifactCollector } } + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, Map managedVersions, ArtifactRepository localRepository, List remoteRepositories, diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java index 4045258a6d..90b869f298 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/LegacyArtifactCollector.java @@ -39,6 +39,7 @@ import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver; * @author Brett Porter */ @Deprecated +@SuppressWarnings( "checkstyle:parameternumber" ) public interface LegacyArtifactCollector { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java index 95f15f98ee..ed3ee9a62b 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/ArtifactTransformationManager.java @@ -29,7 +29,9 @@ import org.apache.maven.artifact.repository.RepositoryRequest; import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; -/** Manages multiple ArtifactTransformation instances and applies them in succession. */ +/** + * Manages multiple ArtifactTransformation instances and applies them in succession. + */ public interface ArtifactTransformationManager { String ROLE = ArtifactTransformationManager.class.getName(); diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/LatestArtifactTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/LatestArtifactTransformation.java index 7b0e85130a..0bc89c19f0 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/LatestArtifactTransformation.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/LatestArtifactTransformation.java @@ -28,6 +28,9 @@ import org.apache.maven.artifact.resolver.ArtifactNotFoundException; import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.codehaus.plexus.component.annotations.Component; +/** + * Describes a version transformation during artifact resolution - "latest" type + */ @Component( role = ArtifactTransformation.class, hint = "latest" ) public class LatestArtifactTransformation extends AbstractVersionTransformation diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java index 2666eafb62..13b00c3a6d 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/ArtifactMetadata.java @@ -94,36 +94,34 @@ public class ArtifactMetadata } } - // ------------------------------------------------------------------ public ArtifactMetadata( String groupId, String name, String version ) { this( groupId, name, version, null ); } - //------------------------------------------------------------------ + public ArtifactMetadata( String groupId, String name, String version, String type ) { this( groupId, name, version, type, null ); } - //------------------------------------------------------------------ public ArtifactMetadata( String groupId, String name, String version, String type, ArtifactScopeEnum artifactScope ) { this( groupId, name, version, type, artifactScope, null ); } - //------------------------------------------------------------------ public ArtifactMetadata( String groupId, String name, String version, String type, ArtifactScopeEnum artifactScope, String classifier ) { this( groupId, name, version, type, artifactScope, classifier, null ); } - //------------------------------------------------------------------ + public ArtifactMetadata( String groupId, String name, String version, String type, ArtifactScopeEnum artifactScope, String classifier, String artifactUri ) { this( groupId, name, version, type, artifactScope, classifier, artifactUri, null, true, null ); } - //------------------------------------------------------------------ + + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactMetadata( String groupId, String name, String version, String type, ArtifactScopeEnum artifactScope, String classifier, String artifactUri, String why, boolean resolved, String error ) { @@ -138,7 +136,8 @@ public class ArtifactMetadata this.resolved = resolved; this.error = error; } - //------------------------------------------------------------------ + + @SuppressWarnings( "checkstyle:parameternumber" ) public ArtifactMetadata( String groupId, String name, String version, String type, String scopeString, String classifier, String artifactUri, String why, boolean resolved, String error ) { @@ -147,7 +146,6 @@ public class ArtifactMetadata classifier, artifactUri, why, resolved, error ); } - //------------------------------------------------------------------ public ArtifactMetadata( Artifact af ) { /* @@ -171,20 +169,17 @@ public class ArtifactMetadata // this.resolved = af.isResolved(); // } - //------------------------------------------------------------------ @Override public String toString() { return groupId + ":" + artifactId + ":" + version; } - //------------------------------------------------------------------ public String toDomainString() { return groupId + ":" + artifactId; } - //------------------------------------------------------------------ public String getGroupId() { return groupId; @@ -327,7 +322,6 @@ public class ArtifactMetadata this.why = why; } - //------------------------------------------------------------------- public String getError() { return error; @@ -343,11 +337,8 @@ public class ArtifactMetadata return error == null; } - //------------------------------------------------------------------ public String getDependencyConflictId() { return groupId + ":" + artifactId; } - //------------------------------------------------------------------ - //------------------------------------------------------------------ } diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java index 5a4c1068c7..16fe9bc07f 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphEdge.java @@ -81,6 +81,7 @@ public class MetadataGraphEdge * used to eliminate exact duplicates in the edge list */ @Override + @SuppressWarnings( "checkstyle:equalshashcode" ) public boolean equals( Object o ) { if ( o instanceof MetadataGraphEdge ) diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionException.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionException.java index 24f832efde..149d2ac69b 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionException.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionException.java @@ -19,6 +19,9 @@ package org.apache.maven.repository.metadata; * under the License. */ +/** + * MetadataResolutionException + */ public class MetadataResolutionException extends Exception { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequestTypeEnum.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequestTypeEnum.java index f305497a10..31e3e9123a 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequestTypeEnum.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionRequestTypeEnum.java @@ -19,6 +19,9 @@ package org.apache.maven.repository.metadata; * under the License. */ +/** + * MetadataResolutionRequestTypeEnum + */ public enum MetadataResolutionRequestTypeEnum { tree( 1 ) diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumentationException.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumentationException.java index 050d135cae..d001562fa2 100644 --- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumentationException.java +++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumentationException.java @@ -19,6 +19,9 @@ package org.apache.maven.usability.plugin; * under the License. */ +/** + * ExpressionDocumentationException + */ public class ExpressionDocumentationException extends Exception { diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java index b5e606d4bd..f4e7bf928e 100644 --- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java +++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java @@ -35,6 +35,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * ExpressionDocumenter + */ public class ExpressionDocumenter { diff --git a/maven-core/pom.xml b/maven-core/pom.xml index 7c2cde15e0..751fd535e9 100644 --- a/maven-core/pom.xml +++ b/maven-core/pom.xml @@ -33,10 +33,6 @@ under the License. Maven Core Maven Core classes. - - RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,JavadocType,MethodName,MagicNumber,ConstantName,VisibilityModifier,InnerAssignment - - diff --git a/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java b/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java index 2cf9f9963d..e15037e402 100644 --- a/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java +++ b/maven-core/src/main/java/org/apache/maven/ArtifactFilterManager.java @@ -23,6 +23,9 @@ import java.util.Set; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; +/** + * ArtifactFilterManager + */ public interface ArtifactFilterManager { /** diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java index be7c97a8cc..dca80140be 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java @@ -42,6 +42,11 @@ import org.apache.maven.repository.RepositorySystem; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; +/** + * @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 @Component( role = ProjectDependenciesResolver.class ) public class DefaultProjectDependenciesResolver diff --git a/maven-core/src/main/java/org/apache/maven/Maven.java b/maven-core/src/main/java/org/apache/maven/Maven.java index 69f9fcaed5..665da6cbac 100644 --- a/maven-core/src/main/java/org/apache/maven/Maven.java +++ b/maven-core/src/main/java/org/apache/maven/Maven.java @@ -31,6 +31,7 @@ import org.apache.maven.execution.MavenExecutionResult; public interface Maven { @Deprecated + @SuppressWarnings( "checkstyle:constantname" ) String POMv4 = "pom.xml"; MavenExecutionResult execute( MavenExecutionRequest request ); diff --git a/maven-core/src/main/java/org/apache/maven/MissingModuleException.java b/maven-core/src/main/java/org/apache/maven/MissingModuleException.java index c920a6eac2..1bdf87acaa 100644 --- a/maven-core/src/main/java/org/apache/maven/MissingModuleException.java +++ b/maven-core/src/main/java/org/apache/maven/MissingModuleException.java @@ -21,6 +21,9 @@ package org.apache.maven; import java.io.File; +/** + * MissingModuleException + */ public class MissingModuleException extends MavenExecutionException { diff --git a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java index 01e6227803..f7a5244392 100644 --- a/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/ProjectDependenciesResolver.java @@ -28,13 +28,13 @@ import org.apache.maven.artifact.resolver.ArtifactResolutionException; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; -@Deprecated /** * @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. * @author jvanzyl * */ +@Deprecated public interface ProjectDependenciesResolver { diff --git a/maven-core/src/main/java/org/apache/maven/artifact/factory/ArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/artifact/factory/ArtifactFactory.java index a16f64f682..28f281eb7d 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/factory/ArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/factory/ArtifactFactory.java @@ -22,7 +22,11 @@ package org.apache.maven.artifact.factory; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.versioning.VersionRange; +/** + * ArtifactFactory - deprecated + */ @Deprecated +@SuppressWarnings( "checkstyle:parameternumber" ) public interface ArtifactFactory { @Deprecated diff --git a/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java index dfcac01949..3ee65de8a5 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java @@ -27,7 +27,12 @@ import org.apache.maven.artifact.versioning.VersionRange; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; +/** + * DefaultArtifactFactory + * + */ @Component( role = ArtifactFactory.class ) +@SuppressWarnings( "checkstyle:parameternumber" ) public class DefaultArtifactFactory implements ArtifactFactory { diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java index 5ef3a980d8..f0de677c6a 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java @@ -21,6 +21,9 @@ package org.apache.maven.artifact.metadata; import org.apache.maven.artifact.Artifact; +/** + * AbstractArtifactMetadata + */ @Deprecated public abstract class AbstractArtifactMetadata extends org.apache.maven.repository.legacy.metadata.AbstractArtifactMetadata diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java index e419ef9e72..bef02685ba 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java @@ -21,6 +21,9 @@ package org.apache.maven.artifact.metadata; import org.apache.maven.artifact.Artifact; +/** + * Error while retrieving repository metadata from the repository - deprecated + */ @Deprecated public class ArtifactMetadataRetrievalException extends org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java index ccd58363e1..605230f05d 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java @@ -26,6 +26,10 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.repository.legacy.metadata.MetadataResolutionRequest; +/** + * Provides some metadata operations, like querying the remote repository for a list of versions available for an + * artifact - deprecated + */ @Deprecated public interface ArtifactMetadataSource extends org.apache.maven.repository.legacy.metadata.ArtifactMetadataSource diff --git a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java index c219b24ef1..3503265367 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java @@ -26,6 +26,9 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; +/** + * ResolutionGroup + */ @Deprecated public class ResolutionGroup extends org.apache.maven.repository.legacy.metadata.ResolutionGroup diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java index 9765c73365..d4c64f0bf7 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java @@ -28,6 +28,10 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.repository.Proxy; +/** + * Abstraction of an artifact repository. Artifact repositories can be remote, local, or even build reactor or + * IDE workspace. + */ //TODO completely separate local and remote artifact repositories public class MavenArtifactRepository implements ArtifactRepository diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java index 35626e5872..0caeeb563d 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataManager.java @@ -25,6 +25,9 @@ import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.RepositoryRequest; +/** + * RepositoryMetadataManager + */ public interface RepositoryMetadataManager { diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java index cd824c4faf..a156871de0 100644 --- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java +++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java @@ -32,6 +32,9 @@ import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; +/** + * ResolutionNode + */ public class ResolutionNode { private Artifact artifact; diff --git a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java index 93317105eb..84ad93c923 100644 --- a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java +++ b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java @@ -76,13 +76,13 @@ public class MavenRepositorySystem // DefaultProjectBuilder public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type ) { - return XcreateArtifact( groupId, artifactId, version, scope, type ); + return createArtifactX( groupId, artifactId, version, scope, type ); } // DefaultProjectBuilder public Artifact createProjectArtifact( String groupId, String artifactId, String metaVersionId ) { - return XcreateProjectArtifact( groupId, artifactId, metaVersionId ); + return createProjectArtifactX( groupId, artifactId, metaVersionId ); } // DefaultProjectBuilder @@ -104,7 +104,7 @@ public class MavenRepositorySystem } Artifact artifact = - XcreateDependencyArtifact( d.getGroupId(), d.getArtifactId(), versionRange, d.getType(), + createDependencyArtifactX( d.getGroupId(), d.getArtifactId(), versionRange, d.getType(), d.getClassifier(), d.getScope(), d.isOptional() ); if ( Artifact.SCOPE_SYSTEM.equals( d.getScope() ) && d.getSystemPath() != null ) @@ -140,13 +140,13 @@ public class MavenRepositorySystem return null; } - return XcreateExtensionArtifact( groupId, artifactId, versionRange ); + return createExtensionArtifactX( groupId, artifactId, versionRange ); } // DefaultProjectBuilder public Artifact createParentArtifact( String groupId, String artifactId, String version ) { - return XcreateParentArtifact( groupId, artifactId, version ); + return createParentArtifactX( groupId, artifactId, version ); } // DefaultProjectBuilder @@ -167,7 +167,7 @@ public class MavenRepositorySystem return null; } - return XcreatePluginArtifact( plugin.getGroupId(), plugin.getArtifactId(), versionRange ); + return createPluginArtifactX( plugin.getGroupId(), plugin.getArtifactId(), versionRange ); } public void injectMirror( List repositories, List mirrors ) @@ -471,43 +471,43 @@ public class MavenRepositorySystem } // ArtifactFactory - private Artifact XcreateArtifact( String groupId, String artifactId, String version, String scope, String type ) + private Artifact createArtifactX( String groupId, String artifactId, String version, String scope, String type ) { - return XcreateArtifact( groupId, artifactId, version, scope, type, null, null ); + return createArtifactX( groupId, artifactId, version, scope, type, null, null ); } - private Artifact XcreateDependencyArtifact( String groupId, String artifactId, VersionRange versionRange, - String type, String classifier, String scope, boolean optional ) + private Artifact createDependencyArtifactX( String groupId, String artifactId, VersionRange versionRange, + String type, String classifier, String scope, boolean optional ) { - return XcreateArtifact( groupId, artifactId, versionRange, type, classifier, scope, null, optional ); + return createArtifactX( groupId, artifactId, versionRange, type, classifier, scope, null, optional ); } - private Artifact XcreateProjectArtifact( String groupId, String artifactId, String version ) + private Artifact createProjectArtifactX( String groupId, String artifactId, String version ) { - return XcreateProjectArtifact( groupId, artifactId, version, null ); + return createProjectArtifactX( groupId, artifactId, version, null ); } - private Artifact XcreateParentArtifact( String groupId, String artifactId, String version ) + private Artifact createParentArtifactX( String groupId, String artifactId, String version ) { - return XcreateProjectArtifact( groupId, artifactId, version ); + return createProjectArtifactX( groupId, artifactId, version ); } - private Artifact XcreatePluginArtifact( String groupId, String artifactId, VersionRange versionRange ) + private Artifact createPluginArtifactX( String groupId, String artifactId, VersionRange versionRange ) { - return XcreateArtifact( groupId, artifactId, versionRange, "maven-plugin", null, Artifact.SCOPE_RUNTIME, null ); + return createArtifactX( groupId, artifactId, versionRange, "maven-plugin", null, Artifact.SCOPE_RUNTIME, null ); } - private Artifact XcreateProjectArtifact( String groupId, String artifactId, String version, String scope ) + private Artifact createProjectArtifactX( String groupId, String artifactId, String version, String scope ) { - return XcreateArtifact( groupId, artifactId, version, scope, "pom" ); + return createArtifactX( groupId, artifactId, version, scope, "pom" ); } - private Artifact XcreateExtensionArtifact( String groupId, String artifactId, VersionRange versionRange ) + private Artifact createExtensionArtifactX( String groupId, String artifactId, VersionRange versionRange ) { - return XcreateArtifact( groupId, artifactId, versionRange, "jar", null, Artifact.SCOPE_RUNTIME, null ); + return createArtifactX( groupId, artifactId, versionRange, "jar", null, Artifact.SCOPE_RUNTIME, null ); } - private Artifact XcreateArtifact( String groupId, String artifactId, String version, String scope, String type, + private Artifact createArtifactX( String groupId, String artifactId, String version, String scope, String type, String classifier, String inheritedScope ) { VersionRange versionRange = null; @@ -515,16 +515,17 @@ public class MavenRepositorySystem { versionRange = VersionRange.createFromVersion( version ); } - return XcreateArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope ); + return createArtifactX( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope ); } - private Artifact XcreateArtifact( String groupId, String artifactId, VersionRange versionRange, String type, + private Artifact createArtifactX( String groupId, String artifactId, VersionRange versionRange, String type, String classifier, String scope, String inheritedScope ) { - return XcreateArtifact( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope, false ); + return createArtifactX( groupId, artifactId, versionRange, type, classifier, scope, inheritedScope, false ); } - private Artifact XcreateArtifact( String groupId, String artifactId, VersionRange versionRange, String type, + @SuppressWarnings( "checkstyle:parameternumber" ) + private Artifact createArtifactX( String groupId, String artifactId, VersionRange versionRange, String type, String classifier, String scope, String inheritedScope, boolean optional ) { String desiredScope = Artifact.SCOPE_RUNTIME; diff --git a/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java b/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java index 353d4f6623..3a513052c5 100644 --- a/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java +++ b/maven-core/src/main/java/org/apache/maven/eventspy/EventSpy.java @@ -31,7 +31,9 @@ import java.util.Map; */ public interface EventSpy { - + /** + * Context + */ interface Context { diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java index 5b802ed131..2a86667f16 100644 --- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java +++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java @@ -83,6 +83,9 @@ Plugins: // PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, // CycleDetectedInPluginGraphException; +/** + * Transform an exception into useful end-user message. + */ @Component( role = ExceptionHandler.class ) public class DefaultExceptionHandler implements ExceptionHandler diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java index ba5630ef36..ec9419c98d 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java @@ -49,6 +49,9 @@ import org.apache.maven.toolchain.model.PersistedToolchains; import org.apache.maven.toolchain.model.ToolchainModel; import org.codehaus.plexus.util.StringUtils; +/** + * Assists in populating an execution request for invocation of Maven. + */ @Named public class DefaultMavenExecutionRequestPopulator implements MavenExecutionRequestPopulator diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java index d69bbba35b..5b56df36d0 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java @@ -322,6 +322,7 @@ public class MavenSession } @Deprecated + @SuppressWarnings( "checkstyle:parameternumber" ) public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository, EventDispatcher eventDispatcher, ReactorManager unused, List goals, String executionRootDir, Properties executionProperties, Date startTime ) @@ -331,6 +332,7 @@ public class MavenSession } @Deprecated + @SuppressWarnings( "checkstyle:parameternumber" ) public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository, EventDispatcher eventDispatcher, ReactorManager unused, List goals, String executionRootDir, Properties executionProperties, Properties userProperties, diff --git a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java index 12808375d4..6fa5619af1 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java +++ b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java @@ -31,6 +31,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * ReactorManager - unused + */ @Deprecated public class ReactorManager { diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java index e5b6c16759..168a87f1ee 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java @@ -36,6 +36,9 @@ import com.google.inject.Provider; import com.google.inject.Scope; import com.google.inject.util.Providers; +/** + * MojoExecutionScope + */ public class MojoExecutionScope implements Scope, MojoExecutionListener { @@ -49,9 +52,9 @@ public class MojoExecutionScope private static final class ScopeState { - public final Map, Provider> seeded = Maps.newHashMap(); + private final Map, Provider> seeded = Maps.newHashMap(); - public final Map, Object> provided = Maps.newHashMap(); + private final Map, Object> provided = Maps.newHashMap(); } private final ThreadLocal> values = new ThreadLocal<>(); diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java index 8208c3c300..79a18bd311 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeCoreModule.java @@ -24,6 +24,9 @@ import javax.inject.Named; import org.apache.maven.execution.MojoExecutionListener; +/** + * MojoExecutionScopeCoreModule + */ @Named public class MojoExecutionScopeCoreModule extends MojoExecutionScopeModule diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeModule.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeModule.java index 229a3c5604..b62b59056d 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeModule.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScopeModule.java @@ -27,6 +27,9 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti import com.google.inject.AbstractModule; +/** + * MojoExecutionScopeModule + */ public class MojoExecutionScopeModule extends AbstractModule { diff --git a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java index e7e4534c7a..3e6f9f7b67 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java +++ b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExportsProvider.java @@ -26,6 +26,9 @@ import javax.inject.Singleton; import org.codehaus.plexus.PlexusContainer; import org.eclipse.sisu.Nullable; +/** + * CoreExportsProvider + */ @Named @Singleton public class CoreExportsProvider diff --git a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java index ce740a9679..ffac1d39b1 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java +++ b/maven-core/src/main/java/org/apache/maven/extension/internal/CoreExtensionEntry.java @@ -78,7 +78,7 @@ public class CoreExtensionEntry return packages; } - private static final ExtensionDescriptorBuilder builder = new ExtensionDescriptorBuilder(); + private static final ExtensionDescriptorBuilder BUILDER = new ExtensionDescriptorBuilder(); public static CoreExtensionEntry discoverFrom( ClassRealm loader ) { @@ -87,13 +87,13 @@ public class CoreExtensionEntry try { - Enumeration urls = loader.getResources( builder.getExtensionDescriptorLocation() ); + Enumeration urls = loader.getResources( BUILDER.getExtensionDescriptorLocation() ); while ( urls.hasMoreElements() ) { try ( InputStream is = urls.nextElement().openStream() ) { - ExtensionDescriptor descriptor = builder.build( is ); + ExtensionDescriptor descriptor = BUILDER.build( is ); artifacts.addAll( descriptor.getExportedArtifacts() ); packages.addAll( descriptor.getExportedPackages() ); } @@ -116,7 +116,7 @@ public class CoreExtensionEntry { for ( File entry : classpath ) { - ExtensionDescriptor descriptor = builder.build( entry ); + ExtensionDescriptor descriptor = BUILDER.build( entry ); if ( descriptor != null ) { artifacts.addAll( descriptor.getExportedArtifacts() ); diff --git a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java index 2cbea8457b..701e7c5aea 100644 --- a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java @@ -55,6 +55,9 @@ import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.dag.CycleDetectedException; +/** + * Builds the {@link ProjectDependencyGraph inter-dependencies graph} between projects in the reactor. + */ @Component( role = GraphBuilder.class, hint = GraphBuilder.HINT ) public class DefaultGraphBuilder implements GraphBuilder diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java index e7b1a7f91a..aecf264111 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/MavenExecutionPlan.java @@ -42,6 +42,9 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor; // from the plugin archive. //TODO this will be the class that people get in IDEs to modify +/** + * MavenExecutionPlan + */ public class MavenExecutionPlan implements Iterable { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java index c2bf919445..1ddee05923 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java @@ -42,6 +42,11 @@ import org.apache.maven.project.MavenProject; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; +/** + * Lifecycle mapping delegate component interface. Calculates project build execution plan given {@link Lifecycle} and + * lifecycle phase. Standard lifecycles use plugin execution {@code } or mojo default lifecycle phase to + * calculate the execution plan, but custom lifecycles can use alternative mapping strategies. + */ @Component( role = LifecycleMappingDelegate.class, hint = DefaultLifecycleMappingDelegate.HINT ) public class DefaultLifecycleMappingDelegate implements LifecycleMappingDelegate diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java index 762fc72b29..a64da0490e 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultProjectArtifactFactory.java @@ -30,6 +30,9 @@ import org.apache.maven.project.MavenProject; import org.apache.maven.project.artifact.InvalidDependencyVersionException; import org.apache.maven.project.artifact.MavenMetadataSource; +/** + * Default component responsible for creation of MavenProject#dependencyArtifacts instances. + */ @SuppressWarnings( "deprecation" ) @Named public class DefaultProjectArtifactFactory diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java index dfc65a83b1..e755aa904c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java @@ -138,7 +138,7 @@ public class LifecycleDependencyResolver if ( recordArtifacts != null ) { - resolvedArtifacts = recordArtifacts.artifacts; + resolvedArtifacts = recordArtifacts.getArtifacts(); } else { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderNotFoundException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderNotFoundException.java index 52c668f1b9..250d65de02 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderNotFoundException.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderNotFoundException.java @@ -19,6 +19,9 @@ package org.apache.maven.lifecycle.internal.builder; * under the License. */ +/** + * BuilderNotFoundException + */ public class BuilderNotFoundException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java index 587a84751a..173289623c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java @@ -71,7 +71,7 @@ public class ThreadOutputMuxer class ConsolePrinter implements Runnable { - public volatile boolean running; + private volatile boolean running; private final ProjectBuildList projectBuildList; diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java index 464944f14d..f205b0315c 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/singlethreaded/SingleThreadedBuilder.java @@ -32,6 +32,11 @@ import org.apache.maven.lifecycle.internal.builder.Builder; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; +/** + *

+ * A {@link Builder} encapsulates a strategy for building a set of Maven projects. The default strategy in Maven builds + * the the projects serially, but a {@link Builder} can employ any type of concurrency model to build the projects. + */ @Component( role = Builder.class, hint = "singlethreaded" ) public class SingleThreadedBuilder implements Builder diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java index e6845a36e3..e12debef5f 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java @@ -23,6 +23,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** + * DefaultLifecycleMapping + */ public class DefaultLifecycleMapping implements LifecycleMapping { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMapping.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMapping.java index e656cc9fdc..55d5544d45 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMapping.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMapping.java @@ -22,6 +22,9 @@ package org.apache.maven.lifecycle.mapping; import java.util.List; import java.util.Map; +/** + * LifecycleMapping + */ public interface LifecycleMapping { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java index f2af879516..cd9a5b149a 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecycleMojo.java @@ -24,6 +24,9 @@ import java.util.List; import org.apache.maven.model.Dependency; import org.codehaus.plexus.util.xml.Xpp3Dom; +/** + * LifecycleMojo + */ public class LifecycleMojo { diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java index 295e6421d4..bf052c741b 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java @@ -27,6 +27,9 @@ import java.util.Map; import org.codehaus.plexus.util.StringUtils; +/** + * LifecyclePhase + */ public class LifecyclePhase { diff --git a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java index 1401e30a1e..90cf8da7e5 100644 --- a/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java +++ b/maven-core/src/main/java/org/apache/maven/model/plugin/DefaultLifecycleBindingsInjector.java @@ -79,6 +79,9 @@ public class DefaultLifecycleBindingsInjector } } + /** + * The domain-specific model merger for the Maven POM + */ protected static class LifecycleBindingsMerger extends MavenModelMerger { @@ -98,6 +101,7 @@ public class DefaultLifecycleBindingsInjector mergePluginContainer_Plugins( target.getBuild(), source.getBuild(), false, context ); } + @SuppressWarnings( { "checkstyle:methodname" } ) @Override protected void mergePluginContainer_Plugins( PluginContainer target, PluginContainer source, boolean sourceDominant, Map context ) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java index b4f7a4df23..1a007424e7 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java @@ -40,6 +40,9 @@ import org.eclipse.aether.repository.RemoteRepository; // TODO the antrun plugin has its own configurator, the only plugin that does. might need to think about how that works // TODO remove the coreArtifactFilterManager +/** + * DefaultBuildPluginManager + */ @Component( role = BuildPluginManager.class ) public class DefaultBuildPluginManager implements BuildPluginManager diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java index abb4782751..4391f87494 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java @@ -41,7 +41,9 @@ import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; public class DefaultExtensionRealmCache implements ExtensionRealmCache, Disposable { - + /** + * CacheKey + */ protected static class CacheKey implements Key { @@ -142,7 +144,7 @@ public class DefaultExtensionRealmCache { for ( CacheRecord record : cache.values() ) { - ClassRealm realm = record.realm; + ClassRealm realm = record.getRealm(); try { realm.getWorld().disposeRealm( realm.getId() ); diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java index b49e25e701..c625f37a69 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginArtifactsCache.java @@ -46,7 +46,9 @@ import org.eclipse.aether.repository.WorkspaceRepository; public class DefaultPluginArtifactsCache implements PluginArtifactsCache { - + /** + * CacheKey + */ protected static class CacheKey implements Key { @@ -139,9 +141,9 @@ public class DefaultPluginArtifactsCache { CacheRecord cacheRecord = cache.get( key ); - if ( cacheRecord != null && cacheRecord.exception != null ) + if ( cacheRecord != null && cacheRecord.getException() != null ) { - throw cacheRecord.exception; + throw cacheRecord.getException(); } return cacheRecord; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java index 1c09d9b4e5..b82a2b5447 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginRealmCache.java @@ -48,7 +48,9 @@ import org.eclipse.aether.repository.WorkspaceRepository; public class DefaultPluginRealmCache implements PluginRealmCache, Disposable { - + /** + * CacheKey + */ protected static class CacheKey implements Key { @@ -176,7 +178,7 @@ public class DefaultPluginRealmCache { for ( CacheRecord record : cache.values() ) { - ClassRealm realm = record.realm; + ClassRealm realm = record.getRealm(); try { realm.getWorld().disposeRealm( realm.getId() ); diff --git a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java index ffae815913..4d01aca4f5 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/ExtensionRealmCache.java @@ -44,14 +44,17 @@ public interface ExtensionRealmCache // marker interface for cache keys } + /** + * CacheRecord + */ class CacheRecord { - public final ClassRealm realm; + private final ClassRealm realm; - public final ExtensionDescriptor descriptor; + private final ExtensionDescriptor descriptor; - public final List artifacts; + private final List artifacts; CacheRecord( ClassRealm realm, ExtensionDescriptor descriptor, List artifacts ) { @@ -60,6 +63,20 @@ public interface ExtensionRealmCache this.artifacts = artifacts; } + public ClassRealm getRealm() + { + return realm; + } + + public ExtensionDescriptor getDescriptor() + { + return descriptor; + } + + public List getArtifacts() + { + return artifacts; + } } Key createKey( List extensionArtifacts ); diff --git a/maven-core/src/main/java/org/apache/maven/plugin/InvalidPluginDescriptorException.java b/maven-core/src/main/java/org/apache/maven/plugin/InvalidPluginDescriptorException.java index 223ccd811f..3a2e476965 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/InvalidPluginDescriptorException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/InvalidPluginDescriptorException.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin; import java.util.List; +/** + * InvalidPluginDescriptorException + */ public class InvalidPluginDescriptorException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java index 14cc7e13f3..ec4c5115d7 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java @@ -25,6 +25,9 @@ import java.util.List; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.descriptor.PluginDescriptor; +/** + * MavenPluginValidator + */ public class MavenPluginValidator { private final Artifact pluginArtifact; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java index 71ece87ed0..fa72c1866e 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java @@ -27,6 +27,9 @@ import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.codehaus.plexus.util.xml.Xpp3Dom; +/** + * MojoExecution + */ public class MojoExecution { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java index e24b73394d..11f5d701fc 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginArtifactsCache.java @@ -47,14 +47,27 @@ public interface PluginArtifactsCache // marker interface for cache keys } + /** + * CacheRecord + */ class CacheRecord { - public final List artifacts; + private final List artifacts; - public final PluginResolutionException exception; + public List getArtifacts() + { + return artifacts; + } - CacheRecord( List artifacts ) + public PluginResolutionException getException() + { + return exception; + } + + private final PluginResolutionException exception; + + public CacheRecord( List artifacts ) { this.artifacts = artifacts; this.exception = null; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java index 602d2cb417..a99fbbc196 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java @@ -23,6 +23,9 @@ import org.apache.maven.project.DuplicateArtifactAttachmentException; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.StringUtils; +/** + * Exception in the plugin manager. + */ public class PluginExecutionException extends PluginManagerException { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java index 5f431e0aec..eaf02ecc7b 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java @@ -29,6 +29,9 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.codehaus.plexus.util.StringUtils; +/** + * PluginParameterException + */ public class PluginParameterException extends PluginConfigurationException { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java index e701ec1d7a..9d3b290788 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java @@ -144,6 +144,7 @@ public class PluginParameterExpressionEvaluator } @Override + @SuppressWarnings( "checkstyle:methodlength" ) public Object evaluate( String expr, Class type ) throws ExpressionEvaluationException { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java index b2c31724c2..78c3ae6f3c 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginRealmCache.java @@ -40,14 +40,26 @@ import org.eclipse.aether.repository.RemoteRepository; */ public interface PluginRealmCache { - + /** + * CacheRecord + */ class CacheRecord { - public final ClassRealm realm; + public ClassRealm getRealm() + { + return realm; + } - public final List artifacts; + public List getArtifacts() + { + return artifacts; + } - CacheRecord( ClassRealm realm, List artifacts ) + private final ClassRealm realm; + + private final List artifacts; + + public CacheRecord( ClassRealm realm, List artifacts ) { this.realm = realm; this.artifacts = artifacts; diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java index 612684ba48..34b3b17bf6 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java @@ -339,8 +339,8 @@ public class DefaultMavenPluginManager throw new IllegalStateException( e ); } - ClassRealm pluginRealm = extensionRecord.realm; - List pluginArtifacts = extensionRecord.artifacts; + ClassRealm pluginRealm = extensionRecord.getRealm(); + List pluginArtifacts = extensionRecord.getArtifacts(); for ( ComponentDescriptor componentDescriptor : pluginDescriptor.getComponents() ) { @@ -362,11 +362,11 @@ public class DefaultMavenPluginManager if ( cacheRecord != null ) { - pluginDescriptor.setClassRealm( cacheRecord.realm ); - pluginDescriptor.setArtifacts( new ArrayList<>( cacheRecord.artifacts ) ); + pluginDescriptor.setClassRealm( cacheRecord.getRealm() ); + pluginDescriptor.setArtifacts( new ArrayList<>( cacheRecord.getArtifacts() ) ); for ( ComponentDescriptor componentDescriptor : pluginDescriptor.getComponents() ) { - componentDescriptor.setRealm( cacheRecord.realm ); + componentDescriptor.setRealm( cacheRecord.getRealm() ); } } else @@ -832,7 +832,7 @@ public class DefaultMavenPluginManager } if ( recordArtifacts != null ) { - artifacts = recordArtifacts.artifacts; + artifacts = recordArtifacts.getArtifacts(); } else { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java index 3287021797..6612913522 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/prefix/NoPluginFoundForPrefixException.java @@ -24,6 +24,9 @@ import java.util.List; import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.RemoteRepository; +/** + * NoPluginFoundForPrefixException + */ public class NoPluginFoundForPrefixException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionNotFoundException.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionNotFoundException.java index b5539be0c5..13b1fb9f69 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionNotFoundException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionNotFoundException.java @@ -19,6 +19,9 @@ package org.apache.maven.plugin.version; * under the License. */ +/** + * PluginVersionNotFoundException + */ public class PluginVersionNotFoundException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java index 84ec0967af..dd14b307b9 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionResolutionException.java @@ -24,6 +24,9 @@ import java.util.List; import org.eclipse.aether.repository.LocalRepository; import org.eclipse.aether.repository.RemoteRepository; +/** + * PluginVersionResolutionException + */ public class PluginVersionResolutionException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java index 2cce9f6ac5..19722423e4 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java @@ -31,6 +31,9 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.logging.AbstractLogEnabled; +/** + * DefaultMavenProjectHelper + */ @SuppressWarnings( "deprecation" ) @Component( role = MavenProjectHelper.class ) public class DefaultMavenProjectHelper diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java index 7fd2ecab1c..91a875bcd6 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultModelBuildingListener.java @@ -99,8 +99,8 @@ public class DefaultModelBuildingListener ProjectRealmCache.CacheRecord record = projectBuildingHelper.createProjectRealm( project, model, projectBuildingRequest ); - project.setClassRealm( record.realm ); - project.setExtensionDependencyFilter( record.extensionArtifactFilter ); + project.setClassRealm( record.getRealm() ); + project.setExtensionDependencyFilter( record.getExtensionArtifactFilter() ); } catch ( PluginResolutionException | PluginManagerException | PluginVersionResolutionException e ) { diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java index ac38f5dbf1..279399add8 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java @@ -74,6 +74,7 @@ import org.eclipse.aether.resolution.ArtifactRequest; import org.eclipse.aether.resolution.ArtifactResult; /** + * DefaultProjectBuilder */ @Component( role = ProjectBuilder.class ) public class DefaultProjectBuilder @@ -385,6 +386,7 @@ public class DefaultProjectBuilder return results; } + @SuppressWarnings( "checkstyle:parameternumber" ) private boolean build( List results, List interimResults, Map projectIndex, List pomFiles, Set aggregatorFiles, boolean isRoot, boolean recursive, InternalConfig config ) @@ -406,6 +408,7 @@ public class DefaultProjectBuilder return noErrors; } + @SuppressWarnings( "checkstyle:parameternumber" ) private boolean build( List results, List interimResults, Map projectIndex, File pomFile, Set aggregatorFiles, boolean isRoot, boolean recursive, InternalConfig config ) @@ -606,6 +609,7 @@ public class DefaultProjectBuilder return noErrors; } + @SuppressWarnings( "checkstyle:methodlength" ) private void initProject( MavenProject project, Map projects, ModelBuildingResult result, Map profilesXmls, ProjectBuildingRequest projectBuildingRequest ) { @@ -791,10 +795,9 @@ public class DefaultProjectBuilder Map map = null; if ( repositorySystem != null ) { - List deps; DependencyManagement dependencyManagement = project.getDependencyManagement(); - if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null ) - && ( deps.size() > 0 ) ) + if ( ( dependencyManagement != null ) && ( ( dependencyManagement.getDependencies() ) != null ) + && ( dependencyManagement.getDependencies().size() > 0 ) ) { map = new HashMap<>(); for ( Dependency d : dependencyManagement.getDependencies() ) @@ -924,18 +927,21 @@ public class DefaultProjectBuilder return null; } + /** + * InternalConfig + */ class InternalConfig { - public final ProjectBuildingRequest request; + private final ProjectBuildingRequest request; - public final RepositorySystemSession session; + private final RepositorySystemSession session; - public final List repositories; + private final List repositories; - public final ReactorModelPool modelPool; - - public final ReactorModelCache modelCache; + private final ReactorModelPool modelPool; + + private final ReactorModelCache modelCache; InternalConfig( ProjectBuildingRequest request, ReactorModelPool modelPool, ReactorModelCache modelCache ) { diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java index d0e3f6b216..3159fac6ba 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java @@ -196,9 +196,9 @@ public class DefaultProjectBuildingHelper ExtensionRealmCache.CacheRecord recordRealm = pluginManager.setupExtensionsRealm( project, plugin, request.getRepositorySession() ); - final ClassRealm extensionRealm = recordRealm.realm; - final ExtensionDescriptor extensionDescriptor = recordRealm.descriptor; - final List artifacts = recordRealm.artifacts; + final ClassRealm extensionRealm = recordRealm.getRealm(); + final ExtensionDescriptor extensionDescriptor = recordRealm.getDescriptor(); + final List artifacts = recordRealm.getArtifacts(); extensionRealms.add( extensionRealm ); if ( extensionDescriptor != null ) diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java index dafbefd370..0451a306fc 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingRequest.java @@ -31,6 +31,9 @@ import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.properties.internal.SystemProperties; import org.eclipse.aether.RepositorySystemSession; +/** + * DefaultProjectBuildingRequest + */ public class DefaultProjectBuildingRequest implements ProjectBuildingRequest { diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java index 9d66eb0eed..a14e624af8 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectRealmCache.java @@ -38,7 +38,9 @@ import org.eclipse.aether.graph.DependencyFilter; public class DefaultProjectRealmCache implements ProjectRealmCache, Disposable { - + /** + * CacheKey + */ protected static class CacheKey implements Key { @@ -118,7 +120,7 @@ public class DefaultProjectRealmCache { for ( CacheRecord record : cache.values() ) { - ClassRealm realm = record.realm; + ClassRealm realm = record.getRealm(); try { realm.getWorld().disposeRealm( realm.getId() ); diff --git a/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java b/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java index 5e42ee4635..8080f6e022 100644 --- a/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java +++ b/maven-core/src/main/java/org/apache/maven/project/InvalidProjectVersionException.java @@ -23,6 +23,9 @@ import java.io.File; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +/** + * InvalidProjectVersionException + */ public class InvalidProjectVersionException extends ProjectBuildingException { diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java index d0e4afedfa..80523ae77f 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectBuildingRequest.java @@ -27,6 +27,9 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.model.Profile; import org.eclipse.aether.RepositorySystemSession; +/** + * ProjectBuildingRequest + */ public interface ProjectBuildingRequest { diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java index 3400f96461..28ac0d6200 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectRealmCache.java @@ -43,12 +43,25 @@ public interface ProjectRealmCache // marker interface for cache keys } + /** + * CacheRecord + */ class CacheRecord { - public final ClassRealm realm; + public ClassRealm getRealm() + { + return realm; + } - public final DependencyFilter extensionArtifactFilter; + public DependencyFilter getExtensionArtifactFilter() + { + return extensionArtifactFilter; + } + + private final ClassRealm realm; + + private final DependencyFilter extensionArtifactFilter; CacheRecord( ClassRealm realm, DependencyFilter extensionArtifactFilter ) { diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java index 1ca35d87af..22a466ff47 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java @@ -38,6 +38,9 @@ import org.codehaus.plexus.util.dag.DAG; import org.codehaus.plexus.util.dag.TopologicalSorter; import org.codehaus.plexus.util.dag.Vertex; +/** + * ProjectSorter + */ public class ProjectSorter { private DAG dag; @@ -165,7 +168,7 @@ public class ProjectSorter this.sortedProjects = Collections.unmodifiableList( sortedProjects ); } - + @SuppressWarnings( "checkstyle:parameternumber" ) private void addEdge( Map projectMap, Map> vertexMap, MavenProject project, Vertex projectVertex, String groupId, String artifactId, String version, boolean force, boolean safe ) diff --git a/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java b/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java index 6b6d2bbbb9..64b30dd905 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java +++ b/maven-core/src/main/java/org/apache/maven/project/ReactorModelPool.java @@ -96,7 +96,7 @@ class ReactorModelPool @Override public String toString() { - StringBuilder buffer = new StringBuilder( 96 ); + StringBuilder buffer = new StringBuilder( 128 ); buffer.append( groupId ).append( ':' ).append( artifactId ).append( ':' ).append( version ); return buffer.toString(); } diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java index cb06b70fe9..a83cae6683 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ArtifactWithDependencies.java @@ -23,6 +23,9 @@ import java.util.List; import org.apache.maven.model.Dependency; +/** + * ArtifactWithDependencies + */ public interface ArtifactWithDependencies { diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java index f52b5405a0..056c052b1b 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java @@ -36,6 +36,9 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.codehaus.plexus.component.annotations.Component; +/** + * DefaultMavenMetadataCache + */ @Component( role = MavenMetadataCache.class ) public class DefaultMavenMetadataCache implements MavenMetadataCache @@ -43,6 +46,9 @@ public class DefaultMavenMetadataCache protected final Map cache = new ConcurrentHashMap<>(); + /** + * CacheKey + */ public static class CacheKey { private final Artifact artifact; @@ -198,6 +204,9 @@ public class DefaultMavenMetadataCache return s1 != null ? s1.equals( s2 ) : s2 == null; } + /** + * CacheRecord + */ public class CacheRecord { private Artifact pomArtifact; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java index 87d2e444a6..3d9d32daa0 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCache.java @@ -49,7 +49,9 @@ import org.eclipse.aether.repository.WorkspaceRepository; public class DefaultProjectArtifactsCache implements ProjectArtifactsCache { - + /** + * CacheKey + */ protected static class CacheKey implements Key { @@ -186,9 +188,9 @@ public class DefaultProjectArtifactsCache { CacheRecord cacheRecord = cache.get( key ); - if ( cacheRecord != null && cacheRecord.exception != null ) + if ( cacheRecord != null && cacheRecord.getException() != null ) { - throw cacheRecord.exception; + throw cacheRecord.getException(); } return cacheRecord; diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java index 036ee86c56..033e42ac1a 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataCache.java @@ -25,6 +25,9 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.metadata.ResolutionGroup; +/** + * MavenMetadataCache + */ public interface MavenMetadataCache { diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java index 42bbe45c2c..2dc93728f1 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java @@ -534,7 +534,7 @@ public class MavenMetadataSource return projectBuilder; } - + @SuppressWarnings( "checkstyle:methodlength" ) private ProjectRelocation retrieveRelocatedProject( Artifact artifact, MetadataResolutionRequest repositoryRequest ) throws ArtifactMetadataRetrievalException { diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java index d348d59c8a..3b4e2ef0e7 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/PluginArtifact.java @@ -28,6 +28,9 @@ import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.model.Dependency; import org.apache.maven.model.Plugin; +/** + * PluginArtifact + */ public class PluginArtifact extends DefaultArtifact implements ArtifactWithDependencies diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java index 924523f985..8556a6af64 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifact.java @@ -28,6 +28,9 @@ import org.apache.maven.model.Dependency; import org.apache.maven.model.DependencyManagement; import org.apache.maven.project.MavenProject; +/** + * ProjectArtifact + */ public class ProjectArtifact extends DefaultArtifact implements ArtifactWithDependencies diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java index cfec1d9922..8d8ad790ed 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/ProjectArtifactsCache.java @@ -46,12 +46,25 @@ public interface ProjectArtifactsCache // marker interface for cache keys } + /** + * CacheRecord + */ class CacheRecord { - public final Set artifacts; + public Set getArtifacts() + { + return artifacts; + } - public final LifecycleExecutionException exception; + private final Set artifacts; + + public LifecycleExecutionException getException() + { + return exception; + } + + private final LifecycleExecutionException exception; CacheRecord( Set artifacts ) { diff --git a/maven-core/src/main/java/org/apache/maven/repository/ArtifactDoesNotExistException.java b/maven-core/src/main/java/org/apache/maven/repository/ArtifactDoesNotExistException.java index 296f4ea56a..3e72387702 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/ArtifactDoesNotExistException.java +++ b/maven-core/src/main/java/org/apache/maven/repository/ArtifactDoesNotExistException.java @@ -19,6 +19,9 @@ package org.apache.maven.repository; * under the License. */ +/** + * ArtifactDoesNotExistException + */ public class ArtifactDoesNotExistException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferFailedException.java b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferFailedException.java index 9315f4c7a5..f35de659b7 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferFailedException.java +++ b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferFailedException.java @@ -19,6 +19,9 @@ package org.apache.maven.repository; * under the License. */ +/** + * ArtifactTransferFailedException + */ public class ArtifactTransferFailedException extends Exception { diff --git a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferListener.java b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferListener.java index 72a56cf08f..c6d2446e37 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferListener.java +++ b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferListener.java @@ -19,6 +19,9 @@ package org.apache.maven.repository; * under the License. */ +/** + * ArtifactTransferListener + */ public interface ArtifactTransferListener { boolean isShowChecksumEvents(); diff --git a/maven-core/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java index e33789e348..6f1c93478b 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java +++ b/maven-core/src/main/java/org/apache/maven/repository/LocalArtifactRepository.java @@ -22,6 +22,9 @@ package org.apache.maven.repository; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.MavenArtifactRepository; +/** + * LocalArtifactRepository + */ public abstract class LocalArtifactRepository extends MavenArtifactRepository { diff --git a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java index fcc0f7770c..30b49256fa 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java +++ b/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java @@ -44,10 +44,13 @@ public interface RepositorySystem { String DEFAULT_LOCAL_REPO_ID = "local"; + @SuppressWarnings( "checkstyle:constantname" ) String userHome = System.getProperty( "user.home" ); + @SuppressWarnings( "checkstyle:constantname" ) File userMavenConfigurationHome = new File( userHome, ".m2" ); + @SuppressWarnings( "checkstyle:constantname" ) File defaultUserLocalRepository = new File( userMavenConfigurationHome, "repository" ); String DEFAULT_REMOTE_REPO_ID = "central"; diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java index e942f70a56..ae1019a6fd 100644 --- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java +++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/ResolutionGroup.java @@ -26,6 +26,9 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.ArtifactRepository; +/** + * ResolutionGroup + */ public class ResolutionGroup { diff --git a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java index 7ca63abe7f..e57a19c4fb 100644 --- a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java +++ b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java @@ -20,17 +20,20 @@ package org.apache.maven.session.scope.internal; */ import java.util.Collections; +import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Maps; import com.google.inject.Key; import com.google.inject.OutOfScopeException; import com.google.inject.Provider; import com.google.inject.Scope; import com.google.inject.util.Providers; +/** + * SessionScope + */ public class SessionScope implements Scope { @@ -55,11 +58,14 @@ public class SessionScope } }; + /** + * ScopeState + */ private static final class ScopeState { - public final Map, Provider> seeded = Maps.newHashMap(); + private final Map, Provider> seeded = new HashMap<>(); - public final Map, Object> provided = Maps.newHashMap(); + private final Map, Object> provided = new HashMap<>(); } private final ThreadLocal> values = new ThreadLocal<>(); diff --git a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java index 585d683acc..cd88104846 100644 --- a/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java +++ b/maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScopeModule.java @@ -29,6 +29,9 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti import com.google.inject.AbstractModule; +/** + * SessionScopeModule + */ @Named public class SessionScopeModule extends AbstractModule diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java b/maven-core/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java index ca910d8749..41ccf58e91 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/merge/MavenToolchainMerger.java @@ -71,13 +71,13 @@ public class MavenToolchainMerger } else { - mergeToolchainModel_Configuration( dominantModel, recessiveModel ); + mergeToolchainModelConfiguration( dominantModel, recessiveModel ); } } } - protected void mergeToolchainModel_Configuration( ToolchainModel target, - ToolchainModel source ) + protected void mergeToolchainModelConfiguration( ToolchainModel target, + ToolchainModel source ) { Xpp3Dom src = (Xpp3Dom) source.getConfiguration(); if ( src != null ) diff --git a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java index c919cdf776..a685bc1639 100644 --- a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java +++ b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java @@ -43,7 +43,7 @@ public class LegacyLocalRepositoryManager private final LocalRepository repository; - public LegacyLocalRepositoryManager( File basedir ) + LegacyLocalRepositoryManager( File basedir ) { this.repository = new LocalRepository( basedir.getAbsoluteFile(), "legacy" ); } diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CleanArgument.java b/maven-embedder/src/main/java/org/apache/maven/cli/CleanArgument.java index 03ef00cc0f..8b2d9b70ab 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CleanArgument.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CleanArgument.java @@ -22,6 +22,9 @@ package org.apache.maven.cli; import java.util.ArrayList; import java.util.List; +/** + * CleanArgument + */ public class CleanArgument { public static String[] cleanArgs( String[] args ) diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java b/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java index 4656dd3776..34937e8f78 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CliRequest.java @@ -27,6 +27,9 @@ import org.apache.maven.execution.DefaultMavenExecutionRequest; import org.apache.maven.execution.MavenExecutionRequest; import org.codehaus.plexus.classworlds.ClassWorld; +/** + * CliRequest + */ public class CliRequest { String[] args; diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java index 77ef1342b9..4fac2add31 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java @@ -1268,6 +1268,7 @@ public class MavenCli return populateRequest( cliRequest, cliRequest.request ); } + @SuppressWarnings( "checkstyle:methodlength" ) private MavenExecutionRequest populateRequest( CliRequest cliRequest, MavenExecutionRequest request ) { CommandLine commandLine = cliRequest.commandLine; @@ -1681,8 +1682,7 @@ public class MavenCli static class ExitException extends Exception { - @SuppressWarnings( "checkstyle:visibilitymodifier" ) - public int exitCode; + int exitCode; ExitException( int exitCode ) { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/ConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/ConfigurationProcessor.java index 75fb9b916d..50a5854842 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/ConfigurationProcessor.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/ConfigurationProcessor.java @@ -21,6 +21,9 @@ package org.apache.maven.cli.configuration; import org.apache.maven.cli.CliRequest; +/** + * ConfigurationProcessor + */ public interface ConfigurationProcessor { void process( CliRequest request ) diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java index d9a69548be..2536a22ced 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java @@ -47,6 +47,9 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.slf4j.Logger; +/** + * SettingsXmlConfigurationProcessor + */ @Component( role = ConfigurationProcessor.class, hint = SettingsXmlConfigurationProcessor.HINT ) public class SettingsXmlConfigurationProcessor implements ConfigurationProcessor diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java index f62b57eeab..55b1155e85 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/DefaultEventSpyContext.java @@ -24,6 +24,9 @@ import java.util.Map; import org.apache.maven.eventspy.EventSpy; +/** + * DefaultEventSpyContext + */ public class DefaultEventSpyContext implements EventSpy.Context { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java b/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java index 2a7d3e3f95..9fada05db8 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java @@ -49,6 +49,9 @@ import org.eclipse.aether.repository.RemoteRepository; import org.eclipse.aether.util.filter.ExclusionsDependencyFilter; import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator; +/** + * BootstrapCoreExtensionManager + */ @Named public class BootstrapCoreExtensionManager { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java index f64f3303e7..8dc81c7086 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfiguration.java @@ -28,6 +28,9 @@ package org.apache.maven.cli.logging; */ public interface Slf4jConfiguration { + /** + * Level + */ enum Level { DEBUG, INFO, ERROR diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java index c33e8a2d6c..984902e807 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java @@ -30,6 +30,9 @@ import org.eclipse.aether.transfer.TransferCancelledException; import org.eclipse.aether.transfer.TransferEvent; import org.eclipse.aether.transfer.TransferResource; +/** + * AbstractMavenTransferListener + */ public abstract class AbstractMavenTransferListener extends AbstractTransferListener { @@ -153,6 +156,7 @@ public abstract class AbstractMavenTransferListener return format( size, unit, false ); } + @SuppressWarnings( "checkstyle:magicnumber" ) public String format( long size, ScaleUnit unit, boolean omitSymbol ) { Validate.isTrue( size >= 0L, "file size cannot be negative: %s", size ); diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java index 0e20f17f8d..2eee8f667a 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/BatchModeMavenTransferListener.java @@ -21,6 +21,9 @@ package org.apache.maven.cli.transfer; import java.io.PrintStream; +/** + * BatchModeMavenTransferListener + */ public class BatchModeMavenTransferListener extends AbstractMavenTransferListener { diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java index 5c97acb51a..086e40677e 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java @@ -29,6 +29,9 @@ import org.eclipse.aether.transfer.TransferResource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * Slf4jMavenTransferListener + */ public class Slf4jMavenTransferListener extends AbstractTransferListener { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index c3dd0432ae..44ee334c30 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -239,6 +239,7 @@ public class DefaultModelBuilder return this; } + @SuppressWarnings( "checkstyle:methodlength" ) @Override public ModelBuildingResult build( ModelBuildingRequest request ) throws ModelBuildingException @@ -1131,6 +1132,7 @@ public class DefaultModelBuilder return superPomProvider.getSuperModel( "4.0.0" ).clone(); } + @SuppressWarnings( "checkstyle:methodlength" ) private void importDependencyManagement( Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Collection importIds ) { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java index 78e81e380c..e1b05aa0af 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java @@ -82,6 +82,7 @@ public class DefaultModelProblem * @param exception The exception that caused this problem, may be {@code null}. */ //mkleint: does this need to be public? + @SuppressWarnings( "checkstyle:parameternumber" ) public DefaultModelProblem( String message, Severity severity, Version version, String source, int lineNumber, int columnNumber, String modelId, Exception exception ) { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java index a4d5fa93ae..6f4f084511 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java @@ -31,6 +31,9 @@ import org.apache.maven.model.locator.ModelLocator; import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; +/** + * DefaultModelProcessor + */ @Component( role = ModelProcessor.class ) public class DefaultModelProcessor implements ModelProcessor diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java index b21dd0d455..1f39ad443b 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelData.java @@ -206,7 +206,7 @@ class ModelData */ public String getId() { - StringBuilder buffer = new StringBuilder( 96 ); + StringBuilder buffer = new StringBuilder( 128 ); buffer.append( getGroupId() ).append( ':' ).append( getArtifactId() ).append( ':' ).append( getVersion() ); diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java index 43272bac04..2c7a72e70a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblem.java @@ -41,6 +41,9 @@ public interface ModelProblem } + /** + * Version + */ enum Version { //based on ModeBuildingResult.validationLevel diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java index 76c23e1fde..1b694c459b 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java @@ -44,7 +44,7 @@ public class ModelProblemUtils return ""; } - StringBuilder buffer = new StringBuilder( 192 ); + StringBuilder buffer = new StringBuilder( 128 ); buffer.append( toId( model ) ); @@ -108,7 +108,7 @@ public class ModelProblemUtils */ static String toId( String groupId, String artifactId, String version ) { - StringBuilder buffer = new StringBuilder( 96 ); + StringBuilder buffer = new StringBuilder( 128 ); buffer.append( ( groupId != null && groupId.length() > 0 ) ? groupId : "[unknown-group-id]" ); buffer.append( ':' ); diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProcessor.java index ca34845c27..c2c2ec061a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProcessor.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProcessor.java @@ -22,6 +22,9 @@ package org.apache.maven.model.building; import org.apache.maven.model.io.ModelReader; import org.apache.maven.model.locator.ModelLocator; +/** + * ModelProcessor + */ @SuppressWarnings( "checkstyle:interfaceistype" ) public interface ModelProcessor extends ModelLocator, ModelReader diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java index 51150dbbfc..890c8450f1 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java @@ -44,6 +44,7 @@ import org.codehaus.plexus.util.StringUtils; * * @author Benjamin Bentmann */ +@SuppressWarnings( { "checkstyle:methodname" } ) @Component( role = InheritanceAssembler.class ) public class DefaultInheritanceAssembler implements InheritanceAssembler @@ -135,6 +136,9 @@ public class DefaultInheritanceAssembler return adjustment; } + /** + * InheritanceModelMerger + */ protected static class InheritanceModelMerger extends MavenModelMerger { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java index 9b0500d268..fcec526e5a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java @@ -25,6 +25,9 @@ import java.util.GregorianCalendar; import java.util.Properties; import java.util.TimeZone; +/** + * MavenBuildTimestamp + */ public class MavenBuildTimestamp { // ISO 8601-compliant timestamp for machine readability diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java index 1d8ad042bb..c95cacbfd7 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java @@ -44,6 +44,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +/** + * StringSearchModelInterpolator + */ @Component( role = ModelInterpolator.class ) public class StringSearchModelInterpolator extends AbstractStringBasedModelInterpolator diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java index e611973072..45474078b2 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultDependencyManagementInjector.java @@ -38,6 +38,7 @@ import org.codehaus.plexus.component.annotations.Component; * * @author Benjamin Bentmann */ +@SuppressWarnings( { "checkstyle:methodname" } ) @Component( role = DependencyManagementInjector.class ) public class DefaultDependencyManagementInjector implements DependencyManagementInjector @@ -51,6 +52,9 @@ public class DefaultDependencyManagementInjector merger.mergeManagedDependencies( model ); } + /** + * ManagementModelMerger + */ protected static class ManagementModelMerger extends MavenModelMerger { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java index 4a50cfe701..9d4dc198ff 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/management/DefaultPluginManagementInjector.java @@ -41,6 +41,7 @@ import org.codehaus.plexus.component.annotations.Component; * * @author Benjamin Bentmann */ +@SuppressWarnings( { "checkstyle:methodname" } ) @Component( role = PluginManagementInjector.class ) public class DefaultPluginManagementInjector implements PluginManagementInjector @@ -54,6 +55,9 @@ public class DefaultPluginManagementInjector merger.mergeManagedBuildPlugins( model ); } + /** + * ManagementModelMerger + */ protected static class ManagementModelMerger extends MavenModelMerger { @@ -66,12 +70,12 @@ public class DefaultPluginManagementInjector PluginManagement pluginManagement = build.getPluginManagement(); if ( pluginManagement != null ) { - mergePluginContainer_Plugins( build, pluginManagement ); + mergePluginContainerPlugins( build, pluginManagement ); } } } - private void mergePluginContainer_Plugins( PluginContainer target, PluginContainer source ) + private void mergePluginContainerPlugins( PluginContainer target, PluginContainer source ) { List src = source.getPlugins(); if ( !src.isEmpty() ) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java index e96425d900..8e904547ec 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/merge/MavenModelMerger.java @@ -53,6 +53,7 @@ import org.apache.maven.model.Site; * * @author Benjamin Bentmann */ +@SuppressWarnings( { "checkstyle:methodname" } ) public class MavenModelMerger extends ModelMerger { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java index 2803b0aa3e..d625bb5acb 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java @@ -94,6 +94,9 @@ public class DefaultModelNormalizer } } + /** + * DuplicateMerger + */ protected static class DuplicateMerger extends MavenModelMerger { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java index aed837bf2b..32a2fc055c 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java @@ -47,6 +47,7 @@ import org.codehaus.plexus.component.annotations.Component; * @author Benjamin Bentmann */ @Component( role = ProfileInjector.class ) +@SuppressWarnings( { "checkstyle:methodname" } ) public class DefaultProfileInjector implements ProfileInjector { @@ -72,6 +73,9 @@ public class DefaultProfileInjector } } + /** + * ProfileModelMerger + */ protected static class ProfileModelMerger extends MavenModelMerger { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/resolution/WorkspaceModelResolver.java b/maven-model-builder/src/main/java/org/apache/maven/model/resolution/WorkspaceModelResolver.java index d12edea7a7..8264ed737a 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/resolution/WorkspaceModelResolver.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/resolution/WorkspaceModelResolver.java @@ -21,6 +21,9 @@ package org.apache.maven.model.resolution; import org.apache.maven.model.Model; +/** + * WorkspaceModelResolver + */ public interface WorkspaceModelResolver { diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java index f0acb1fe87..4018618f9b 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java @@ -979,6 +979,7 @@ public class DefaultModelValidator return false; } + @SuppressWarnings( "checkstyle:parameternumber" ) private boolean validateEnum( String fieldName, ModelProblemCollector problems, Severity severity, Version version, String string, String sourceHint, InputLocationTracker tracker, String... validValues ) @@ -1001,6 +1002,7 @@ public class DefaultModelValidator return false; } + @SuppressWarnings( "checkstyle:parameternumber" ) private boolean validateBannedCharacters( String fieldName, ModelProblemCollector problems, Severity severity, Version version, String string, String sourceHint, InputLocationTracker tracker, String banned ) diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java index cdb9a23ca8..cd97fb7aef 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java @@ -25,6 +25,9 @@ import java.util.List; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptor; +/** + * MojoNotFoundException + */ public class MojoNotFoundException extends Exception { diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java index b236c8c7bc..59e0d5d98a 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateMojoDescriptorException.java @@ -19,6 +19,9 @@ package org.apache.maven.plugin.descriptor; * under the License. */ +/** + * DuplicateMojoDescriptorException + */ public class DuplicateMojoDescriptorException extends InvalidPluginDescriptorException { diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java index 4cad9b7c01..69fea1c91e 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/DuplicateParameterException.java @@ -19,6 +19,9 @@ package org.apache.maven.plugin.descriptor; * under the License. */ +/** + * DuplicateParameterException + */ public class DuplicateParameterException extends InvalidPluginDescriptorException { diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java index 4b8e739772..f63fd26ce4 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/InvalidPluginDescriptorException.java @@ -21,6 +21,9 @@ package org.apache.maven.plugin.descriptor; import org.codehaus.plexus.configuration.PlexusConfigurationException; +/** + * InvalidPluginDescriptorException + */ public class InvalidPluginDescriptorException extends PlexusConfigurationException { diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java index 865e66b557..3df7ab4e06 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java @@ -114,6 +114,7 @@ public class PluginDescriptorBuilder return pluginDescriptor; } + @SuppressWarnings( "checkstyle:methodlength" ) public MojoDescriptor buildComponentDescriptor( PlexusConfiguration c, PluginDescriptor pluginDescriptor ) throws PlexusConfigurationException { diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java index c087bdf7b4..ef7f0cfb07 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java @@ -150,6 +150,7 @@ public class DefaultVersionResolver return this; } + @SuppressWarnings( "checkstyle:methodlength" ) public VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ) throws VersionResolutionException { @@ -482,7 +483,7 @@ public class DefaultVersionResolver this.repository = repository; } - public boolean isOutdated( String timestamp ) + boolean isOutdated( String timestamp ) { return timestamp != null && timestamp.compareTo( this.timestamp ) > 0; } diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java index 070b91c7a2..1e49bfce35 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java @@ -35,6 +35,9 @@ import org.eclipse.aether.impl.VersionRangeResolver; import org.eclipse.aether.impl.VersionResolver; import org.eclipse.aether.impl.guice.AetherModule; +/** + * MavenResolverModule + */ public final class MavenResolverModule extends AbstractModule { diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenWorkspaceReader.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenWorkspaceReader.java index 270cf588aa..c87f723bf5 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenWorkspaceReader.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenWorkspaceReader.java @@ -23,6 +23,9 @@ import org.apache.maven.model.Model; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.repository.WorkspaceReader; +/** + * MavenWorkspaceReader + */ public interface MavenWorkspaceReader extends WorkspaceReader { diff --git a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java index d56e346181..4adfdbe059 100644 --- a/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java +++ b/maven-slf4j-provider/src/main/java/org/slf4j/impl/MavenSimpleLoggerFactory.java @@ -21,6 +21,9 @@ package org.slf4j.impl; import org.slf4j.Logger; +/** + * MavenSimpleLoggerFactory + */ public class MavenSimpleLoggerFactory extends SimpleLoggerFactory { diff --git a/pom.xml b/pom.xml index 66b9d27d59..b912b67183 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ under the License. Maven Apache Maven ref/3-LATEST - RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,JavadocType,MagicNumber,InnerAssignment,MethodName + None **/package-info.java