You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:36:12 UTC
[maven-help-plugin] 31/35: o Fix errors reported by Checkstyle.
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to annotated tag maven-help-plugin-2.0.2
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
commit 09e2a484ddcb28b629e9e13217180974a1ed3daa
Author: Dennis Lundberg <de...@apache.org>
AuthorDate: Sun Nov 11 23:32:46 2007 +0000
o Fix errors reported by Checkstyle.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-help-plugin@593992 13f79535-47bb-0310-9956-ffa450edef68
---
.../maven/plugins/help/ActiveProfilesMojo.java | 6 ++--
.../apache/maven/plugins/help/DescribeMojo.java | 36 +++++++++-------------
2 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java b/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java
index 2daa5b8..1bbb64d 100644
--- a/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java
@@ -101,7 +101,7 @@ public class ActiveProfilesMojo extends AbstractMojo
{
File dir = output.getParentFile();
- if( !dir.exists() )
+ if ( !dir.exists() )
{
dir.mkdirs();
}
@@ -149,7 +149,7 @@ public class ActiveProfilesMojo extends AbstractMojo
message.append( "Active Profiles for Project \'" + project.getId() + "\': \n\n" );
- if( profiles == null || profiles.isEmpty() )
+ if ( profiles == null || profiles.isEmpty() )
{
message.append( "There are no active profiles." );
}
@@ -163,7 +163,7 @@ public class ActiveProfilesMojo extends AbstractMojo
message.append( "\n - " )
.append( profile.getId() )
- .append(" (source: " )
+ .append( " (source: " )
.append( profile.getSource() ).append( ")" );
}
diff --git a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
index f102477..b2d1e6e 100644
--- a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
@@ -323,18 +323,18 @@ public class DescribeMojo
}
catch ( ArtifactResolutionException e )
{
- throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId +
- "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
+ throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId
+ + "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
}
catch ( PluginManagerException e )
{
- throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId +
- "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
+ throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId
+ + "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
}
catch ( PluginVersionResolutionException e )
{
- throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId +
- "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
+ throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId
+ + "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
}
catch ( ArtifactNotFoundException e )
{
@@ -342,13 +342,13 @@ public class DescribeMojo
}
catch ( InvalidVersionSpecificationException e )
{
- throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId +
- "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
+ throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId
+ + "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
}
catch ( InvalidPluginException e )
{
- throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId +
- "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
+ throw new MojoExecutionException( "Error retrieving plugin descriptor for:\n\ngroupId: \'" + groupId
+ + "\'\nartifactId: \'" + artifactId + "\'\nversion: \'" + version + "\'\n\n", e );
}
catch ( PluginNotFoundException e )
{
@@ -364,8 +364,8 @@ public class DescribeMojo
if ( descriptor == null )
{
- throw new MojoFailureException(
- "Plugin could not be found. If you believe it is correct, check your pluginGroups setting, and run with -U to update the remote configuration" );
+ throw new MojoFailureException( "Plugin could not be found. If you believe it is correct,"
+ + " check your pluginGroups setting, and run with -U to update the remote configuration" );
}
return descriptor;
@@ -389,28 +389,20 @@ public class DescribeMojo
switch ( pluginParts.length )
{
case ( 1 ):
- {
pi.prefix = pluginParts[0];
break;
- }
case ( 2 ):
- {
pi.groupId = pluginParts[0];
pi.artifactId = pluginParts[1];
break;
- }
case ( 3 ):
- {
pi.groupId = pluginParts[0];
pi.artifactId = pluginParts[1];
pi.version = pluginParts[2];
break;
- }
default:
- {
throw new MojoFailureException(
"plugin parameter must be a plugin prefix, or conform to: 'groupId:artifactId[:version]." );
- }
}
}
else
@@ -461,7 +453,7 @@ public class DescribeMojo
{
MojoDescriptor md = (MojoDescriptor) it.next();
- if( full )
+ if ( full )
{
buffer.append( line );
buffer.append( "\nGoal: \'" ).append( md.getGoal() ).append( '\'' );
@@ -554,7 +546,7 @@ public class DescribeMojo
{
buffer.append( "\nDescription:\n" );
prettyAppend( formatDescription( md.getDescription() ), buffer );
- if( fullDescription )
+ if ( fullDescription )
{
buffer.append( "\n" );
}
--
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.