[ 
https://issues.apache.org/jira/browse/MSITE-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15514518#comment-15514518
 ] 

Alix Lourme commented on MSITE-783:
-----------------------------------

Hi Hervé, 

Many thanks for taking this bug in consideration.

Executing _Eclipse remote debug_ on project site in attachment with 
_maven-site-plugin_ code source, the root cause could be in the [module maven 
model 
build|https://maven.apache.org/doxia/doxia-sitetools/doxia-integration-tools/xref/org/apache/maven/doxia/tools/DefaultSiteTool.html#L781].

I don't know why, but the model contains interpolated properties from pom, but 
not from settings.

Could be seen with these add in module pom : 
{code}
    <properties>
        <myVersion>${project.version}</myVersion>
        <mySitePublishLocation>${sitePublishLocation}</mySitePublishLocation>
    </properties>
{code}

The result is : 
{code}
{mySitePublishLocation=${sitePublishLocation}, myVersion=1.0.0-SNAPSHOT}
{code}

> Bad modules links when 'distributionManagement.site.url' comes from 
> settings.xml
> --------------------------------------------------------------------------------
>
>                 Key: MSITE-783
>                 URL: https://issues.apache.org/jira/browse/MSITE-783
>             Project: Maven Site Plugin
>          Issue Type: Bug
>          Components: multi module, property interpolation, relative links
>    Affects Versions: 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.5.1
>            Reporter: Alix Lourme
>         Attachments: variableSettingsSubLinkMenu.zip
>
>
> When the _distributionManagement.site.url_ contains a property filled in 
> _settings.xml_ like :
> _pom.xml_ :
> {code}
>     <distributionManagement>
>         <site>
>             <id>projectSite</id>
>             <url>${sitePublishLocation}/foo/${project.artifactId}</url>
>         </site>
>     </distributionManagement>
> {code}
> _settings.xml_:
> {code}
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <settings ...>
>     <profiles>
>         <profile>
>             <id>site-location</id>
>             <properties>
>                 
> <sitePublishLocation>file://tmp/sitePublish</sitePublishLocation>
>             </properties>
>         </profile>
>     </profiles>
>     <activeProfiles>
>         <activeProfile>site-location</activeProfile>
>     </activeProfiles>
> </settings>
> {code}
> The modules link menu in *target/site/index.html* are not interpolated:
> {code}
> ../../../../${sitePublishLocation}/foo/test-module-hierarchical/index.html
> {code}
> Problem can be reproduced with [^variableSettingsSubLinkMenu.zip] project.
> This command fails:
> {code}
> mvn site -s settings-site-location.xml
> {code}
> This command works:
> {code}
> mvn site -s settings-site-location.xml 
> -DsitePublishLocation="/tmp/sitePublish"
> {code}
> Probably a link with MSITE-604, but the v3.5 doesn't fix this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to