You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "William Ferguson (JIRA)" <ji...@codehaus.org> on 2007/11/09 05:11:36 UTC

[jira] Commented: (MNG-3244) inherited site url not properly handling parameters

    [ http://jira.codehaus.org/browse/MNG-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113267 ] 

William Ferguson commented on MNG-3244:
---------------------------------------

Brian, we all seem to want this fix, but don't want to break existing behaviour (however bizarre it may be).

The proper solution seems to be to add a POM attribute/element like either:
- use-inherited-urls with a default of false
- append-artifactId-to-parent-urls with a default of true
But this requires a change to the POM schema which I suspect will be much harder to organise..

A temporary solution might be to do the same thing using well-documented POM properties, eg
- mng-3244-use-inherited-urls with a default of false
- mng-3244-append-artifactId-to-parent-urls with a default of true
And when (hopefully not if) the POM schema is changed to accomodate the proper solution the implementation can be readily switched from one to the other and even handle fallback and notification of the appropriate configuration.

> inherited site url not properly handling parameters
> ---------------------------------------------------
>
>                 Key: MNG-3244
>                 URL: http://jira.codehaus.org/browse/MNG-3244
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation, Sites & Reporting
>    Affects Versions: 2.0.7
>            Reporter: Jacob Robertson
>            Assignee: Brian Fox
>             Fix For: 2.0.8
>
>         Attachments: fix-inherited-site-url.patch
>
>
> Here is the test case to reroduce this problem.  Take the following two pom.xml files
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> 	<groupId>org.bar</groupId>
> 	<artifactId>foo</artifactId>
> 	<name>foo</name>
> 	<version>1.0-SNAPSHOT</version>
> 	<packaging>pom</packaging>
> 	<modelVersion>4.0.0</modelVersion>
> 	<distributionManagement>
> 		<site>
> 			<id>foo-site</id>
> 			<url>file://C:/Documents and Settings/foo/.m2/site/${project.artifactId}</url>
> 		</site>
> 	</distributionManagement>
> </project>
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> 	<groupId>org.bar</groupId>
> 	<artifactId>baz</artifactId>
> 	<name>baz</name>
> 	<version>1.0-SNAPSHOT</version>
> 	<packaging>pom</packaging>
> 	<modelVersion>4.0.0</modelVersion>
> 	<parent>
> 		<artifactId>foo</artifactId>
> 		<groupId>org.bar</groupId>
> 		<version>1.0-SNAPSHOT</version>
> 	</parent>
> </project>
> And run the site-deploy goal on each.  What you get under the site directory is this
> - site
> /- foo
> ---/site docs
> /- baz
> ---/- baz (extra directory)
> --- ---/site docs
> This is the simplest test case.  In the case where I have a "grandparent" pom, the site directory uses the grandparent/parent as the path to the site, and doesn't use the actual artifactId of the artifact I'm creating the site for.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira