You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2016/04/25 20:08:04 UTC

svn commit: r1740869 - in /maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar: AbstractJarMojo.java JarMojo.java TestJarMojo.java

Author: khmarbaise
Date: Mon Apr 25 18:08:04 2016
New Revision: 1740869

URL: http://svn.apache.org/viewvc?rev=1740869&view=rev
Log:
Fixed checkstyle reported errors/warning.

Modified:
    maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
    maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
    maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java

Modified: maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java?rev=1740869&r1=1740868&r2=1740869&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java Mon Apr 25 18:08:04 2016
@@ -136,9 +136,13 @@ public abstract class AbstractJarMojo
 
     /**
      * Return the specific output directory to serve as the root for the archive.
+     * @return get classes directory.
      */
     protected abstract File getClassesDirectory();
 
+    /**
+     * @return the {@link #project}
+     */
     protected final MavenProject getProject()
     {
         return project;
@@ -146,11 +150,13 @@ public abstract class AbstractJarMojo
 
     /**
      * Overload this to produce a jar with another classifier, for example a test-jar.
+     * @return get the classifier.
      */
     protected abstract String getClassifier();
 
     /**
      * Overload this to produce a test-jar, for example.
+     * @return return the type.
      */
     protected abstract String getType();
 
@@ -158,22 +164,22 @@ public abstract class AbstractJarMojo
      * Returns the Jar file to generate, based on an optional classifier.
      *
      * @param basedir the output directory
-     * @param finalName the name of the ear file
+     * @param resultFinalName the name of the ear file
      * @param classifier an optional classifier
      * @return the file to generate
      */
-    protected File getJarFile( File basedir, String finalName, String classifier )
+    protected File getJarFile( File basedir, String resultFinalName, String classifier )
     {
         if ( basedir == null )
         {
             throw new IllegalArgumentException( "basedir is not allowed to be null" );
         }
-        if ( finalName == null )
+        if ( resultFinalName == null )
         {
             throw new IllegalArgumentException( "finalName is not allowed to be null" );
         }
 
-        StringBuilder fileName = new StringBuilder( finalName );
+        StringBuilder fileName = new StringBuilder( resultFinalName );
 
         if ( hasClassifier() )
         {
@@ -187,6 +193,8 @@ public abstract class AbstractJarMojo
 
     /**
      * Generates the JAR.
+     * @return The instance of File for the created archive file.
+     * @throws MojoExecutionException in case of an error.
      */
     public File createArchive()
         throws MojoExecutionException
@@ -226,6 +234,7 @@ public abstract class AbstractJarMojo
 
     /**
      * Generates the JAR.
+     * @throws MojoExecutionException in case of an error.
      */
     public void execute()
         throws MojoExecutionException

Modified: maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java?rev=1740869&r1=1740868&r2=1740869&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java Mon Apr 25 18:08:04 2016
@@ -52,13 +52,16 @@ public class JarMojo
     @Parameter
     private String classifier;
 
+    /**
+     * {@inheritDoc}
+     */
     protected String getClassifier()
     {
         return classifier;
     }
 
     /**
-     * @return type of the generated artifact
+     * {@inheritDoc}
      */
     protected String getType()
     {
@@ -66,7 +69,7 @@ public class JarMojo
     }
 
     /**
-     * Return the main classes directory, so it's used as the root of the jar.
+     * {@inheritDoc}
      */
     protected File getClassesDirectory()
     {

Modified: maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java?rev=1740869&r1=1740868&r2=1740869&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java Mon Apr 25 18:08:04 2016
@@ -58,13 +58,16 @@ public class TestJarMojo
     @Parameter( defaultValue = "tests" )
     private String classifier;
 
+    /**
+     * {@inheritDoc}
+     */
     protected String getClassifier()
     {
         return classifier;
     }
 
     /**
-     * @return type of the generated artifact
+     * {@inheritDoc}
      */
     protected String getType()
     {
@@ -72,13 +75,16 @@ public class TestJarMojo
     }
 
     /**
-     * Return the test-classes directory, to serve as the root of the tests jar.
+     * {@inheritDoc}
      */
     protected File getClassesDirectory()
     {
         return testClassesDirectory;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void execute()
         throws MojoExecutionException
     {