You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2012/12/05 21:54:13 UTC
[jira] (MRELEASE-735) Profile activation working unpredictably
[ https://jira.codehaus.org/browse/MRELEASE-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315080#comment-315080 ]
Robert Scholte commented on MRELEASE-735:
-----------------------------------------
Could you try the maven-release-plugin 2.4-SNAPSHOT? Profile resolution has changed for M3, so I can imagine that this is fixed as well.
> Profile activation working unpredictably
> ----------------------------------------
>
> Key: MRELEASE-735
> URL: https://jira.codehaus.org/browse/MRELEASE-735
> Project: Maven 2.x Release Plugin
> Issue Type: Bug
> Components: perform
> Affects Versions: 2.2.2
> Reporter: Thorsten Koch
> Attachments: parent.zip
>
>
> In an attempt to work around issue http://jira.codehaus.org/browse/MASSEMBLY-457 I tried to use the following profiles to set a property depending of the existens of a certain directory in my multimodule build:
> {code:xml}
> <profiles>
> <profile>
> <id>runAssembly</id>
> <activation>
> <file>
> <exists>src/main/sql</exists>
> </file>
> </activation>
> <properties>
> <skipAssembly>false</skipAssembly>
> </properties>
> </profile>
> <profile>
> <id>dontRunAssembly</id>
> <activation>
> <file>
> <missing>src/main/sql</missing>
> </file>
> </activation>
> <properties>
> <skipAssembly>true</skipAssembly>
> </properties>
> </profile>
> </profiles>
> {code}
> This is working well in normal builds. I can use the ${skipAssembly} property to switch on and of the assembly plugin depending of the directory existence in my modules.
> However, in the build run by the release:perform goal, this does not work. In this case always the second profile from the above is activated, regardless if the directory exists or not.
> But I found out (after a lot of tries), that it DOES work if the order of the profiles above is just changed. So when I write it like this
> {code:xml}
> <profiles>
> <profile>
> <id>dontRunAssembly</id>
> <activation>
> <file>
> <missing>src/main/sql</missing>
> </file>
> </activation>
> <properties>
> <skipAssembly>true</skipAssembly>
> </properties>
> </profile>
> <profile>
> <id>runAssembly</id>
> <activation>
> <file>
> <exists>src/main/sql</exists>
> </file>
> </activation>
> <properties>
> <skipAssembly>false</skipAssembly>
> </properties>
> </profile>
> </profiles>
> {code}
> THEN it's working even in release:perform builds. I have no idea what the triggering change is, but it seems worth creating an issue.
--
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