maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1502361 - in /maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools: ./ checkers/
Date Thu, 11 Jul 2013 20:50:15 GMT
Author: hboutemy
Date: Thu Jul 11 20:50:14 2013
New Revision: 1502361

URL: http://svn.apache.org/r1502361
Log:
display simplification

Modified:
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/FluidoHTMLChecker.java
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/HTMLChecker.java
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusLeftHTMLChecker.java
    maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusRightHTMLChecker.java

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=1502361&r1=1502360&r2=1502361&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
Thu Jul 11 20:50:14 2013
@@ -284,7 +284,7 @@ public class DistCheckSiteMojo
         sink.section1();
         sink.rawText( "Checked sites, also do some basic checking in index.html contents."
);
         sink.rawText( "This is to help maintaining some coherence. How many site are skin
fluido, stylus,"
-                + " where they have version (right left)" );
+                + " where they have artifact version (right, left)" );
         sink.rawText( "All sun icons in one column is kind of objective." );
         sink.section1_();
         sink.table();
@@ -311,14 +311,8 @@ public class DistCheckSiteMojo
         sink.rawText( "Skins and comments on top of html (helping for date but not always)"
);
         sink.tableHeaderCell_();
         sink.tableHeaderCell();
-        sink.rawText( "Precise and overkill contents check summary details on your left ==>"
);
+        sink.rawText( "Artifact version displayed" );
         sink.tableHeaderCell_();
-        for ( HTMLChecker c : checker )
-        {
-            sink.tableHeaderCell();
-            sink.rawText( c.getName() );
-            sink.tableHeaderCell_();
-        }
         sink.tableRow_();
 
         String directory = null;
@@ -332,7 +326,7 @@ public class DistCheckSiteMojo
                 // shorten groupid
                 sink.rawText( csr.getConfigurationLine().getGroupId().replaceAll( "org.apache.maven",
"o.a.m" ) );
                 sink.tableHeaderCell_();
-                for ( int i = 0; i < 5 + checker.size() ; i++ )
+                for ( int i = 0; i < 5 ; i++ )
                 {
                     sink.tableHeaderCell();
                     sink.rawText( " " );
@@ -381,29 +375,15 @@ public class DistCheckSiteMojo
             
             sink.tableCell();
             csr.getOverall( sink );
-            sink.tableCell_();
-
             for ( HTMLChecker c : checker )
             {
-                sink.tableCell();
-                if ( csr.getCheckMap().get( c ) != null )
+                if ( ( csr.getCheckMap().get( c ) != null ) && csr.getCheckMap().get(
c ) )
                 {
-                    if ( csr.getCheckMap().get( c ) )
-                    {
-                        iconSuccess( sink );
-                    }
-                    else
-                    {
-                        iconWarning( sink );
-                    }
+                    sink.text( ": " + c.getName() );
                 }
-                else
-                {
-                    iconError( sink );
-                }
-
-                sink.tableCell_();
             }
+            sink.tableCell_();
+
             sink.tableRow_();
         }
         sink.table_();

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/FluidoHTMLChecker.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/FluidoHTMLChecker.java?rev=1502361&r1=1502360&r2=1502361&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/FluidoHTMLChecker.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/FluidoHTMLChecker.java
Thu Jul 11 20:50:14 2013
@@ -23,7 +23,7 @@ import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 
 /**
- * Check if version is present in fluido skin.
+ * Check if artifact version is present in fluido skin.
  * 
  * @author skygo
  */
@@ -33,7 +33,7 @@ public class FluidoHTMLChecker implement
     @Override
     public String getName()
     {
-        return "Is version present in Fluido Skin";
+        return "Fluido";
     }
 
     @Override
@@ -41,18 +41,11 @@ public class FluidoHTMLChecker implement
     {
         return "Fluido";
     }
-    
+
     @Override
     public boolean isOk( Document doc, String version )
     {
         Element links = doc.select( "li#projectVersion" ).first();
-        if ( links != null )
-        {
-            return links.text().contains( version );
-        }
-        else
-        {
-            return false;
-        }
+        return ( links != null ) && links.text().contains( version );
     }
 }

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/HTMLChecker.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/HTMLChecker.java?rev=1502361&r1=1502360&r2=1502361&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/HTMLChecker.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/HTMLChecker.java
Thu Jul 11 20:50:14 2013
@@ -41,6 +41,7 @@ public interface HTMLChecker
      * @return string for skin
      */
     String getSkin();
+
     /**
      * true if checker find pattern in document
      *

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusLeftHTMLChecker.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusLeftHTMLChecker.java?rev=1502361&r1=1502360&r2=1502361&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusLeftHTMLChecker.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusLeftHTMLChecker.java
Thu Jul 11 20:50:14 2013
@@ -23,7 +23,7 @@ import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 
 /**
- * Check if version is present on left side in stylus skin.
+ * Check if artifact version is present on left side in stylus skin.
  * 
  * @author skygo
  */
@@ -33,7 +33,7 @@ public class StylusLeftHTMLChecker imple
     @Override
     public String getName()
     {
-        return "Is version present in Stylus Skin (on left side)";
+        return "Stylus left side";
     }
 
     @Override
@@ -41,18 +41,12 @@ public class StylusLeftHTMLChecker imple
     {
         return "Stylus";
     }
-    
+
     @Override
     public boolean isOk( Document doc, String version )
     {
         Element links = doc.select( "div.xleft" ).first();
-        if ( links != null )
-        {
-            return links.text().contains( version );
-        }
-        else
-        {
-            return false;
-        }
+
+        return ( links != null ) && links.text().contains( version );
     }
 }

Modified: maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusRightHTMLChecker.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusRightHTMLChecker.java?rev=1502361&r1=1502360&r2=1502361&view=diff
==============================================================================
--- maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusRightHTMLChecker.java
(original)
+++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/checkers/StylusRightHTMLChecker.java
Thu Jul 11 20:50:14 2013
@@ -23,7 +23,7 @@ import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 
 /**
- * Check if version is present on right side in stylus skin.
+ * Check if artifact version is present on right side in stylus skin.
  * 
  * @author skygo
  */
@@ -33,7 +33,7 @@ public class StylusRightHTMLChecker impl
     @Override
     public String getName()
     {
-        return "Is version present in Stylus Skin (on right side)";
+        return "Stylus right side";
     }
 
     @Override
@@ -41,18 +41,12 @@ public class StylusRightHTMLChecker impl
     {
         return "Stylus";
     }
-    
+
     @Override
     public boolean isOk( Document doc, String version )
     {
         Element links = doc.select( "div.xright" ).first();
-        if ( links != null )
-        {
-            return links.text().contains( version );
-        }
-        else
-        {
-            return false;
-        }
+
+        return ( links != null ) && links.text().contains( version );
     }
 }



Mime
View raw message