You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2006/11/15 09:56:01 UTC

svn commit: r475163 - in /maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck: AbstractCheckDocumentationMojo.java CheckPluginDocumentationMojo.java

Author: dennisl
Date: Wed Nov 15 00:56:01 2006
New Revision: 475163

URL: http://svn.apache.org/viewvc?view=rev&rev=475163
Log:
[MDOCCK-2] Make errors more detailed

Modified:
    maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
    maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java

Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java?view=diff&rev=475163&r1=475162&r2=475163
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java Wed Nov 15 00:56:01 2006
@@ -303,17 +303,17 @@
 
         if ( StringUtils.isEmpty( project.getName() ) )
         {
-            reporter.error( "Missing tag <name>." );
+            reporter.error( "pom.xml is missing the <name> tag." );
         }
 
         if ( StringUtils.isEmpty( project.getDescription() ) )
         {
-            reporter.error( "Missing tag <description>." );
+            reporter.error( "pom.xml is missing the <description> tag." );
         }
 
         if ( StringUtils.isEmpty( project.getUrl() ) )
         {
-            reporter.error( "Missing tag <url>." );
+            reporter.error( "pom.xml is missing the <url> tag." );
         }
         else
         {
@@ -322,14 +322,14 @@
 
         if ( project.getIssueManagement() == null )
         {
-            reporter.error( "Missing tag <issueManagement>." );
+            reporter.error( "pom.xml is missing the <issueManagement> tag." );
         }
         else
         {
             IssueManagement issueMngt = project.getIssueManagement();
             if ( StringUtils.isEmpty( issueMngt.getUrl() ) )
             {
-                reporter.error( "Missing <url> tag in <issueManagement>." );
+                reporter.error( "pom.xml is missing the <url> tag in <issueManagement>." );
             }
             else
             {
@@ -339,30 +339,30 @@
 
         if ( project.getPrerequisites() == null )
         {
-            reporter.error( "Missing tag <prerequisites>" );
+            reporter.error( "pom.xml is missing the <prerequisites> tag." );
         }
         else
         {
             Prerequisites prereq = project.getPrerequisites();
             if ( StringUtils.isEmpty( prereq.getMaven() ) )
             {
-                reporter.error( "Missing <maven> tag in <prerequisites>" );
+                reporter.error( "pom.xml is missing the <maven> tag in <prerequisites>." );
             }
         }
 
         if ( StringUtils.isEmpty( project.getInceptionYear() ) )
         {
-            reporter.error( "Missing tag <inceptionYear>" );
+            reporter.error( "pom.xml is missing the <inceptionYear> tag." );
         }
 
         if ( project.getMailingLists().size() == 0 )
         {
-            reporter.warn( "No <mailingList> specified" );
+            reporter.warn( "pom.xml has no <mailingList> specified." );
         }
 
         if ( project.getScm() == null )
         {
-            reporter.warn( "Missing tag <scm>" );
+            reporter.warn( "pom.xml is missing the <scm> tag." );
         }
         else
         {
@@ -370,7 +370,7 @@
             if ( StringUtils.isEmpty( scm.getConnection() ) && StringUtils.isEmpty( scm.getDeveloperConnection() )
                 && StringUtils.isEmpty( scm.getUrl() ) )
             {
-                reporter.warn( "Missing children under the <scm> tag " );
+                reporter.warn( "pom.xml is missing the child tags under the <scm> tag." );
             }
             else if ( scm.getUrl() != null )
             {
@@ -380,14 +380,14 @@
 
         if ( project.getOrganization() == null )
         {
-            reporter.error( "Missing tag <organization>" );
+            reporter.error( "pom.xml is missing the <organization> tag." );
         }
         else
         {
             Organization org = project.getOrganization();
             if ( StringUtils.isEmpty( org.getName() ) )
             {
-                reporter.error( "Missing <name> tag in <organization>" );
+                reporter.error( "pom.xml is missing the <name> tag in <organization>." );
             }
             else if ( org.getUrl() != null )
             {
@@ -402,7 +402,7 @@
 
         if ( licenses == null || licenses.isEmpty() )
         {
-            reporter.error( "No license(s) specified." );
+            reporter.error( "pom.xml has no <license> specified." );
         }
         else
         {
@@ -412,14 +412,14 @@
 
                 if ( StringUtils.isEmpty( license.getName() ) )
                 {
-                    reporter.error( "Missing <name> tag in <license>" );
+                    reporter.error( "pom.xml is missing the <name> tag in <license>." );
                 }
                 else
                 {
                     String url = license.getUrl();
                     if ( StringUtils.isEmpty( url ) )
                     {
-                        reporter.error( "No license URL provided for license " + license.getName() );
+                        reporter.error( "pom.xml is missing the <url> tag for license " + license.getName() + "." );
                     }
                     else
                     {

Modified: maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java?view=diff&rev=475163&r1=475162&r2=475163
==============================================================================
--- maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java (original)
+++ maven/plugins/trunk/maven-docck-plugin/src/main/java/org/apache/maven/plugin/docck/CheckPluginDocumentationMojo.java Wed Nov 15 00:56:01 2006
@@ -146,22 +146,22 @@
 
                 if ( siteHtml.indexOf( "href=\"index.html\"" ) < 0 )
                 {
-                    reporter.error( "site.xml is missing link to: index.html \"Introduction\"" );
+                    reporter.error( "site.xml is missing the link to: index.html \"Introduction\"." );
                 }
 
                 if ( siteHtml.indexOf( "href=\"usage.html\"" ) < 0 )
                 {
-                    reporter.error( "site.xml is missing link to: usage.html \"Usage\"" );
+                    reporter.error( "site.xml is missing the link to: usage.html \"Usage\"." );
                 }
 
                 if ( siteHtml.indexOf( "href=\"plugin-info.html\"" ) < 0 )
                 {
-                    reporter.error( "site.xml is missing link to: plugin-info.html \"Goals\"" );
+                    reporter.error( "site.xml is missing the link to: plugin-info.html \"Goals\"." );
                 }
 
                 if ( siteHtml.indexOf( "href=\"faq.html\"" ) < 0 )
                 {
-                    reporter.error( "site.xml is missing link to: faq.html \"FAQ\"" );
+                    reporter.error( "site.xml is missing the link to: faq.html \"FAQ\"." );
                 }
             }
             catch ( IOException e )
@@ -175,26 +175,28 @@
         // check for index.(xml|apt|html)
         if ( !findFiles( siteDirectory, "index" ) )
         {
-            errors.add( "Missing site index.(html|xml|apt)." );
+            errors.add( "There is no index file in your site directory (in html|xml|apt format)." );
         }
         */
 
         // check for usage.(xml|apt|html)
         if ( !findFiles( projectSiteDirectory, "usage" ) )
         {
-            reporter.error( "Missing base usage.(html|xml|apt)." );
+            reporter.error( "There is no usage file in your site directory (in html|xml|apt format)." );
         }
 
         // check for **/examples/**.(xml|apt|html)
         if ( !findFiles( projectSiteDirectory, "**/examples/*" ) &&
              !findFiles( projectSiteDirectory, "**/example*" ) )
         {
-            reporter.error( "Missing examples." );
+            reporter.error( "There are no example files in your site directory (in html|xml|apt format)."
+                + " They should either be called \"example*.(html|xml|apt)\""
+                + " or they should be located in the \"examples\" directory" );
         }
 
         if ( !findFiles( projectSiteDirectory, "faq" ) )
         {
-            reporter.error( "Missing base FAQ.(fml|html|xml|apt)." );
+            reporter.error( "There is no faq file in your site directory (in fml|html|xml|apt format)." );
         }
     }
 
@@ -221,12 +223,12 @@
         }
         else
         {
-            reporter.error( "No report plugins configured." );
+            reporter.error( "pom.xml has no report plugins configured." );
         }
 
         for ( Iterator plugins = expectedPlugins.iterator(); plugins.hasNext(); )
         {
-            reporter.error( "Report plugin not found: " + plugins.next().toString() );
+            reporter.error( "pom.xml is missing the report plugin: " + plugins.next().toString() + "." );
         }
     }