fix a lot of checkstyle violations for future m-checkstyle-p 2.13, as

proof of concept for misc violations suppressions strategies
This commit is contained in:
Hervé Boutemy 2014-08-19 00:17:28 +02:00
parent 1ed1d8cd3d
commit ca2b26ac5d
33 changed files with 169 additions and 117 deletions

View File

@ -117,14 +117,18 @@ public void addRepository( Repository repository )
}
@Override
public void addRepository(final Repository repository, boolean replace) throws InvalidRepositoryException {
public void addRepository( final Repository repository, boolean replace )
throws InvalidRepositoryException
{
if ( session.isIgnoreArtifactDescriptorRepositories() )
{
return;
}
if ( !repositoryIds.add( repository.getId() ) ) {
if ( !replace ) {
if ( !repositoryIds.add( repository.getId() ) )
{
if ( !replace )
{
return;
}
@ -138,10 +142,13 @@ public void addRepository(final Repository repository, boolean replace) throws I
remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories, true );
}
private static void removeMatchingRepository(Iterable<RemoteRepository> repositories, final String id) {
Iterables.removeIf(repositories, new Predicate<RemoteRepository>() {
private static void removeMatchingRepository( Iterable<RemoteRepository> repositories, final String id )
{
Iterables.removeIf( repositories, new Predicate<RemoteRepository>()
{
@Override
public boolean apply(RemoteRepository remoteRepository) {
public boolean apply( RemoteRepository remoteRepository )
{
return remoteRepository.getId().equals( id );
}
} );

View File

@ -1,5 +1,7 @@
// CHECKSTYLE_OFF: RegexpHeader
/**
* <a href="http://www.eclipse.org/aether/">Aether</a> extensions for utilizing the Maven POM and Maven repository metadata.
* <a href="http://www.eclipse.org/aether/">Aether</a> extensions for utilizing the Maven POM and Maven repository
* metadata.
*/
package org.apache.maven.repository.internal;

View File

@ -54,6 +54,7 @@ public class AbstractArtifactResolutionException
static final String LS = System.getProperty( "line.separator" );
@SuppressWarnings( "checkstyle:parameternumber" )
protected AbstractArtifactResolutionException( String message,
String groupId,
String artifactId,
@ -66,6 +67,7 @@ protected AbstractArtifactResolutionException( String message,
this( message, groupId, artifactId, version, type, classifier, remoteRepositories, path, null );
}
@SuppressWarnings( "checkstyle:parameternumber" )
protected AbstractArtifactResolutionException( String message,
String groupId,
String artifactId,
@ -248,6 +250,7 @@ private static String constructMessageBase( String message,
return sb.toString();
}
@SuppressWarnings( "checkstyle:parameternumber" )
protected static String constructMissingArtifactMessage( String message,
String indentation,
String groupId,

View File

@ -33,7 +33,8 @@ public class ArtifactNotFoundException
{
private String downloadUrl;
protected ArtifactNotFoundException( String message, Artifact artifact, List<ArtifactRepository> remoteRepositories )
protected ArtifactNotFoundException( String message, Artifact artifact,
List<ArtifactRepository> remoteRepositories )
{
super( message, artifact, remoteRepositories );
}
@ -52,6 +53,7 @@ protected ArtifactNotFoundException( String message, Artifact artifact,
cause );
}
@SuppressWarnings( "checkstyle:parameternumber" )
public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type,
String classifier, List<ArtifactRepository> remoteRepositories,
String downloadUrl, List<String> path, Throwable cause )
@ -63,6 +65,7 @@ public ArtifactNotFoundException( String message, String groupId, String artifac
this.downloadUrl = downloadUrl;
}
@SuppressWarnings( "checkstyle:parameternumber" )
private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type,
String classifier, List<ArtifactRepository> remoteRepositories,
String downloadUrl, List<String> path )

View File

@ -30,6 +30,7 @@
public class ArtifactResolutionException
extends AbstractArtifactResolutionException
{
@SuppressWarnings( "checkstyle:parameternumber" )
public ArtifactResolutionException( String message, String groupId, String artifactId, String version, String type,
String classifier, List<ArtifactRepository> remoteRepositories,
List<String> path, Throwable t )

View File

@ -149,6 +149,7 @@ private static class StringItem
{
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 Properties ALIASES = new Properties();
@ -183,6 +184,7 @@ public StringItem( String value, boolean followedByDigit )
case 'm':
value = "milestone";
break;
default:
}
}
this.value = ALIASES.getProperty( value , value );
@ -201,7 +203,8 @@ public boolean isNull()
/**
* Returns a comparable value for a qualifier.
*
* This method takes into account the ordering of known qualifiers then unknown qualifiers with lexical ordering.
* This method takes into account the ordering of known qualifiers then unknown qualifiers with lexical
* ordering.
*
* just returning an Integer with the index here is faster, but requires a lot of if/then/else to check for -1
* or QUALIFIERS.size and then resort to lexical ordering. Most comparisons are decided by the first character,

View File

@ -131,7 +131,7 @@ public class DefaultMaven
private RepositorySystem repoSystem;
@Requirement( optional = true, hint = "simple" )
private LocalRepositoryManagerFactory simpleLocalRepositoryManagerFactory;
private LocalRepositoryManagerFactory simpleLocalRepoMgrFactory;
@Requirement
private SettingsDecrypter settingsDecrypter;
@ -188,21 +188,22 @@ public MavenExecutionResult execute( MavenExecutionRequest request )
//
// 6) Get reactor projects looking for general POM errors
//
// 7) Create ProjectDependencyGraph using trimming which takes into account --projects and reactor mode. This ensures
// that the projects passed into the ReactorReader are only those specified.
// 7) Create ProjectDependencyGraph using trimming which takes into account --projects and reactor mode.
// This ensures that the projects passed into the ReactorReader are only those specified.
//
// 8) Create ReactorReader with the getProjectMap( projects ). NOTE that getProjectMap(projects) is the code that
// checks for duplicate projects definitions in the build. Ideally this type of duplicate checking should be part of
// getting the reactor projects in 6). The duplicate checking is conflated with getProjectMap(projects).
// checks for duplicate projects definitions in the build. Ideally this type of duplicate checking should be
// part of getting the reactor projects in 6). The duplicate checking is conflated with getProjectMap(projects).
//
// 9) Execute AbstractLifecycleParticipant.afterProjectsRead(session)
//
// 10) Create ProjectDependencyGraph without trimming (as trimming was done in 7). A new topological sort is required after
// the execution of 9) as the AbstractLifecycleParticipants are free to mutate the MavenProject instances, which may change
// dependencies which can, in turn, affect the build order.
// 10) Create ProjectDependencyGraph without trimming (as trimming was done in 7). A new topological sort is
// required after the execution of 9) as the AbstractLifecycleParticipants are free to mutate the MavenProject
// instances, which may change dependencies which can, in turn, affect the build order.
//
// 11) Execute LifecycleStarter.start()
//
@SuppressWarnings( "checkstyle:methodlength" )
private MavenExecutionResult doExecute( MavenExecutionRequest request )
{
request.setStartTime( new Date() );
@ -430,10 +431,11 @@ else if ( request.isUpdateSnapshots() )
if ( request.isUseLegacyLocalRepository() )
{
logger.warn( "Disabling enhanced local repository: using legacy is strongly discouraged to ensure build reproducibility." );
logger.warn( "Disabling enhanced local repository: using legacy is strongly discouraged to ensure"
+ " build reproducibility." );
try
{
session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( session, localRepo ) );
session.setLocalRepositoryManager( simpleLocalRepoMgrFactory.newInstance( session, localRepo ) );
}
catch ( NoLocalRepositoryManagerException e )
{
@ -677,8 +679,8 @@ private void collectProjects( List<MavenProject> projects, List<File> files, Mav
for ( ModelProblem problem : result.getProblems() )
{
String location = ModelProblemUtils.formatLocation( problem, result.getProjectId() );
logger.warn( problem.getMessage() + ( StringUtils.isNotEmpty( location ) ? " @ " + location : "" ) );
String loc = ModelProblemUtils.formatLocation( problem, result.getProjectId() );
logger.warn( problem.getMessage() + ( StringUtils.isNotEmpty( loc ) ? " @ " + loc : "" ) );
}
problems = true;
@ -743,11 +745,11 @@ private void validateProjects( List<MavenProject> projects )
{
Map<String, MavenProject> projectsMap = new HashMap<String, MavenProject>();
for ( MavenProject project : projects )
for ( MavenProject p : projects )
{
String projectKey = ArtifactUtils.key( project.getGroupId(), project.getArtifactId(), project.getVersion() );
String projectKey = ArtifactUtils.key( p.getGroupId(), p.getArtifactId(), p.getVersion() );
projectsMap.put( projectKey, project );
projectsMap.put( projectKey, p );
}
for ( MavenProject project : projects )
@ -763,7 +765,8 @@ private void validateProjects( List<MavenProject> projects )
if ( projectsMap.containsKey( pluginKey ) )
{
logger.warn( project.getName() + " uses " + plugin.getKey()
+ " as extensions, which is not possible within the same reactor build. This plugin was pulled from the local repository!" );
+ " as extensions, which is not possible within the same reactor build. "
+ "This plugin was pulled from the local repository!" );
}
}
}
@ -795,7 +798,8 @@ protected Logger getLogger()
return logger;
}
private ProjectDependencyGraph createProjectDependencyGraph( Collection<MavenProject> projects, MavenExecutionRequest request,
private ProjectDependencyGraph createProjectDependencyGraph( Collection<MavenProject> projects,
MavenExecutionRequest request,
MavenExecutionResult result, boolean trimming )
{
ProjectDependencyGraph projectDependencyGraph = null;

View File

@ -25,17 +25,11 @@
import java.util.List;
import java.util.Map;
import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout2;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.ArtifactProperties;
import org.eclipse.aether.artifact.ArtifactType;
@ -282,10 +276,10 @@ public static ArtifactHandler newHandler( Artifact artifact )
DefaultArtifactHandler handler = new DefaultArtifactHandler( type );
handler.setExtension( artifact.getExtension() );
handler.setLanguage( artifact.getProperty( ArtifactProperties.LANGUAGE, null ) );
handler.setAddedToClasspath( Boolean.parseBoolean( artifact.getProperty( ArtifactProperties.CONSTITUTES_BUILD_PATH,
"" ) ) );
handler.setIncludesDependencies( Boolean.parseBoolean( artifact.getProperty( ArtifactProperties.INCLUDES_DEPENDENCIES,
"" ) ) );
String addedToClasspath = artifact.getProperty( ArtifactProperties.CONSTITUTES_BUILD_PATH, "" );
handler.setAddedToClasspath( Boolean.parseBoolean( addedToClasspath ) );
String includesDependencies = artifact.getProperty( ArtifactProperties.INCLUDES_DEPENDENCIES, "" );
handler.setIncludesDependencies( Boolean.parseBoolean( includesDependencies ) );
return handler;
}

View File

@ -24,7 +24,6 @@
import java.util.List;
import java.util.Set;
import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.bridge.MavenRepositorySystem;

View File

@ -136,7 +136,8 @@ public class DefaultMavenPluginManager
private PluginDescriptorBuilder builder = new PluginDescriptorBuilder();
public synchronized PluginDescriptor getPluginDescriptor( Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session )
public synchronized PluginDescriptor getPluginDescriptor( Plugin plugin, List<RemoteRepository> repositories,
RepositorySystemSession session )
throws PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException
{
PluginDescriptorCache.Key cacheKey = pluginDescriptorCache.createKey( plugin, repositories, session );

View File

@ -846,7 +846,8 @@ public List<ArtifactRepository> getPluginArtifactRepositories()
public ArtifactRepository getDistributionManagementArtifactRepository()
{
return getArtifact().isSnapshot() && ( getSnapshotArtifactRepository() != null ) ? getSnapshotArtifactRepository()
return getArtifact().isSnapshot() && ( getSnapshotArtifactRepository() != null )
? getSnapshotArtifactRepository()
: getReleaseArtifactRepository();
}

View File

@ -121,9 +121,13 @@ public void addRepository( Repository repository )
}
@Override
public void addRepository(final Repository repository, boolean replace) throws InvalidRepositoryException {
if ( !repositoryIds.add( repository.getId() ) ) {
if ( !replace ) {
public void addRepository( final Repository repository, boolean replace )
throws InvalidRepositoryException
{
if ( !repositoryIds.add( repository.getId() ) )
{
if ( !replace )
{
return;
}
@ -137,7 +141,8 @@ public void addRepository(final Repository repository, boolean replace) throws I
if ( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT.equals( repositoryMerging ) )
{
repositories = remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories, true );
repositories = remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories,
true );
}
else
{
@ -148,10 +153,13 @@ public void addRepository(final Repository repository, boolean replace) throws I
}
}
private static void removeMatchingRepository(Iterable<RemoteRepository> repositories, final String id) {
Iterables.removeIf(repositories, new Predicate<RemoteRepository>() {
private static void removeMatchingRepository( Iterable<RemoteRepository> repositories, final String id )
{
Iterables.removeIf( repositories, new Predicate<RemoteRepository>()
{
@Override
public boolean apply(RemoteRepository remoteRepository) {
public boolean apply( RemoteRepository remoteRepository )
{
return remoteRepository.getId().equals( id );
}
} );

View File

@ -1,7 +1,5 @@
package org.apache.maven.properties.internal;
import java.util.Properties;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -21,6 +19,8 @@
* under the License.
*/
import java.util.Properties;
/**
* @since 3.2.3
*/

View File

@ -103,7 +103,7 @@ public class CLIManager
protected Options options;
@SuppressWarnings( "static-access" )
@SuppressWarnings( { "static-access", "checkstyle:linelength" } )
public CLIManager()
{
options = new Options();

View File

@ -38,30 +38,31 @@
*/
public final class CLIReportingUtils
{
// CHECKSTYLE_OFF: MagicNumber
public static final long MB = 1024 * 1024;
private static final long ONE_SECOND = 1000L;
private static final long ONE_MINUTE = 60 * ONE_SECOND;
private static final long ONE_HOUR = 60 * ONE_MINUTE;
private static final long ONE_DAY = 24 * ONE_HOUR;
// CHECKSTYLE_ON: MagicNumber
public static final String BUILD_VERSION_PROPERTY = "version";
public static String showVersion()
{
final String LS = System.getProperty( "line.separator" );
final String ls = System.getProperty( "line.separator" );
Properties properties = getBuildProperties();
StringBuilder version = new StringBuilder();
version.append( createMavenVersionString( properties ) ).append( LS );
version.append( createMavenVersionString( properties ) ).append( ls );
version.append( reduce( properties.getProperty( "distributionShortName" ) + " home: "
+ System.getProperty( "maven.home", "<unknown maven home>" ) ) ).append( LS );
+ System.getProperty( "maven.home", "<unknown maven home>" ) ) ).append( ls );
version.append( "Java version: " ).append(
System.getProperty( "java.version", "<unknown java version>" ) ).append( ", vendor: " ).append(
System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( LS );
version.append( "Java home: " ).append( System.getProperty( "java.home", "<unknown java home>" ) ).append( LS );
System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( ls );
version.append( "Java home: " ).append( System.getProperty( "java.home", "<unknown java home>" ) ).append( ls );
version.append( "Default locale: " ).append( Locale.getDefault() ).append( ", platform encoding: " ).append(
System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( LS );
System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( ls );
version.append( "OS name: \"" ).append( Os.OS_NAME ).append( "\", version: \"" ).append( Os.OS_VERSION ).append(
"\", arch: \"" ).append( Os.OS_ARCH ).append( "\", family: \"" ).append( Os.OS_FAMILY ).append( "\"" );
return version.toString();
@ -160,8 +161,10 @@ public static String formatTimestamp( long timestamp )
offset += tz.getDSTSavings();
}
// CHECKSTYLE_OFF: MagicNumber
long m = Math.abs( ( offset / ONE_MINUTE ) % 60 );
long h = Math.abs( ( offset / ONE_HOUR ) % 24 );
// CHECKSTYLE_ON: MagicNumber
int offsetDir = (int) Math.signum( (float) offset );
char offsetSign = offsetDir >= 0 ? '+' : '-';
@ -170,11 +173,13 @@ public static String formatTimestamp( long timestamp )
public static String formatDuration( long duration )
{
// CHECKSTYLE_OFF: MagicNumber
long ms = duration % 1000;
long s = ( duration / ONE_SECOND ) % 60;
long m = ( duration / ONE_MINUTE ) % 60;
long h = ( duration / ONE_HOUR ) % 24;
long d = duration / ONE_DAY;
// CHECKSTYLE_ON: MagicNumber
String format;
if ( d > 0 )

View File

@ -100,8 +100,10 @@ public class MavenCli
public static final String THREADS_DEPRECATED = "maven.threads.experimental";
@SuppressWarnings( "checkstyle:constantname" )
public static final String userHome = System.getProperty( "user.home" );
@SuppressWarnings( "checkstyle:constantname" )
public static final File userMavenConfigurationHome = new File( userHome, ".m2" );
public static final File DEFAULT_USER_SETTINGS_FILE = new File( userMavenConfigurationHome, "settings.xml" );
@ -266,8 +268,8 @@ private void cli( CliRequest cliRequest )
throws Exception
{
//
// Parsing errors can happen during the processing of the arguments and we prefer not having to check if the logger is null
// and construct this so we can use an SLF4J logger everywhere.
// Parsing errors can happen during the processing of the arguments and we prefer not having to check if
// the logger is null and construct this so we can use an SLF4J logger everywhere.
//
slf4jLogger = new Slf4jStdoutLogger();
@ -498,10 +500,9 @@ private void encryption( CliRequest cliRequest )
if ( passwd == null )
{
Console cons;
char[] password;
if ( ( cons = System.console() ) != null
&& ( password = cons.readPassword( "Master password: " ) ) != null )
Console cons = System.console();
char[] password = ( cons == null ) ? null : cons.readPassword( "Master password: " );
if ( password != null )
{
// Cipher uses Strings
passwd = String.copyValueOf( password );
@ -513,7 +514,8 @@ private void encryption( CliRequest cliRequest )
DefaultPlexusCipher cipher = new DefaultPlexusCipher();
System.out.println( cipher.encryptAndDecorate( passwd, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) );
System.out.println( cipher.encryptAndDecorate( passwd,
DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) );
throw new ExitException( 0 );
}
@ -523,10 +525,9 @@ else if ( cliRequest.commandLine.hasOption( CLIManager.ENCRYPT_PASSWORD ) )
if ( passwd == null )
{
Console cons;
char[] password;
if ( ( cons = System.console() ) != null
&& ( password = cons.readPassword( "Password: " ) ) != null )
Console cons = System.console();
char[] password = ( cons == null ) ? null : cons.readPassword( "Password: " );
if ( password != null )
{
// Cipher uses Strings
passwd = String.copyValueOf( password );
@ -569,7 +570,8 @@ else if ( cliRequest.commandLine.hasOption( CLIManager.ENCRYPT_PASSWORD ) )
private void repository( CliRequest cliRequest )
throws Exception
{
if ( cliRequest.commandLine.hasOption( CLIManager.LEGACY_LOCAL_REPOSITORY ) || Boolean.getBoolean( "maven.legacyLocalRepo" ) )
if ( cliRequest.commandLine.hasOption( CLIManager.LEGACY_LOCAL_REPOSITORY )
|| Boolean.getBoolean( "maven.legacyLocalRepo" ) )
{
cliRequest.request.setUseLegacyLocalRepository( true );
}
@ -687,7 +689,8 @@ private void logSummary( ExceptionSummary summary, Map<String, String> reference
{
String line = indent + lines[i].trim();
if ( i == lines.length - 1 && ( showErrors || ( summary.getException() instanceof InternalErrorException ) ) )
if ( ( i == lines.length - 1 )
&& ( showErrors || ( summary.getException() instanceof InternalErrorException ) ) )
{
slf4jLogger.error( line, summary.getException() );
}
@ -705,6 +708,7 @@ private void logSummary( ExceptionSummary summary, Map<String, String> reference
}
}
@SuppressWarnings( "checkstyle:methodlength" )
private void settings( CliRequest cliRequest )
throws Exception
{
@ -757,7 +761,8 @@ private void settings( CliRequest cliRequest )
eventSpyDispatcher.onEvent( settingsRequest );
slf4jLogger.debug( "Reading global settings from "
+ getSettingsLocation( settingsRequest.getGlobalSettingsSource(), settingsRequest.getGlobalSettingsFile() ) );
+ getSettingsLocation( settingsRequest.getGlobalSettingsSource(),
settingsRequest.getGlobalSettingsFile() ) );
slf4jLogger.debug( "Reading user settings from "
+ getSettingsLocation( settingsRequest.getUserSettingsSource(), settingsRequest.getUserSettingsFile() ) );
@ -1074,9 +1079,9 @@ else if ( commandLine.hasOption( CLIManager.ALSO_MAKE )
// Builder, concurrency and parallelism
//
// We preserve the existing methods for builder selection which is to look for various inputs in the threading
// configuration. We don't have an easy way to allow a pluggable builder to provide its own configuration parameters
// but this is sufficient for now. Ultimately we want components like Builders to provide a way to extend the command
// line to accept its own configuration parameters.
// configuration. We don't have an easy way to allow a pluggable builder to provide its own configuration
// parameters but this is sufficient for now. Ultimately we want components like Builders to provide a way to
// extend the command line to accept its own configuration parameters.
//
final String threadConfiguration = commandLine.hasOption( CLIManager.THREADS )
? commandLine.getOptionValue( CLIManager.THREADS )

View File

@ -216,9 +216,9 @@ private void logStats( MavenSession session )
Runtime r = Runtime.getRuntime();
long MB = 1024 * 1024;
long mb = 1024 * 1024;
logger.info( "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" + r.totalMemory() / MB + "M" );
logger.info( "Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / mb + "M/" + r.totalMemory() / mb + "M" );
}
@Override
@ -303,10 +303,12 @@ public void forkStarted( ExecutionEvent event )
}
}
// CHECKSTYLE_OFF: LineLength
/**
* <pre>&lt;&lt;&lt; mojo-artifactId:version:goal (mojo-executionId) &lt; :forked-goal @ project-artifactId &lt;&lt;&lt;</pre>
* <pre>&lt;&lt;&lt; mojo-artifactId:version:goal (mojo-executionId) &lt; [lifecycle]phase @ project-artifactId &lt;&lt;&lt;</pre>
*/
// CHECKSTYLE_ON: LineLength
@Override
public void forkSucceeded( ExecutionEvent event )
{

View File

@ -25,7 +25,8 @@
import org.slf4j.LoggerFactory;
/**
* Use an SLF4J {@link org.slf4j.ILoggerFactory} as a backing for a Plexus {@link org.codehaus.plexus.logging.LoggerManager},
* Use an SLF4J {@link org.slf4j.ILoggerFactory} as a backing for a Plexus
* {@link org.codehaus.plexus.logging.LoggerManager},
* ignoring Plexus logger API parts that are not classical and probably not really used.
*
* @author Jason van Zyl

View File

@ -39,6 +39,10 @@ under the License.
<tag>HEAD</tag>
</scm>
<properties>
<checkstyle.violation.ignore>FileLength</checkstyle.violation.ignore>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>

View File

@ -1,3 +1,4 @@
// CHECKSTYLE_OFF: RegexpHeader|LineLength
/**
* XML reader and writer classes for Maven POM, generated from <code>maven.mdo</code> model.
* These classes use

View File

@ -76,14 +76,17 @@
* Map<Object, Object> context )</code> for each model class</li>
* <li><code>merge<i>Classname</i>_<i>FieldName</i>( <i>Classname</i> target, <i>Classname</i> source, boolean
* sourceDominant, Map<Object, Object> context )</code> for each field of each model class</li>
* <li><code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code> for each class that is used in a list</li>
* <li><code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code>
* for each class that is used in a list</li>
* </ul>
* Code is written like it could be generated, with default behaviour to be overridden when necessary.
* This is particularly the case for <code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code> method,
* which by default return the object itself and is expected to be overridden to calculate better suited key value.
* This is particularly the case for <code>Object get<i>Classname</i>Key( <i>Classname</i> <i>classname</i> )</code>
* method, which by default return the object itself and is expected to be overridden to calculate better suited key
* value.
*
* @author Benjamin Bentmann
*/
@SuppressWarnings( { "checkstyle:methodname" } )
public class ModelMerger
{

View File

@ -1,3 +1,4 @@
// CHECKSTYLE_OFF: RegexpHeader
/**
* POM merger.
*/

View File

@ -1,3 +1,4 @@
// CHECKSTYLE_OFF: RegexpHeader
/**
* Maven POM (Project Object Model) classes, generated from <code>maven.mdo</code> model.
* The root class is {@link org.apache.maven.model.Model}.

View File

@ -180,14 +180,14 @@ private Settings readSettings( SettingsSource settingsSource, SettingsBuildingRe
}
catch ( SettingsParseException e )
{
problems.add( SettingsProblem.Severity.FATAL, "Non-parseable settings " + settingsSource.getLocation() + ": "
+ e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
problems.add( SettingsProblem.Severity.FATAL, "Non-parseable settings " + settingsSource.getLocation()
+ ": " + e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
return new Settings();
}
catch ( IOException e )
{
problems.add( SettingsProblem.Severity.FATAL, "Non-readable settings " + settingsSource.getLocation() + ": "
+ e.getMessage(), -1, -1, e );
problems.add( SettingsProblem.Severity.FATAL, "Non-readable settings " + settingsSource.getLocation()
+ ": " + e.getMessage(), -1, -1, e );
return new Settings();
}
@ -196,7 +196,8 @@ private Settings readSettings( SettingsSource settingsSource, SettingsBuildingRe
return settings;
}
private Settings interpolate( Settings settings, SettingsBuildingRequest request, SettingsProblemCollector problems )
private Settings interpolate( Settings settings, SettingsBuildingRequest request,
SettingsProblemCollector problems )
{
StringWriter writer = new StringWriter( 1024 * 4 );

View File

@ -28,8 +28,10 @@
@Deprecated
public class RuntimeInfo
{
@SuppressWarnings( "checkstyle:constantname" )
public static final String userHome = System.getProperty( "user.home" );
@SuppressWarnings( "checkstyle:constantname" )
public static final File userMavenConfigurationHome = new File( userHome, ".m2" );
public static final File DEFAULT_USER_SETTINGS_FILE = new File( userMavenConfigurationHome, "settings.xml" );