[
https://jira.codehaus.org/browse/MSITE-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312598#comment-312598
]
Herve Boutemy commented on MSITE-604:
-------------------------------------
I think we're going forward and backward from deciding if projects should be
interpolated by Maven (= what has been done with MSITE-585) core or not
interpolated and tweaked like it seems expected here
because Maven core interpolation rules are clear (see variable order in [Model
Interpolation|http://maven.apache.org/ref/3.0.4/maven-model-builder/]): pom
properties are used before settings properties, and CLI properties are used
before pom properties
just use mvn help:effective-pom and see
IMHO, setting a property in pom and hoping to override its value with settings
is a nonsense: if it worked once upon a time, this was pure hazard (and
probably broke a lot of things because using non-interpolated pom: we did the
ITs since then just to avoid re-doing the same mistakes over and over)
> Properties from settings.xml are not recognized in site distribution
> management
> --------------------------------------------------------------------------------
>
> Key: MSITE-604
> URL: https://jira.codehaus.org/browse/MSITE-604
> Project: Maven 2.x and 3.x Site Plugin
> Issue Type: Bug
> Components: site:deploy
> Affects Versions: 3.0
> Environment: Apache Maven 2.2.1 and 3.0.3
> Reporter: Marcin Kuthan
> Fix For: backlog
>
> Attachments: MSITE-604-it.patch, MSITE-604-maven3-2.patch,
> MSITE-604-maven3.patch, MSITE-604.tgz
>
>
> My distribution management section looks like:
> {code}
> <distributionManagement>
> <site>
> <id>${acme-corporate-pom.siteRepositoryId}</id>
> <url>${acme-corporate-pom.siteRepositoryUrl}</url>
> </site>
> </distributionManagement>
> {code}
> Where the default property values are defined in the pom:
> {code}
> <properties>
>
> <acme-corporate-pom.siteRepositoryId>acme-site</acme-corporate-pom.siteRepositoryId>
>
> <acme-corporate-pom.siteRepositoryUrl>scp://sites.intranet.acme.com/var/www</acme-corporate-pom.siteRepositoryUrl>
> </properties>
> {code}
> I'm able redefine properties from command line, the provided repository is
> used instead default one:
> {code}
> mvn site:site site:deploy
> -Dacme-corporate-pom.siteRepositoryUrl=scp://somehost/var/www/sites
> -Dacme-corporate-pom.siteRepositoryId=somehost
> {code}
> But when I redefine properties in the profile in {{settings.xml}}, they are
> ignored. The profile is activated in {{<activeProfiles}} element.
> It looks, than only m-site-p ignores properties defined in the
> {{settings.xml}} file. m-deploy-p recognizes properties as I expected
> (distribution management section for articats deployment is configured in
> similar way to site deployment).
> --
> Marcin Kuthan
> Maven For Enterprise - http://code.google.com/p/m4enterprise/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira