creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1416193 - in /creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven: GenerateMojo.java MojoToJCLLog.java
Date Sun, 02 Dec 2012 15:56:17 GMT
Author: rdonkin
Date: Sun Dec  2 15:56:16 2012
New Revision: 1416193

URL: http://svn.apache.org/viewvc?rev=1416193&view=rev
Log:
Improve javadocs

Modified:
    creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/GenerateMojo.java
    creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/MojoToJCLLog.java

Modified: creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/GenerateMojo.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/GenerateMojo.java?rev=1416193&r1=1416192&r2=1416193&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/GenerateMojo.java
(original)
+++ creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/GenerateMojo.java
Sun Dec  2 15:56:16 2012
@@ -14,7 +14,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License. 
+ * under the License.
  */
 package org.apache.creadur.whisker.plugin.maven;
 
@@ -22,7 +22,6 @@ import java.io.File;
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
 import org.apache.creadur.whisker.app.Act;
 import org.apache.creadur.whisker.app.Whisker;
 import org.apache.creadur.whisker.app.load.StreamableResourceFactory;
@@ -43,7 +42,7 @@ public class GenerateMojo extends Abstra
      * @parameter default-value="${project.build.directory}"
      */
     private File outputDirectory;
-    
+
     /**
      * The licensing materials will be encoding thus.
      * @parameter property="outputEncoding" default-value="${project.build.sourceEncoding}"
@@ -53,17 +52,19 @@ public class GenerateMojo extends Abstra
     /**
      * This file contains a description of the licensing qualities of
      * the expected contents of the assembled application.
-     * 
+     *
      * @required
      * @parameter property="apacheWhiskerDescriptor"
      */
     private File descriptor;
-    
+
     /**
      * Generate licensing related materials such as LICENSE and NOTICE documents.
+     * @throws MojoExecutionException when Whisker fails,
+     * or when configured cannot be executed
      * @see org.apache.maven.plugin.Mojo#execute()
      */
-    public void execute() throws MojoExecutionException, MojoFailureException { 
+    public void execute() throws MojoExecutionException {
         if (descriptor.exists()) {
             if (descriptor.canRead()) {
                  try {

Modified: creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/MojoToJCLLog.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/MojoToJCLLog.java?rev=1416193&r1=1416192&r2=1416193&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/MojoToJCLLog.java
(original)
+++ creadur/whisker/trunk/apache-whisker-plugin4maven/src/main/java/org/apache/creadur/whisker/plugin/maven/MojoToJCLLog.java
Sun Dec  2 15:56:16 2012
@@ -14,7 +14,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License. 
+ * under the License.
  */
 package org.apache.creadur.whisker.plugin.maven;
 
@@ -22,74 +22,101 @@ import org.apache.commons.lang3.ObjectUt
 import org.apache.maven.plugin.logging.Log;
 
 /**
- * 
+ * Adapts commons logging calls to Maven.
  */
 public class MojoToJCLLog implements org.apache.commons.logging.Log {
-    
+
+    /** Maven's log */
     private final Log log;
 
-    public MojoToJCLLog(Log log) {
+    /**
+     * Constructs a log than delegates to Maven.
+     * @param log not null
+     */
+    public MojoToJCLLog(final Log log) {
         super();
         this.log = log;
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#debug(java.lang.Object)
      */
-    public void debug(Object message) {
+    public void debug(final Object message) {
         log.debug(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#debug(java.lang.Object, java.lang.Throwable)
      */
-    public void debug(Object message, Throwable t) {
+    public void debug(final Object message, final Throwable t) {
         log.debug(ObjectUtils.toString(message), t);
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#error(java.lang.Object)
      */
-    public void error(Object message) {
+    public void error(final Object message) {
         log.error(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#error(java.lang.Object, java.lang.Throwable)
      */
-    public void error(Object message, Throwable t) {
+    public void error(final Object message, final Throwable t) {
         log.error(ObjectUtils.toString(message), t);
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#fatal(java.lang.Object)
      */
-    public void fatal(Object message) {
+    public void fatal(final Object message) {
         log.error(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#fatal(java.lang.Object, java.lang.Throwable)
      */
-    public void fatal(Object message, Throwable t) {
+    public void fatal(final Object message, final Throwable t) {
         log.error(ObjectUtils.toString(message), t);
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#info(java.lang.Object)
      */
-    public void info(Object message) {
+    public void info(final Object message) {
         log.info(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#info(java.lang.Object, java.lang.Throwable)
      */
-    public void info(Object message, Throwable t) {
+    public void info(final Object message, final Throwable t) {
         log.info(ObjectUtils.toString(message), t);
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when debug is enabled in Maven
      * @see org.apache.commons.logging.Log#isDebugEnabled()
      */
     public boolean isDebugEnabled() {
@@ -97,6 +124,8 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when error is enabled in Maven
      * @see org.apache.commons.logging.Log#isErrorEnabled()
      */
     public boolean isErrorEnabled() {
@@ -104,6 +133,8 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when error is enabled in Maven
      * @see org.apache.commons.logging.Log#isFatalEnabled()
      */
     public boolean isFatalEnabled() {
@@ -111,6 +142,8 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when info is enabled in Maven
      * @see org.apache.commons.logging.Log#isInfoEnabled()
      */
     public boolean isInfoEnabled() {
@@ -118,6 +151,8 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when trace is enabled in Maven
      * @see org.apache.commons.logging.Log#isTraceEnabled()
      */
     public boolean isTraceEnabled() {
@@ -125,6 +160,8 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @return true when warn is enabled in Maven
      * @see org.apache.commons.logging.Log#isWarnEnabled()
      */
     public boolean isWarnEnabled() {
@@ -132,31 +169,40 @@ public class MojoToJCLLog implements org
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#trace(java.lang.Object)
      */
-    public void trace(Object message) {
+    public void trace(final Object message) {
         log.debug(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#trace(java.lang.Object, java.lang.Throwable)
      */
-    public void trace(Object message, Throwable t) {
+    public void trace(final Object message, final Throwable t) {
         log.debug(ObjectUtils.toString(message), t);
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
      * @see org.apache.commons.logging.Log#warn(java.lang.Object)
      */
-    public void warn(Object message) {
+    public void warn(final Object message) {
         log.warn(ObjectUtils.toString(message));
     }
 
     /**
+     * Delegates to Maven.
+     * @param message possibly null
+     * @param t cause
      * @see org.apache.commons.logging.Log#warn(java.lang.Object, java.lang.Throwable)
      */
-    public void warn(Object message, Throwable t) {
+    public void warn(final Object message, final Throwable t) {
         log.warn(ObjectUtils.toString(message), t);
     }
-
 }



Mime
View raw message