You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2008/08/06 13:17:39 UTC
svn commit: r683226 -
/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/
Author: vsiveton
Date: Wed Aug 6 04:17:38 2008
New Revision: 683226
URL: http://svn.apache.org/viewvc?rev=683226&view=rev
Log:
o code readingness
Modified:
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ExpressionsMojo.java
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/SystemMojo.java
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java Wed Aug 6 04:17:38 2008
@@ -40,6 +40,10 @@
public class ActiveProfilesMojo
extends AbstractHelpMojo
{
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
/**
* This is the list of projects currently slated to be built by Maven.
*
@@ -49,6 +53,10 @@
*/
private List projects;
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException
@@ -94,6 +102,10 @@
}
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* Method to get the active profiles for the project
*
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java Wed Aug 6 04:17:38 2008
@@ -56,6 +56,10 @@
public class AllProfilesMojo
extends AbstractHelpMojo
{
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
/**
* This is the list of projects currently slated to be built by Maven.
*
@@ -74,6 +78,10 @@
*/
private MavenSession session;
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException, MojoFailureException
@@ -175,6 +183,10 @@
}
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* Loads up external Profiles using <code>profiles.xml</code> (if any) located in the current
* project's <code>${basedir}</code>.
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java Wed Aug 6 04:17:38 2008
@@ -70,53 +70,9 @@
public class DescribeMojo
extends AbstractHelpMojo
{
- /**
- * The Maven Plugin to describe. This must be specified in one of three ways:
- * <br/>
- * <ol>
- * <li>plugin-prefix, i.e. 'help'</li>
- * <li>groupId:artifactId, i.e. 'org.apache.maven.plugins:maven-help-plugin'</li>
- * <li>groupId:artifactId:version, i.e. 'org.apache.maven.plugins:maven-help-plugin:2.0'</li>
- * </ol>
- *
- * @parameter expression="${plugin}" alias="prefix"
- */
- private String plugin;
-
- /**
- * The Maven Plugin <code>groupId</code> to describe.
- * <br/>
- * <b>Note</b>: Should be used with <code>artifactId</code> parameter.
- *
- * @parameter expression="${groupId}"
- */
- private String groupId;
-
- /**
- * The Maven Plugin <code>artifactId</code> to describe.
- * <br/>
- * <b>Note</b>: Should be used with <code>groupId</code> parameter.
- *
- * @parameter expression="${artifactId}"
- */
- private String artifactId;
-
- /**
- * The Maven Plugin <code>version</code> to describe.
- * <br/>
- * <b>Note</b>: Should be used with <code>groupId/artifactId</code> parameters.
- *
- * @parameter expression="${version}"
- */
- private String version;
-
- /**
- * The goal name of a Mojo to describe within the specified Maven Plugin.
- * If this parameter is specified, only the corresponding Mojo (goal) will be described, rather than the whole Plugin.
- *
- * @parameter expression="${mojo}"
- */
- private String mojo;
+ // ----------------------------------------------------------------------
+ // Mojo components
+ // ----------------------------------------------------------------------
/**
* The Plugin manager instance used to resolve Plugin descriptors.
@@ -134,6 +90,10 @@
*/
private MavenProjectBuilder projectBuilder;
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
/**
* The current project, if there is one. This is listed as optional, since
* the help plugin should be able to function on its own. If this
@@ -176,6 +136,54 @@
private ArtifactRepository localRepository;
/**
+ * The Maven Plugin to describe. This must be specified in one of three ways:
+ * <br/>
+ * <ol>
+ * <li>plugin-prefix, i.e. 'help'</li>
+ * <li>groupId:artifactId, i.e. 'org.apache.maven.plugins:maven-help-plugin'</li>
+ * <li>groupId:artifactId:version, i.e. 'org.apache.maven.plugins:maven-help-plugin:2.0'</li>
+ * </ol>
+ *
+ * @parameter expression="${plugin}" alias="prefix"
+ */
+ private String plugin;
+
+ /**
+ * The Maven Plugin <code>groupId</code> to describe.
+ * <br/>
+ * <b>Note</b>: Should be used with <code>artifactId</code> parameter.
+ *
+ * @parameter expression="${groupId}"
+ */
+ private String groupId;
+
+ /**
+ * The Maven Plugin <code>artifactId</code> to describe.
+ * <br/>
+ * <b>Note</b>: Should be used with <code>groupId</code> parameter.
+ *
+ * @parameter expression="${artifactId}"
+ */
+ private String artifactId;
+
+ /**
+ * The Maven Plugin <code>version</code> to describe.
+ * <br/>
+ * <b>Note</b>: Should be used with <code>groupId/artifactId</code> parameters.
+ *
+ * @parameter expression="${version}"
+ */
+ private String version;
+
+ /**
+ * The goal name of a Mojo to describe within the specified Maven Plugin.
+ * If this parameter is specified, only the corresponding Mojo (goal) will be described, rather than the whole Plugin.
+ *
+ * @parameter expression="${mojo}"
+ */
+ private String mojo;
+
+ /**
* This flag specifies that full (verbose) information should be given.
*
* @parameter expression="${full}" default-value="false"
@@ -200,6 +208,10 @@
*/
private String cmd;
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException, MojoFailureException
@@ -245,6 +257,10 @@
writeDescription( descriptionBuffer );
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* Method to write the Mojo description into the output file
*
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java Wed Aug 6 04:17:38 2008
@@ -42,6 +42,10 @@
public class EffectivePomMojo
extends AbstractHelpMojo
{
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
/**
* The Maven project.
*
@@ -62,6 +66,10 @@
*/
private List projects;
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException
@@ -123,6 +131,10 @@
}
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* Method for displaying the effective pom information of the current build
*
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java Wed Aug 6 04:17:38 2008
@@ -42,6 +42,10 @@
public class EffectiveSettingsMojo
extends AbstractHelpMojo
{
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
/**
* The system settings for Maven. This is the instance resulting from
* merging global- and user-level settings files.
@@ -60,6 +64,10 @@
*/
private boolean showPasswords;
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException
@@ -116,6 +124,10 @@
}
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* Hide proxy and server passwords.
*
@@ -150,7 +162,7 @@
* @param settings could be null
* @return a new instance of settings or null if settings was null.
*/
- public static Settings copySettings( Settings settings )
+ private static Settings copySettings( Settings settings )
{
if ( settings == null )
{
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ExpressionsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ExpressionsMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ExpressionsMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/ExpressionsMojo.java Wed Aug 6 04:17:38 2008
@@ -47,6 +47,10 @@
{
private static final String NO_DESCRIPTION_AVAILABLE = "No description available.";
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException, MojoFailureException
@@ -106,6 +110,10 @@
}
}
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+
/**
* @return the value of the private static field <code>ExpressionDocumenter#EXPRESSION_ROOTS</code>.
* @throws MojoFailureException if any reflection exceptions occur
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/SystemMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/SystemMojo.java?rev=683226&r1=683225&r2=683226&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/SystemMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/SystemMojo.java Wed Aug 6 04:17:38 2008
@@ -40,6 +40,10 @@
public class SystemMojo
extends AbstractHelpMojo
{
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException