improved parameter format in dist-tool.conf to make it more explicit

git-svn-id: https://svn.apache.org/repos/asf/maven/sandbox/trunk@1542701 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java b/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
index 4a4050d..47491c4 100644
--- a/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
+++ b/dist-tools/dist-tool-plugin/src/main/java/org/apache/maven/dist/tools/AbstractDistCheckMojo.java
@@ -207,14 +207,23 @@
         {
             ConfigurationLineInfo aLine = null;
 
+            line = line.trim();
+
             if ( "".equals( line ) || line.startsWith( "##" ) )
             {
+                // empty line or comment: ignore
                 continue;
             }
-            else if ( line.contains( "=" ) )
+            else if ( line.startsWith( ">" ) )
             {
+                // parameter
                 int index = line.indexOf( '=' );
-                String param = line.substring( 0, index ).trim();
+                if ( index < 0 )
+                {
+                    throw new MojoExecutionException( "unparseable configuration line, missing '=': " + line );
+                }
+
+                String param = line.substring( 1, index ).trim();
                 String value = line.substring( index + 1 ).trim();
 
                 if ( "dist-area".equals( param ) )
@@ -223,6 +232,7 @@
                 }
                 else if ( param.contains( " " ) )
                 {
+                    // parameter for an artifactId
                     index = param.indexOf( ' ' );
                     String artifactId = param.substring( 0, index );
                     param = param.substring( index ).trim();
@@ -237,7 +247,7 @@
                     }
                     else
                     {
-                        throw new MojoExecutionException( "unknown parameter '" + param + "' in configuration line: "
+                        throw new MojoExecutionException( "unknown artifact parameter '" + param + "' in configuration line: "
                             + line );
                     }
                 }
@@ -250,6 +260,7 @@
             }
             else if ( line.startsWith( "/" ) )
             {
+                // definition of a group, in a dist-area directory
                 currentGroup = new ConfigurationLineInfo( line.split( " " ) );
                 if ( currentGroup.getArtifactId() == null )
                 {
@@ -260,8 +271,7 @@
             }
             else
             {
-                line = line.trim();
-
+                // artifact definition
                 if ( line.startsWith( "*" ) )
                 {
                     // special artifact
@@ -278,7 +288,6 @@
                 try
                 {
                     aLine = new ConfigurationLineInfo( currentGroup, line.split( " " ) );
-
                 }
                 catch ( InvalidVersionSpecificationException e )
                 {
diff --git a/dist-tools/dist-tool-plugin/src/main/resources/dist-tool.conf b/dist-tools/dist-tool-plugin/src/main/resources/dist-tool.conf
index 72335d0..d6777dc 100644
--- a/dist-tools/dist-tool-plugin/src/main/resources/dist-tool.conf
+++ b/dist-tools/dist-tool-plugin/src/main/resources/dist-tool.conf
@@ -2,18 +2,19 @@
 ## /directory: groupId[:parent-pom artifactId] [src+bin] [index page url]

 ##   [*] artifactId [version restriction]

 ##         * = only check info in index page, but not dist nor site (for plugins provided by components, like archetype, release, ...)

-## artifactId index-path = /path/

-## artifactId site = site url

+## > artifactId index-path = /path/

+## > artifactId site = site url

+## > artifactId:version site = site url

 

-dist-area = http://www.apache.org/dist/maven/

+> dist-area = http://www.apache.org/dist/maven/

 

 /_not_in_distribution_area_: org.apache.maven http://maven.apache.org/pom/

-  maven-parent index-path = /maven/

-  maven-parent site = http://maven.apache.org/pom/maven/

+> maven-parent index-path = /maven/

+> maven-parent site = http://maven.apache.org/pom/maven/

   maven-parent

 /_not_in_distribution_area_: org.apache http://maven.apache.org/pom/

-  apache index-path = /asf/

-  apache site = http://maven.apache.org/pom/asf/

+> apache index-path = /asf/

+> apache site = http://maven.apache.org/pom/asf/

   apache

 

 /ant-tasks: org.apache.maven src+bin

@@ -43,9 +44,9 @@
 /maven-1: content.not.checked

 

 /maven-2: org.apache.maven src+bin

-  apache-maven:2.0.11 site = http://maven.apache.org/ref/2.0.11/

+> apache-maven:2.0.11 site = http://maven.apache.org/ref/2.0.11/

   apache-maven [2.0,2.1.0-alpha-1)

-  apache-maven:2.2.1 site = http://maven.apache.org/ref/2.2.1/

+> apache-maven:2.2.1 site = http://maven.apache.org/ref/2.2.1/

   apache-maven [2.2,3.0-alpha-1)

 

 /maven-3: org.apache.maven src+bin

@@ -164,7 +165,7 @@
 /shared: org.apache.maven http://maven.apache.org/shared/

   maven-archiver

 

-maven-skins index-path = /skins/

+> maven-skins index-path = /skins/

 /skins: org.apache.maven.skins:maven-skins http://maven.apache.org/skins/

   maven-application-skin

   maven-classic-skin