[ 
http://jira.codehaus.org/browse/MRELEASE-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106340
 ] 

Matt Ryall commented on MRELEASE-260:
-------------------------------------

A simpler workaround is to use the -Darguments system property for the 
release:perform step like so:

{noformat}
mvn release:perform -Darguments=-Pprivate
{noformat}

> Profiles given on command-line not added to exec.additionalArguments
> --------------------------------------------------------------------
>
>                 Key: MRELEASE-260
>                 URL: http://jira.codehaus.org/browse/MRELEASE-260
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-6
>            Reporter: Matt Ryall
>
> In my POM, I have two distribution management sections, each in a separate 
> profile:
> {code:xml}
> ...
>     <profiles>
>        <profile>
>             <id>private</id>
>             <distributionManagement>
>                 <repository>
>                     <id>private-repository</id>
>                     <url>scp://repository.example.com/opt/mvn/private</url>
>                 </repository>
>             </distributionManagement>
>         </profile>
>        <profile>
>             <id>public</id>
>             <distributionManagement>
>                 <repository>
>                     <id>public-repository</id>
>                     <url>scp://repository.example.com/opt/mvn/public</url>
>                 </repository>
>             </distributionManagement>
>         </profile>
>     </profiles>
> {code}
> Running {{mvn release:prepare -Ppublic}} puts the following line in 
> release.properties:
> {{exec.additionalArguments=-P default-profile,default-profile}}
> (The profile "default-profile" is the profile in my settings.xml which is 
> active by default.) 
> If the release plugin was working correctly, this line would be:
> {{exec.additionalArguments=-P default-profile,public}}
> In earlier betas, I believe this worked correctly. The workaround I'm using 
> is to run {{mvn release:prepare}}, then {{mvn release:perform}}. The second 
> command fails, and I go to {{target/checkout}}, and run {{mvn deploy 
> -Ppublic}} manually.
> Changing {{release.properties}} doesn't work, either. It seems like 
> {{release:perform}} uses its own list of profiles, not the ones in the 
> properties file.

-- 
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

        

Reply via email to