mirror of https://github.com/apache/maven.git
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
This commit is contained in:
parent
40cf506220
commit
d925081794
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -198,6 +198,7 @@ public class ArtifactRepositoryPolicy
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:magicnumber" )
|
||||
private int ordinalOfUpdatePolicy( String policy )
|
||||
{
|
||||
if ( ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY.equals( policy ) )
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.artifact.repository;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
public class Authentication
|
||||
{
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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<String> _QUALIFIERS = Arrays.asList( QUALIFIERS );
|
||||
private static final List<String> 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;
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.repository;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Proxy
|
||||
*/
|
||||
public class Proxy
|
||||
{
|
||||
public static final String PROXY_SOCKS5 = "SOCKS_5";
|
||||
|
|
|
@ -33,10 +33,6 @@ under the License.
|
|||
<name>Maven Compat</name>
|
||||
<description>Maven2 classes maintained as compatibility layer.</description>
|
||||
|
||||
<properties>
|
||||
<checkstyle.failOnViolation>false</checkstyle.failOnViolation><!-- laziness for code that will disappear in future... -->
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <a href="https://maven.apache.org/wagon">Wagon</a> related operations in Maven.
|
||||
*/
|
||||
@Component( role = WagonManager.class )
|
||||
public class DefaultWagonManager
|
||||
extends org.apache.maven.repository.legacy.DefaultWagonManager
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -149,7 +149,7 @@ public final class MetadataBridge
|
|||
|
||||
private File metadataFile;
|
||||
|
||||
public MetadataRepository( File metadataFile )
|
||||
MetadataRepository( File metadataFile )
|
||||
{
|
||||
super( "local", "", null );
|
||||
this.metadataFile = metadataFile;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -79,6 +79,7 @@ public interface ArtifactResolver
|
|||
throws ArtifactResolutionException, ArtifactNotFoundException;
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
ArtifactResolutionResult resolveTransitively(
|
||||
Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -258,7 +258,8 @@ public class DefaultArtifactResolver
|
|||
throws ArtifactResolutionException,
|
||||
ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, Collections.<String, Artifact>emptyMap(), localRepository,
|
||||
return resolveTransitively(
|
||||
artifacts, originatingArtifact, Collections.<String, Artifact>emptyMap(), localRepository,
|
||||
remoteRepositories, source, filter );
|
||||
|
||||
}
|
||||
|
@ -305,10 +306,12 @@ public class DefaultArtifactResolver
|
|||
throws ArtifactResolutionException,
|
||||
ArtifactNotFoundException
|
||||
{
|
||||
return resolveTransitively( artifacts, originatingArtifact, Collections.<String, Artifact>emptyMap(), localRepository,
|
||||
return resolveTransitively(
|
||||
artifacts, originatingArtifact, Collections.<String, Artifact>emptyMap(), localRepository,
|
||||
remoteRepositories, source, null, listeners );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> managedVersions,
|
||||
ArtifactRepository localRepository,
|
||||
|
@ -322,6 +325,7 @@ public class DefaultArtifactResolver
|
|||
remoteRepositories, source, filter, listeners, null );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> 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<ArtifactRepository> remoteRepositories,
|
||||
ArtifactResolutionResult result )
|
||||
{
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.apache.maven.artifact.resolver.filter;
|
|||
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
|
||||
/**
|
||||
* InversionArtifactFilter
|
||||
*/
|
||||
public class InversionArtifactFilter
|
||||
implements ArtifactFilter
|
||||
{
|
||||
|
|
|
@ -25,6 +25,9 @@ import java.util.Map;
|
|||
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
|
||||
/**
|
||||
* ManagedVersionMap
|
||||
*/
|
||||
@Deprecated
|
||||
public class ManagedVersionMap
|
||||
extends HashMap<String, Artifact>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,6 +26,9 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* ProfileManager
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ProfileManager
|
||||
{
|
||||
|
|
|
@ -27,6 +27,9 @@ import org.apache.maven.model.Repository;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ProfilesConversionUtils
|
||||
*/
|
||||
@Deprecated
|
||||
public class ProfilesConversionUtils
|
||||
{
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.apache.maven.profiles.activation;
|
|||
|
||||
import org.apache.maven.model.Profile;
|
||||
|
||||
/**
|
||||
* DetectedProfileActivator
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class DetectedProfileActivator
|
||||
implements ProfileActivator
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.profiles.activation;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* ProfileActivationException
|
||||
*/
|
||||
@Deprecated
|
||||
public class ProfileActivationException
|
||||
extends Exception
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.apache.maven.profiles.activation;
|
|||
|
||||
import org.apache.maven.model.Profile;
|
||||
|
||||
/**
|
||||
* ProfileActivator
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ProfileActivator
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -23,6 +23,9 @@ import java.io.File;
|
|||
|
||||
import org.apache.maven.project.validation.ModelValidationResult;
|
||||
|
||||
/**
|
||||
* InvalidProjectModelException
|
||||
*/
|
||||
@Deprecated
|
||||
public class InvalidProjectModelException
|
||||
extends ProjectBuildingException
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<ValueSource> valueSources;
|
||||
private final List<InterpolationPostProcessor> postProcessors;
|
||||
|
||||
public InterpolateObjectAction( Object target, List<ValueSource> valueSources,
|
||||
InterpolateObjectAction( Object target, List<ValueSource> valueSources,
|
||||
List<InterpolationPostProcessor> 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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -60,7 +60,7 @@ public class DefaultModelValidator
|
|||
|
||||
ModelValidationResult result;
|
||||
|
||||
public SimpleModelProblemCollector( ModelValidationResult result )
|
||||
SimpleModelProblemCollector( ModelValidationResult result )
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <a href="https://maven.apache.org/wagon">Wagon</a> 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 )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -32,7 +32,7 @@ class MavenArtifact
|
|||
|
||||
private long transferStartTime;
|
||||
|
||||
public MavenArtifact( String repositoryUrl, Resource resource )
|
||||
MavenArtifact( String repositoryUrl, Resource resource )
|
||||
{
|
||||
if ( repositoryUrl == null )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ package org.apache.maven.repository.legacy;
|
|||
|
||||
import org.apache.maven.wagon.TransferFailedException;
|
||||
|
||||
|
||||
/**
|
||||
* WagonConfigurationException
|
||||
*/
|
||||
public class WagonConfigurationException
|
||||
extends TransferFailedException
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -87,6 +87,7 @@ public class DefaultLegacyArtifactCollector
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
|
@ -102,6 +103,7 @@ public class DefaultLegacyArtifactCollector
|
|||
conflictResolvers );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> 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<Object, List<ResolutionNode>> resolvedArtifacts, ManagedVersionMap managedVersions,
|
||||
ArtifactResolutionRequest request, ArtifactMetadataSource source, ArtifactFilter filter,
|
||||
|
@ -791,6 +794,7 @@ public class DefaultLegacyArtifactCollector
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
|
||||
Map<String, Artifact> managedVersions, ArtifactRepository localRepository,
|
||||
List<ArtifactRepository> remoteRepositories,
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver;
|
|||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public interface LegacyArtifactCollector
|
||||
{
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
//------------------------------------------------------------------
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.repository.metadata;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* MetadataResolutionException
|
||||
*/
|
||||
public class MetadataResolutionException
|
||||
extends Exception
|
||||
{
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.repository.metadata;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* MetadataResolutionRequestTypeEnum
|
||||
*/
|
||||
public enum MetadataResolutionRequestTypeEnum
|
||||
{
|
||||
tree( 1 )
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.usability.plugin;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* ExpressionDocumentationException
|
||||
*/
|
||||
public class ExpressionDocumentationException
|
||||
extends Exception
|
||||
{
|
||||
|
|
|
@ -35,6 +35,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* ExpressionDocumenter
|
||||
*/
|
||||
public class ExpressionDocumenter
|
||||
{
|
||||
|
||||
|
|
|
@ -33,10 +33,6 @@ under the License.
|
|||
<name>Maven Core</name>
|
||||
<description>Maven Core classes.</description>
|
||||
|
||||
<properties>
|
||||
<checkstyle.violation.ignore>RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,JavadocType,MethodName,MagicNumber,ConstantName,VisibilityModifier,InnerAssignment</checkstyle.violation.ignore>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Maven -->
|
||||
<dependency>
|
||||
|
|
|
@ -23,6 +23,9 @@ import java.util.Set;
|
|||
|
||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||
|
||||
/**
|
||||
* ArtifactFilterManager
|
||||
*/
|
||||
public interface ArtifactFilterManager
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -21,6 +21,9 @@ package org.apache.maven;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* MissingModuleException
|
||||
*/
|
||||
public class MissingModuleException
|
||||
extends MavenExecutionException
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<ArtifactRepository> repositories, List<Mirror> 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,
|
||||
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;
|
||||
|
|
|
@ -31,7 +31,9 @@ import java.util.Map;
|
|||
*/
|
||||
public interface EventSpy
|
||||
{
|
||||
|
||||
/**
|
||||
* Context
|
||||
*/
|
||||
interface Context
|
||||
{
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -322,6 +322,7 @@ public class MavenSession
|
|||
}
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings( "checkstyle:parameternumber" )
|
||||
public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository,
|
||||
EventDispatcher eventDispatcher, ReactorManager unused, List<String> 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<String> goals,
|
||||
String executionRootDir, Properties executionProperties, Properties userProperties,
|
||||
|
|
|
@ -31,6 +31,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* ReactorManager - unused
|
||||
*/
|
||||
@Deprecated
|
||||
public class ReactorManager
|
||||
{
|
||||
|
|
|
@ -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<Key<?>, Provider<?>> seeded = Maps.newHashMap();
|
||||
private final Map<Key<?>, Provider<?>> seeded = Maps.newHashMap();
|
||||
|
||||
public final Map<Key<?>, Object> provided = Maps.newHashMap();
|
||||
private final Map<Key<?>, Object> provided = Maps.newHashMap();
|
||||
}
|
||||
|
||||
private final ThreadLocal<LinkedList<ScopeState>> values = new ThreadLocal<>();
|
||||
|
|
|
@ -24,6 +24,9 @@ import javax.inject.Named;
|
|||
|
||||
import org.apache.maven.execution.MojoExecutionListener;
|
||||
|
||||
/**
|
||||
* MojoExecutionScopeCoreModule
|
||||
*/
|
||||
@Named
|
||||
public class MojoExecutionScopeCoreModule
|
||||
extends MojoExecutionScopeModule
|
||||
|
|
|
@ -27,6 +27,9 @@ import org.codehaus.plexus.component.repository.exception.ComponentLookupExcepti
|
|||
|
||||
import com.google.inject.AbstractModule;
|
||||
|
||||
/**
|
||||
* MojoExecutionScopeModule
|
||||
*/
|
||||
public class MojoExecutionScopeModule
|
||||
extends AbstractModule
|
||||
{
|
||||
|
|
|
@ -26,6 +26,9 @@ import javax.inject.Singleton;
|
|||
import org.codehaus.plexus.PlexusContainer;
|
||||
import org.eclipse.sisu.Nullable;
|
||||
|
||||
/**
|
||||
* CoreExportsProvider
|
||||
*/
|
||||
@Named
|
||||
@Singleton
|
||||
public class CoreExportsProvider
|
||||
|
|
|
@ -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<URL> urls = loader.getResources( builder.getExtensionDescriptorLocation() );
|
||||
Enumeration<URL> 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() );
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<ExecutionPlanItem>
|
||||
{
|
||||
|
|
|
@ -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 <phase>} 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -138,7 +138,7 @@ public class LifecycleDependencyResolver
|
|||
|
||||
if ( recordArtifacts != null )
|
||||
{
|
||||
resolvedArtifacts = recordArtifacts.artifacts;
|
||||
resolvedArtifacts = recordArtifacts.getArtifacts();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.lifecycle.internal.builder;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* BuilderNotFoundException
|
||||
*/
|
||||
public class BuilderNotFoundException
|
||||
extends Exception
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ThreadOutputMuxer
|
|||
class ConsolePrinter
|
||||
implements Runnable
|
||||
{
|
||||
public volatile boolean running;
|
||||
private volatile boolean running;
|
||||
|
||||
private final ProjectBuildList projectBuildList;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 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
|
||||
|
|
|
@ -23,6 +23,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DefaultLifecycleMapping
|
||||
*/
|
||||
public class DefaultLifecycleMapping
|
||||
implements LifecycleMapping
|
||||
{
|
||||
|
|
|
@ -22,6 +22,9 @@ package org.apache.maven.lifecycle.mapping;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* LifecycleMapping
|
||||
*/
|
||||
public interface LifecycleMapping
|
||||
{
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ import java.util.Map;
|
|||
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
|
||||
/**
|
||||
* LifecyclePhase
|
||||
*/
|
||||
public class LifecyclePhase
|
||||
{
|
||||
|
||||
|
|
|
@ -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<Object, Object> context )
|
||||
|
|
|
@ -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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue