maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: svn commit: r1538775 - in /maven/sandbox/trunk/dist-tools/dist-tool-plugin: pom.xml src/main/java/org/apache/maven/dist/tools/DistCheckSiteMojo.java
Date Mon, 04 Nov 2013 22:22:10 GMT
Hi Hervé

I'm not so happy with this solution, since it's abusing the xml namespace.
When we're going to do strict parsing with respect of the namespaces,  
we're having serious issues.

Maybe in this case it is better to use properties:
<sites>
   <property>
     <key>apache-maven:2.0.11</key>
     <value>http://maven.apache.org/ref/2.0.11/</value>
   </property>
   ...
</sites>


Robert

Op Mon, 04 Nov 2013 22:31:05 +0100 schreef <hboutemy@apache.org>:

> Author: hboutemy
> Date: Mon Nov  4 21:31:05 2013
> New Revision: 1538775
>
> URL: http://svn.apache.org/r1538775
> Log:
> configure site for versioned artifact, as useful for Maven 2.0.11 and  
> 2.2.1
>
> Modified:
>     maven/sandbox/trunk/dist-tools/dist-tool-plugin/pom.xml
>     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/pom.xml
> URL:  
> http://svn.apache.org/viewvc/maven/sandbox/trunk/dist-tools/dist-tool-plugin/pom.xml?rev=1538775&r1=1538774&r2=1538775&view=diff
> ==============================================================================
> --- maven/sandbox/trunk/dist-tools/dist-tool-plugin/pom.xml (original)
> +++ maven/sandbox/trunk/dist-tools/dist-tool-plugin/pom.xml Mon Nov  4  
> 21:31:05 2013
> @@ -255,14 +255,12 @@
>          <version>${project.version}</version>
>          <configuration>
>            <ignoreSiteFailures>
> -            <ignoreSiteFailure>apache-maven:2.0.11</ignoreSiteFailure>
> -            <ignoreSiteFailure>apache-maven:2.2.1</ignoreSiteFailure>
>              <ignoreSiteFailure>file-management:1.2.1</ignoreSiteFailure>
>              <ignoreSiteFailure>apache-incubator-disclaimer-resource-bundle:1.1</ignoreSiteFailure>
>            </ignoreSiteFailures>
>            <ignoreDistFailures>
>              <ignoreDistFailure>doxia-linkcheck:1.2</ignoreDistFailure>
> -             
> <ignoreDistFailure>apache-maven:2.0.11</ignoreDistFailure><!-- this one
 
> is in dist but not in central -->
> +             
> <ignoreDistFailure>apache-maven:2.0.11</ignoreDistFailure><!-- this one
 
> is in distribution area but not in central -->
>              <ignoreDistFailure>maven-docck-plugin:1.0</ignoreDistFailure>
>              <ignoreDistFailure>maven-reactor-plugin:1.0</ignoreDistFailure>
>              <ignoreDistFailure>file-management:1.2.1</ignoreDistFailure>
> @@ -274,6 +272,8 @@
>            <sites>
>              <apache>http://maven.apache.org/pom/asf/</apache>
>              <maven-parent>http://maven.apache.org/pom/maven/</maven-parent>
> +             
> <apache-maven:2.0.11>http://maven.apache.org/ref/2.0.11/</apache-maven:2.0.11>
> +             
> <apache-maven:2.2.1>http://maven.apache.org/ref/2.2.1/</apache-maven:2.2.1>
>            </sites>
>            <paths>
>              <apache>/asf/</apache>
>
> 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=1538775&r1=1538774&r2=1538775&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
 
> Mon Nov  4 21:31:05 2013
> @@ -106,6 +106,7 @@ public class DistCheckSiteMojo
>       * <pre>
>       *   &lt;sites&gt;
>       *     &lt;artifact-id&gt;site url&lt;/artifact-id&gt;
> +     *     &lt;artifact-id:version&gt;site  
> url&lt;/artifact-id:version&gt;
>       *   &lt;/sites&gt;
>       * </pre>
>       */
> @@ -436,7 +437,11 @@ public class DistCheckSiteMojo
>              String siteUrl = sites.get( cli.getArtifactId() );
>              if ( siteUrl == null )
>              {
> -                siteUrl = artifactProject.getUrl();
> +                siteUrl = sites.get( cli.getArtifactId() + ':' +  
> version );
> +                if ( siteUrl == null )
> +                {
> +                    siteUrl = artifactProject.getUrl();
> +                }
>              }
>             result.setUrl( siteUrl );
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message