- Fixing checkstyle reported issues
  - making variables private and add appropriate get/set methods.


git-svn-id: https://svn.apache.org/repos/asf/maven/enforcer/trunk@1631139 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractStandardEnforcerRule.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractStandardEnforcerRule.java
index baacbe4..7f6d3e7 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractStandardEnforcerRule.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractStandardEnforcerRule.java
@@ -29,14 +29,13 @@
     implements EnforcerRule2
 {
 
-    /** Specify a friendly message if the rule fails.
+    /**
+     * Specify a friendly message if the rule fails.
      *
-     * @deprecated the visibility will be reduced to private with the next major version
      * @see {@link #setMessage(String)}
      * @see {@link #getMessage()}
-
      */
-    public String message = null;
+    private String message;
 
     private EnforcerLevel level = EnforcerLevel.ERROR;
 
@@ -55,7 +54,6 @@
      *
      * @return level
      */
-    //@Override
     public EnforcerLevel getLevel()
     {
         return level;
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java
index 13adc2b..118ff03 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractVersionEnforcer.java
@@ -50,11 +50,10 @@
      * <li><code>(,2.0.5],[2.1.1,)</code> Versions up to 2.0.5 (included) and 2.1.1 or higher</li>
      * </ul>
      * 
-     * @deprecated the visibility will be reduced to private with the next major version
      * @see {@link #setVersion(String)}
      * @see {@link #getVersion()}
      */
-    public String version = null;
+    private String version;
 
     /**
      * Compares the specified version to see if it is allowed by the defined version range.
@@ -201,7 +200,14 @@
     }
 
     /**
-     * Sets the required version.
+     * Specify the required version. Some examples are:
+     * <ul>
+     * <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>
+     * <li><code>(,2.0.5],[2.1.1,)</code> Versions up to 2.0.5 (included) and 2.1.1 or higher</li>
+     * </ul>
      *
      * @param theVersion the required version to set
      */
diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java
index cea2d43..aa6568b 100644
--- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java
+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BannedDependencies.java
@@ -47,9 +47,8 @@
      * 
      * @see {@link #setExcludes(List)}
      * @see {@link #getExcludes()}
-     * @deprecated the visibility will be reduced to private with the next major version
      */
-    public List<String> excludes = null;
+    private List<String> excludes = null;
 
     /**
      * Specify the allowed dependencies. This can be a list of artifacts in the format
@@ -60,9 +59,8 @@
      * 
      * @see {@link #setIncludes(List)}
      * @see {@link #getIncludes()}
-     * @deprecated the visibility will be reduced to private with the next major version
      */
-    public List<String> includes = null;
+    private List<String> includes = null;
 
     /**
      * {@inheritDoc}
@@ -165,8 +163,11 @@
     }
 
     /**
-     * Sets the excludes.
+     * 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.
      * 
+     * @see {@link #getExcludes()}
      * @param theExcludes the excludes to set
      */
     public void setExcludes( List<String> theExcludes )
@@ -185,8 +186,13 @@
     }
 
     /**
-     * Sets the includes.
+     * 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>
+     * For example, to ban all xerces except xerces-api -> exclude "xerces", include "xerces:xerces-api"
      * 
+     * @see {@link #setIncludes(List)}
      * @param theIncludes the includes to set
      */
     public void setIncludes( List<String> theIncludes )
diff --git a/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/RequirePrerequisiteTest.java b/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/RequirePrerequisiteTest.java
index 816dd80..dec1d73 100644
--- a/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/RequirePrerequisiteTest.java
+++ b/enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/RequirePrerequisiteTest.java
@@ -19,6 +19,10 @@
  * under the License.

  */

 

+import static org.mockito.Mockito.mock;

+import static org.mockito.Mockito.verify;

+import static org.mockito.Mockito.when;

+

 import java.util.Collections;

 

 import org.apache.maven.enforcer.rule.api.EnforcerRuleException;

@@ -30,10 +34,6 @@
 import org.junit.Before;

 import org.junit.Test;

 

-import static org.mockito.Mockito.mock;

-import static org.mockito.Mockito.verify;

-import static org.mockito.Mockito.when;

-

 public class RequirePrerequisiteTest

 {

     private MavenProject project;