Re: MSITE-604 - Properties from settings.xml are not recognized in site distribution management
Hi, First: thanks for working on this! I have had a brief look and have a few comments: 1) your patch of IT MSITE-604 seems to address a different issue than the one originally described in the JIRA. If this is the case you should open a separate ticket. 2) I am wondering about the validity of the use case. You are putting the following property into a profile inside settings.xml: msite604.siteRepositoryUrlfile://@project.build.directory@/it/MSITE-604/target/settingsRepositoryUrl/msite604.siteRepositoryUrl However, the settings guide [1] states that only system and environment variables can be interpolated in settings.xml and furthermore, properties defined in profiles within the settings.xml cannot be used for interpolation at all. 3) Finally, the syntax @project.build.directory@ is known and used only by the invoker plugin (AFAIK) [2], the site plugin shouldn't be concerned with interpolating this. It is not clear to me how this would be relevant in a stand-alone project, maybe you can attach a small test project to reproduce the issue. I'd also appreciate the opinion of other devs with better property/interpolation knowledge, I confess I am confused by this issue... Cheers, -Lukas [1] http://maven.apache.org/settings.html [2] http://maven.apache.org/plugins/maven-invoker-plugin/examples/filtering.html On Mon, Oct 29, 2012 at 5:38 PM, Vincent Latombe vincent.lato...@gmail.com wrote: Hello, I think I have an acceptable IT + fix for this issue [1] (at least in Maven 3 context), so I would be really grateful if someone with karma could take a look at it and let me know about it :) Cheers, [1] http://jira.codehaus.org/browse/MSITE-604 -- Vincent - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: MSITE-604 - Properties from settings.xml are not recognized in site distribution management
Hi, thank you for your feedback! 1) Several issues are actually interleaved, I believe the patch I propose also fix MSITE-632, and maybe other related issues, I haven't reviewed them all. Overall, the root cause seems to be that the parent is returned without being interpolated (see my comment [1]). 2)3) I believe @...@ are replaced by maven-invoker-plugin before calling the IT itself, so from the IT, this is an absolute path. To sum up : - a parent pom is declaring the site url (including protocol) in a property that is provided *only* by settings.xml - the parent pom's site is correctly built/deployed - but, if you declare a child pom, it retrieves the site declaration from parent, not interpolated, so the plugin will complain about the missing protocol [2] Vincent [1] http://jira.codehaus.org/browse/MSITE-604?focusedCommentId=296956page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-296956 [2] http://jira.codehaus.org/browse/MSITE-604?focusedCommentId=290463page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-290463 2012/10/30 Lukas Theussl ltheu...@apache.org Hi, First: thanks for working on this! I have had a brief look and have a few comments: 1) your patch of IT MSITE-604 seems to address a different issue than the one originally described in the JIRA. If this is the case you should open a separate ticket. 2) I am wondering about the validity of the use case. You are putting the following property into a profile inside settings.xml: msite604.siteRepositoryUrlfile://@project.build.directory@ /it/MSITE-604/target/settingsRepositoryUrl/msite604.siteRepositoryUrl However, the settings guide [1] states that only system and environment variables can be interpolated in settings.xml and furthermore, properties defined in profiles within the settings.xml cannot be used for interpolation at all. 3) Finally, the syntax @project.build.directory@ is known and used only by the invoker plugin (AFAIK) [2], the site plugin shouldn't be concerned with interpolating this. It is not clear to me how this would be relevant in a stand-alone project, maybe you can attach a small test project to reproduce the issue. I'd also appreciate the opinion of other devs with better property/interpolation knowledge, I confess I am confused by this issue... Cheers, -Lukas [1] http://maven.apache.org/settings.html [2] http://maven.apache.org/plugins/maven-invoker-plugin/examples/filtering.html On Mon, Oct 29, 2012 at 5:38 PM, Vincent Latombe vincent.lato...@gmail.com wrote: Hello, I think I have an acceptable IT + fix for this issue [1] (at least in Maven 3 context), so I would be really grateful if someone with karma could take a look at it and let me know about it :) Cheers, [1] http://jira.codehaus.org/browse/MSITE-604 -- Vincent - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [jira] (MSITE-604) Properties from settings.xml are not recognized in site distribution management
PLEASE REMOVE ME FROM THIS MAILING LIST!!! Herve Boutemy (JIRA) j...@codehaus.org wrote: = [ https://jira.codehaus.org/browse/MSITE-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=312635#comment-312635 ] Herve Boutemy commented on MSITE-604: - yes, you should force users to define the value in their settings.xml, and cannot provide a default value in pom for those that didn't do their config (for the doc, I'm writing things I'm learning year after year on Maven internals, then doc is improving version after version: see http://maven.apache.org/ref/3.1-SNAPSHOT/ for latest improvements) 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.siteRepositoryIdacme-site/acme-corporate-pom.siteRepositoryId acme-corporate-pom.siteRepositoryUrlscp://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 -- Wayne E Seth PMP CEA Enterprise Architect (c) 520-456-6169 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org