maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1488574 - in /maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools: AbstractDistCheckMojo.java DistCheckSiteMojo.java
Date Sat, 01 Jun 2013 19:56:03 GMT
Author: hboutemy
Date: Sat Jun  1 19:56:02 2013
New Revision: 1488574

URL: http://svn.apache.org/r1488574
Log:
factored out icon output to use it in check-source-release

Modified:
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java?rev=1488574&r1=1488573&r2=1488574&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
Sat Jun  1 19:56:02 2013
@@ -24,6 +24,8 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.List;
+
+import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.siterenderer.Renderer;
 
 import org.apache.maven.plugin.MojoExecutionException;
@@ -107,4 +109,29 @@ public abstract class AbstractDistCheckM
             }
         }
     }
+
+    protected void iconError( Sink sink )
+    {
+        icon( sink, "error" );
+    }
+
+    protected void iconWarning( Sink sink )
+    {
+        icon( sink, "warning" );
+    }
+
+    protected void iconSuccess( Sink sink )
+    {
+        icon( sink, "success" );
+    }
+
+    protected void icon( Sink sink, String level )
+    {
+        sink.figure();
+        sink.figureCaption();
+        sink.text( level );
+        sink.figureCaption_();
+        sink.figureGraphics( "images/icon_" + level + "_sml.gif" );
+        sink.figure_();
+    }
 }

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java?rev=1488574&r1=1488573&r2=1488574&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
Sat Jun  1 19:56:02 2013
@@ -422,34 +422,4 @@ public class DistCheckSiteMojo extends A
         } );
         super.execute();
     }
-
-    private void iconError( Sink sink )
-    {
-        sink.figure();
-        sink.figureCaption();
-        sink.text( "error" );
-        sink.figureCaption_();
-        sink.figureGraphics( "images/icon_error_sml.gif" );
-        sink.figure_();
-    }
-
-    private void iconWarning( Sink sink )
-    {
-        sink.figure();
-        sink.figureCaption();
-        sink.text( "warning" );
-        sink.figureCaption_();
-        sink.figureGraphics( "images/icon_warning_sml.gif" );
-        sink.figure_();
-    }
-
-    private void iconSuccess( Sink sink )
-    {
-        sink.figure();
-        sink.figureCaption();
-        sink.text( "success" );
-        sink.figureCaption_();
-        sink.figureGraphics( "images/icon_success_sml.gif" );
-        sink.figure_();
-    }
 }



Mime
View raw message