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 2008/07/11 17:42:49 UTC

svn commit: r675992 - in /maven/enforcer/trunk: enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/ enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/ maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/

Author: hboutemy
Date: Fri Jul 11 08:42:48 2008
New Revision: 675992

URL: http://svn.apache.org/viewvc?rev=675992&view=rev
Log:
o improved javadoc
o removed unused imports

Modified:
    maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java
    maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java
    maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractNonCacheableEnforcerRule.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DefaultEnforcementRuleHelper.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EnforcerExpressionEvaluator.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EvaluateBeanshell.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/NoSnapshots.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireActiveProfile.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireMavenVersion.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireNoRepositories.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java
    maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java
    maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java
    maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceOnceMojo.java

Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java Fri Jul 11 08:42:48 2008
@@ -21,14 +21,14 @@
 import org.apache.maven.plugin.MojoExecutionException;
 
 /**
- * Inteface to be implemented by any rules executed by the enforcer.
+ * Interface to be implemented by any rules executed by the enforcer.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$
  */
 public interface EnforcerRule
 {
-    
+
     /**
      * This is the interface into the rule. This method should throw an exception
      * containing a reason message if the rule fails the check. The plugin will
@@ -36,35 +36,35 @@
      * message as a warning.
      * 
      * @param helper The helper provides access to the log, MavenSession and has
-     * helpers to get at common components. It is also able to look
-     * up components by class name.
+     * helpers to get common components. It is also able to lookup components
+     * by class name.
      * 
      * @throws MojoExecutionException
      * @throws EnforcerRuleException the enforcer rule exception
      */
     public void execute( EnforcerRuleHelper helper )
         throws EnforcerRuleException;
-    
+
     /**
      * This method tells the enforcer if the rule results may be cached. If the result is true,
      * the results will be remembered for future executions in the same build (ie children). Subsequent
      * iterations of the rule will be queried to see if they are also cacheable. This will allow the rule to be
      * uncached further down the tree if needed.
      * 
-     * @return true, if checks if is cacheable
+     * @return <code>true</code> if rule is cacheable
      */
     public boolean isCacheable();
-    
+
     /**
-     * Checks if is result valid.
+     * Checks if cached result is valid.
      * 
      * @param cachedRule the last cached instance of the rule. This is to be used by the rule to
      * potentially determine if the results are still valid (ie if the configuration has been overridden)
      * 
-     * @return true if the stored results are valid for the same id.
+     * @return <code>true</code> if the stored results are valid for the same id.
      */
     public boolean isResultValid(EnforcerRule cachedRule);
-    
+
     /**
      * If the rule is to be cached, this id is used as part of the key. This can allow rules to take parameters
      * that allow multiple results of the same rule to be cached.
@@ -73,6 +73,5 @@
      * within a given rule implementation as the full key will be [classname]-[id]
      */
     public String getCacheId();
-    
 
 }

Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleException.java Fri Jul 11 08:42:48 2008
@@ -20,7 +20,7 @@
 
 
 /**
- * An exception occuring during the execution of a rule. Based off of
+ * An exception occurring during the execution of a rule. Based off of
  * EnforcerRuleException, but separated to keep the rule dependencies to a
  * minimum.
  * 

Modified: maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java (original)
+++ maven/enforcer/trunk/enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java Fri Jul 11 08:42:48 2008
@@ -33,13 +33,12 @@
  * rules.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- * @version $Id: EnforcerRuleHelper.java 571673 2007-09-01
- * 03:04:24Z brianf $
+ * @version $Id$
  */
 public interface EnforcerRuleHelper
     extends ExpressionEvaluator
 {
-    
+
     /**
      * Gets the log.
      * 
@@ -112,7 +111,7 @@
      */
     public List getComponentList ( String role )
         throws ComponentLookupException;
-    
+
     /**
      * Gets the container.
      * 

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java Fri Jul 11 08:42:48 2008
@@ -22,7 +22,6 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.enforcer.rule.api.EnforcerRule;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
 import org.apache.maven.plugin.logging.Log;
@@ -78,8 +77,7 @@
         // look for banned dependencies
         Set foundExcludes = checkDependencies( dependencies, helper.getLog() );
 
-        // if any are found, fail the check but list all of
-        // them
+        // if any are found, fail the check but list all of them
         if ( foundExcludes != null && !foundExcludes.isEmpty() )
         {
             StringBuffer buf = new StringBuffer();

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractNonCacheableEnforcerRule.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractNonCacheableEnforcerRule.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractNonCacheableEnforcerRule.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractNonCacheableEnforcerRule.java Fri Jul 11 08:42:48 2008
@@ -24,7 +24,8 @@
  * The Class AbstractNonCacheableEnforcerRule. This is to be used by rules
  * that don't need caching...it saves implementing a bunch of methods.
  * 
- * @author brianf
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @version $Id: $
  */
 abstract public class AbstractNonCacheableEnforcerRule
     extends AbstractStandardEnforcerRule

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractRequireFiles.java Fri Jul 11 08:42:48 2008
@@ -28,7 +28,7 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class AbstractRequireFiles.
+ * Contains the common code to compare an array of files against a requirement.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
@@ -41,10 +41,10 @@
 
     // check the file for the specific condition
     /**
-     * Check file.
+     * Check one file.
      * 
      * @param file the file
-     * @return true, if successful
+     * @return <code>true</code> if successful
      */
     abstract boolean checkFile( File file );
 
@@ -74,8 +74,7 @@
             }
         }
 
-        // if anything was found, log it then append the
-        // optional message.
+        // if anything was found, log it with the optional message.
         if ( !failures.isEmpty() )
         {
             StringBuffer buf = new StringBuffer();
@@ -135,7 +134,7 @@
      * things, a given rule may be executed more than once for the same project. This means that even things that change
      * from project to project may still be cacheable in certain instances.
      * 
-     * @return true, if checks if is cacheable
+     * @return <code>true</code> if rule is cacheable
      */
     public boolean isCacheable()
     {
@@ -148,10 +147,10 @@
      * the results of objects returned by the helper need to be queried. You may for example, store certain objects in
      * your rule and then query them later.
      * 
-     * @param arg0 the arg0
-     * @return true, if checks if is result valid
+     * @param cachedRule the cached rule
+     * @return <code>true</code> if the stored results are valid for the same id.
      */
-    public boolean isResultValid( EnforcerRule arg0 )
+    public boolean isResultValid( EnforcerRule cachedRule )
     {
         return true;
     }

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java Fri Jul 11 08:42:48 2008
@@ -32,7 +32,7 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * Containts the common code to compare a version against a version range.
+ * Contains the common code to compare a version against a version range.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$
@@ -42,9 +42,9 @@
 {
 
     /**
-     * Specify the required version. Some examples are
+     * Specify the required version. Some examples are:
      * <ul>
-     * <li><code>2.0.4</code> Version 2.0.4</li>
+     * <li><code>2.0.4</code> Version 2.0.4 and higher (different from Maven meaning)</li>
      * <li><code>[2.0,2.1)</code> Versions 2.0 (included) to 2.1 (not included)</li>
      * <li><code>[2.0,2.1]</code> Versions 2.0 to 2.1 (both included)</li>
      * <li><code>[2.0.5,)</code> Versions 2.0.5 and higher</li>
@@ -76,7 +76,7 @@
             VersionRange vr;
             String msg = "Detected " + variableName + " Version: " + actualVersion;
 
-            // stort circuit check if the strings are exactly equal
+            // short circuit check if the strings are exactly equal
             if ( actualVersion.toString().equals( requiredVersionRange ) )
             {
                 log.debug( msg + " is allowed in the range " + requiredVersionRange + "." );
@@ -187,9 +187,9 @@
     }
 
     /**
-     * Gets the version.
+     * Gets the required version.
      * 
-     * @return the version
+     * @return the required version
      */
     public String getVersion()
     {
@@ -197,9 +197,9 @@
     }
 
     /**
-     * Sets the version.
+     * Sets the required version.
      * 
-     * @param theVersion the version to set
+     * @param theVersion the required version to set
      */
     public void setVersion( String theVersion )
     {

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java Fri Jul 11 08:42:48 2008
@@ -43,14 +43,14 @@
 {
 
     /**
-     * Specify the banned dependencies. This can be a list of artifacts in the format groupId[:artifactId][:version] Any
-     * of the sections can be a wildcard by using '*' (ie group:*:1.0) <br>
-     * The rule will fail if any dependencies match any exclude, unless it also matches an include rule.
+     * Specify the banned dependencies. This can be a list of artifacts in the format <code>groupId[:artifactId][:version]</code>.
+     * Any of the sections can be a wildcard by using '*' (ie group:*:1.0) <br>
+     * The rule will fail if any dependency matches any exclude, unless it also matches an include rule.
      */
     public List excludes = null;
 
     /**
-     * Specify the allowed dependencies. This can be a list of artifacts in the format groupId[:artifactId][:version]
+     * Specify the allowed dependencies. This can be a list of artifacts in the format <code>groupId[:artifactId][:version]</code>.
      * Any of the sections can be a wildcard by using '*' (ie group:*:1.0) <br>
      * Includes override the exclude rules. It is meant to allow wide exclusion rules with wildcards and still allow a
      * smaller set of includes. <br>
@@ -85,9 +85,9 @@
     /**
      * Checks the set of dependencies against the list of patterns.
      * 
-     * @param thePatterns the the patterns
+     * @param thePatterns the patterns
      * @param dependencies the dependencies
-     * @return the sets the
+     * @return a set containing artifacts matching one of the patterns or <code>null</code>
      * @throws EnforcerRuleException the enforcer rule exception
      */
     private Set checkDependencies( Set dependencies, List thePatterns )
@@ -106,10 +106,10 @@
                 String[] subStrings = pattern.split( ":" );
                 subStrings = StringUtils.stripAll( subStrings );
 
-                Iterator DependencyIter = dependencies.iterator();
-                while ( DependencyIter.hasNext() )
+                Iterator dependencyIter = dependencies.iterator();
+                while ( dependencyIter.hasNext() )
                 {
-                    Artifact artifact = (Artifact) DependencyIter.next();
+                    Artifact artifact = (Artifact) dependencyIter.next();
 
                     if ( compareDependency( subStrings, artifact ) )
                     {
@@ -129,9 +129,9 @@
     /**
      * Compares the parsed array of substrings against the artifact.
      * 
-     * @param pattern the pattern
+     * @param pattern the array of patterns
      * @param artifact the artifact
-     * @return true, if compare dependency
+     * @return <code>true</code> if the artifact matches one of the patterns
      * @throws EnforcerRuleException the enforcer rule exception
      */
     protected boolean compareDependency( String[] pattern, Artifact artifact )
@@ -151,8 +151,7 @@
 
         if ( result && pattern.length > 2 )
         {
-            // short circuit if the versions are exactly the
-            // same
+            // short circuit if the versions are exactly the same
             if ( pattern[2].equals( "*" ) || artifact.getVersion().equals( pattern[2] ) )
             {
                 result = true;
@@ -173,7 +172,6 @@
         }
 
         return result;
-
     }
 
     /**

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DefaultEnforcementRuleHelper.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DefaultEnforcementRuleHelper.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DefaultEnforcementRuleHelper.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DefaultEnforcementRuleHelper.java Fri Jul 11 08:42:48 2008
@@ -32,8 +32,8 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * Default implementation of the EnforcementRuleHelper interface. This is used to help retreive information from the
- * session and provide usefull elements like the log.
+ * Default implementation of the EnforcementRuleHelper interface. This is used to help retrieve information from the
+ * session and provide useful elements like the log.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EnforcerExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EnforcerExpressionEvaluator.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EnforcerExpressionEvaluator.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EnforcerExpressionEvaluator.java Fri Jul 11 08:42:48 2008
@@ -27,10 +27,10 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class EnforcerExpressionEvaluator.
+ * The Class EnforcerExpressionEvaluator. This class wraps the PluginParameterExpressionEvaluator
+ * because it can't be accessed directly in 2.0.x so we must create a new one.
  * 
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a> This class wraps the PluginParameterExpressionEvaluator
- *         because it can't be accessed directly in 2.0.x so we must create a new one.
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
 public class EnforcerExpressionEvaluator
     extends PluginParameterExpressionEvaluator

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EvaluateBeanshell.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EvaluateBeanshell.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EvaluateBeanshell.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/EvaluateBeanshell.java Fri Jul 11 08:42:48 2008
@@ -29,9 +29,9 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class EvaluateBeanshell.
+ * Rule for Maven Enforcer using Beanshell to evaluate a conditional expression.
  * 
- * @author hugonnem Rule for Maven Enforcer using Beanshell to evaluate a conditional expression
+ * @author hugonnem
  */
 public class EvaluateBeanshell
     extends AbstractNonCacheableEnforcerRule

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/NoSnapshots.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/NoSnapshots.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/NoSnapshots.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/NoSnapshots.java Fri Jul 11 08:42:48 2008
@@ -25,7 +25,7 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * This rule is deprecated. Use requireReleaseVersions
+ * This rule is deprecated. Use requireReleaseVersions.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireActiveProfile.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireActiveProfile.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireActiveProfile.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireActiveProfile.java Fri Jul 11 08:42:48 2008
@@ -31,9 +31,9 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class RequireActiveProfile.
+ * This rule checks that some profiles are active.
  * 
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a> This rule checks that the current project is not a snapshot
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
 public class RequireActiveProfile
     extends AbstractNonCacheableEnforcerRule
@@ -113,11 +113,11 @@
     }
 
     /**
-     * Checks if is profile active.
+     * Checks if profile is active.
      * 
      * @param project the project
      * @param profileName the profile name
-     * @return true, if is profile active
+     * @return <code>true</code> if profile is active
      */
     protected boolean isProfileActive( MavenProject project, String profileName )
     {

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireMavenVersion.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireMavenVersion.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireMavenVersion.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireMavenVersion.java Fri Jul 11 08:42:48 2008
@@ -26,7 +26,7 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * This rule checks that the Maven version is allowd.
+ * This rule checks that the Maven version is allowed.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireNoRepositories.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireNoRepositories.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireNoRepositories.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireNoRepositories.java Fri Jul 11 08:42:48 2008
@@ -37,7 +37,7 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class RequireNoRepositories.
+ * This rule checks that this pom or its parents don't define a repository.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java Fri Jul 11 08:42:48 2008
@@ -45,7 +45,7 @@
 
     /**
      * The OS family type desired<br />
-     * Possible values:<br />
+     * Possible values:
      * <ul>
      * <li>dos</li>
      * <li>mac</li>
@@ -57,17 +57,17 @@
      * <li>win9x</li>
      * <li>z/os</li>
      * <li>os/400</li>
-     * </ul>.
+     * </ul>
      */
     public String family = null;
 
-    /** Runtime information containing Maven Version. */
+    /** The OS name desired. */
     public String name = null;
 
-    /** Runtime information containing Maven Version. */
+    /** The OS version desired. */
     public String version = null;
 
-    /** Runtime information containing Maven Version. */
+    /** The OS architecture desired. */
     public String arch = null;
 
     /** Specify an optional message to the user if the rule fails. */
@@ -77,7 +77,7 @@
     public boolean display = false;
 
     /**
-     * Instantiates a new require os.
+     * Instantiates a new RequireOS.
      */
     public RequireOS()
     {
@@ -97,8 +97,7 @@
 
         if ( allParamsEmpty() )
         {
-            throw new EnforcerRuleException(
-                                             "All parameters can not be empty. You must pick at least one of (family, name, version, arch) or use -Denforcer.os.display=true to see the current OS information." );
+            throw new EnforcerRuleException( "All parameters can not be empty. You must pick at least one of (family, name, version, arch) or use -Denforcer.os.display=true to see the current OS information." );
         }
 
         if ( isValidFamily( this.family ) )

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequirePluginVersions.java Fri Jul 11 08:42:48 2008
@@ -39,7 +39,6 @@
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.enforcer.rule.api.EnforcerRule;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
 import org.apache.maven.execution.MavenSession;
@@ -71,11 +70,10 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class RequirePluginVersions.
+ *  This rule will enforce that all plugins specified in the poms have a version declared.
  * 
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- * @version $Id$ This rule will enforce that all plugins
- *          specified in the poms have a version declared.
+ * @version $Id$
  */
 public class RequirePluginVersions
     extends AbstractNonCacheableEnforcerRule
@@ -102,7 +100,7 @@
     /**
      * Additional plugins to enforce have versions. These are plugins that may not be in the poms but are used anyway,
      * like help, eclipse etc. <br>
-     * The plugins should be specified in the form: group:artifactId.
+     * The plugins should be specified in the form: <code>group:artifactId</code>.
      */
     public List additionalPlugins;
 
@@ -149,8 +147,7 @@
         MavenProject project;
         try
         {
-            // get the various expressions out of the
-            // helper.
+            // get the various expressions out of the helper.
             project = (MavenProject) helper.evaluate( "${project}" );
             LifecycleExecutor life;
             life = (LifecycleExecutor) helper.getComponent( LifecycleExecutor.class );
@@ -163,12 +160,10 @@
 
             utils = new EnforcerRuleUtils( helper );
 
-            // get all the plugins that are bound to the
-            // specified lifecycles
+            // get all the plugins that are bound to the specified lifecycles
             Set allPlugins = getBoundPlugins( life, project, phases );
 
-            // insert any additional Plugins specified by
-            // the user.
+            // insert any additional plugins specified by the user.
             allPlugins = addAdditionalPlugins( allPlugins, additionalPlugins );
             allPlugins.addAll( getProfilePlugins( project ) );
 
@@ -183,12 +178,10 @@
                 log.debug( "All Plugins in use: " + allPlugins );
             }
 
-            // get all the plugins that are mentioned in the
-            // pom (and parents)
+            // get all the plugins that are mentioned in the pom (and parents)
             List plugins = getAllPluginEntries( project );
 
-            // now look for the versions that aren't valid
-            // and add to a list.
+            // now look for the versions that aren't valid and add to a list.
             ArrayList failures = new ArrayList();
             Iterator iter = allPlugins.iterator();
             while ( iter.hasNext() )
@@ -200,8 +193,7 @@
                 }
             }
 
-            // if anything was found, log it then append the
-            // optional message.
+            // if anything was found, log it then append the optional message.
             if ( !failures.isEmpty() )
             {
                 StringBuffer newMsg = new StringBuffer();
@@ -249,10 +241,8 @@
                     }
                     catch ( Exception e )
                     {
-                        // lots can go wrong here. Don't
-                        // allow any issues trying to
-                        // determine the issue
-                        // stop me
+                        // lots can go wrong here. Don't allow any issues trying to
+                        // determine the issue stop me
                         log.debug( "Exception while determining plugin Version.", e );
                         newMsg.append( ". Unable to determine the plugin version." );
                     }
@@ -332,8 +322,7 @@
                     plugin.setGroupId( pluginStrings[0] );
                     plugin.setArtifactId( pluginStrings[1] );
 
-                    // only add this if it's not already
-                    // there.
+                    // only add this if it's not already there.
                     if ( existing == null )
                     {
                         existing = new HashSet();
@@ -387,9 +376,9 @@
     /**
      * Given a plugin, this will retrieve the matching plugin artifact from the model.
      * 
-     * @param plugin to lookup
-     * @param project to search
-     * @return matching plugin, null if not found. matching plugin, null if not found.
+     * @param plugin plugin to lookup
+     * @param project project to search
+     * @return matching plugin, <code>null</code> if not found.
      */
     protected Plugin findCurrentPlugin( Plugin plugin, MavenProject project )
     {
@@ -458,8 +447,7 @@
     protected Set getBoundPlugins( LifecycleExecutor life, MavenProject project, String thePhases )
         throws PluginNotFoundException, LifecycleExecutionException, IllegalAccessException
     {
-        // I couldn't find a direct way to get at the
-        // lifecycles list.
+        // I couldn't find a direct way to get at the lifecycles list.
         lifecycles = (List) ReflectionUtils.getValueIncludingSuperclasses( "lifecycles", life );
 
         Set allPlugins = new HashSet();
@@ -480,8 +468,7 @@
                 {
                     // i'm going to swallow this because the
                     // user may have declared a phase that
-                    // doesn't
-                    // exist for every module.
+                    // doesn't exist for every module.
                 }
             }
         }
@@ -513,8 +500,7 @@
                 source.getGroupId().equals( plugin.getGroupId() ) )
             {
                 found = true;
-                // found the entry. now see if the version
-                // is specified
+                // found the entry. now see if the version is specified
                 String version = plugin.getVersion();
                 try
                 {

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireProperty.java Fri Jul 11 08:42:48 2008
@@ -18,11 +18,9 @@
  */
 package org.apache.maven.plugins.enforcer;
 
-import org.apache.maven.enforcer.rule.api.EnforcerRule;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
 import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
-import org.codehaus.plexus.util.StringUtils;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -37,7 +35,7 @@
     /** Specify the required property. */
     public String property = null;
 
-    /** Match the property value to a given regular expresssion. Defaults to null (any value is ok). */
+    /** Match the property value to a given regular expression. Defaults to <code>null</code> (any value is ok). */
     public String regex = null;
 
     /** Specify a warning message if the regular expression is not matched. */

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java Fri Jul 11 08:42:48 2008
@@ -81,11 +81,11 @@
     }
 
     /**
-     * Checks the set of dependencies to see if any snapshots are included
+     * Checks the set of dependencies to see if any snapshots are included.
      * 
-     * @param dependencies the dependencies
+     * @param dependencies the dependencies to check
      * @param log the log
-     * @return the sets the
+     * @return a set containing snapshot artifacts found
      * @throws EnforcerRuleException the enforcer rule exception
      */
     protected Set checkDependencies( Set dependencies, Log log )
@@ -93,10 +93,10 @@
     {
         Set foundExcludes = new HashSet();
 
-        Iterator DependencyIter = dependencies.iterator();
-        while ( DependencyIter.hasNext() )
+        Iterator dependencyIter = dependencies.iterator();
+        while ( dependencyIter.hasNext() )
         {
-            Artifact artifact = (Artifact) DependencyIter.next();
+            Artifact artifact = (Artifact) dependencyIter.next();
 
             if ( artifact.isSnapshot() )
             {

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java (original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java Fri Jul 11 08:42:48 2008
@@ -25,9 +25,9 @@
 
 // TODO: Auto-generated Javadoc
 /**
- * The Class RequireReleaseVersion.
+ * This rule checks that the current project is not a snapshot.
  * 
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a> This rule checks that the current project is not a snapshot
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
 public class RequireReleaseVersion
     extends AbstractNonCacheableEnforcerRule

Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java (original)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java Fri Jul 11 08:42:48 2008
@@ -34,12 +34,11 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 
 /**
- * This goal displays the current platform information
+ * This goal displays the current platform information.
  * 
  * @goal display-info
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- * @version $Id: EnforceMojo.java 523156 2007-03-28
- *          03:53:54Z brianf $
+ * @version $Id$
  */
 public class DisplayInfoMojo
     extends AbstractMojo
@@ -92,8 +91,7 @@
                                                                                     container );
             RuntimeInformation rti = (RuntimeInformation) helper.getComponent( RuntimeInformation.class );
             getLog().info( "Maven Version: " + rti.getApplicationVersion() );
-            getLog().info(
-                           "JDK Version: " + SystemUtils.JAVA_VERSION + " normalized as: "
+            getLog().info( "JDK Version: " + SystemUtils.JAVA_VERSION + " normalized as: "
                                + RequireJavaVersion.normalizeJDKVersion( SystemUtils.JAVA_VERSION_TRIMMED ) );
             RequireOS os = new RequireOS();
             os.displayOSInfo( getLog(), true );

Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java (original)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceMojo.java Fri Jul 11 08:42:48 2008
@@ -44,10 +44,9 @@
  * 
  * @requiresDependencyResolution test
  * @goal enforce
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @phase validate
- * @version $Id: EnforceMojo.java 571676 2007-09-01
- *          03:28:56Z brianf $
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @version $Id$
  */
 public class EnforceMojo
     extends AbstractMojo

Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceOnceMojo.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceOnceMojo.java?rev=675992&r1=675991&r2=675992&view=diff
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceOnceMojo.java (original)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/EnforceOnceMojo.java Fri Jul 11 08:42:48 2008
@@ -26,9 +26,9 @@
  * 
  * @deprecated
  * @goal enforce-once
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @phase validate
  * @requiresDependencyResolution test
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @version $Id$
  */
 public class EnforceOnceMojo