You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tomasz Krakowiak (JIRA)" <ji...@codehaus.org> on 2013/11/04 13:42:52 UTC

[jira] (MRELEASE-726) mvn release:prepare-with-pom not honouring the commitByProject parameter.

    [ https://jira.codehaus.org/browse/MRELEASE-726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335107#comment-335107 ] 

Tomasz Krakowiak commented on MRELEASE-726:
-------------------------------------------

I don't like the way chose to handle checkout with submodules. It look like you assumed scm:checkout is only used by maven-release-plugin and "commitByProject" option just with git.
Using commitByProject=true and pushChanges=false is common workaround for lack of support of git-submodules in git scm providers. However what if we have tagged only aggregating repository? Such checkout would fail. Parent repository alredy have referenced commits whe should checkout.
                
> mvn release:prepare-with-pom not honouring the commitByProject parameter.
> -------------------------------------------------------------------------
>
>                 Key: MRELEASE-726
>                 URL: https://jira.codehaus.org/browse/MRELEASE-726
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: Git, prepare-with-pom
>    Affects Versions: 2.2.2
>         Environment: Linux 64bit (Ubuntu).
>            Reporter: Dave Fennell
>            Priority: Blocker
>         Attachments: bug-726-scenario.zip, MNG-726-maven-release-manager.patch, MNG-726-maven-scm-provider-gitexe.patch, patched_output.txt, pre_patched_output.txt
>
>
> Using this in my pom file:
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-release-plugin</artifactId>
> 				<version>2.2.2</version>
> 				<configuration>
> 					<goals>deploy</goals>
> 					<pushChanges>false</pushChanges>
> 					<localCheckout>true</localCheckout>
> 					<commitByProject>true</commitByProject>
> 				</configuration>
> 			</plugin>
> {code}
> Running this command:
> {{mvn release:prepare}}
> Correctly goes into each directory to make changes, e.g. 
> {noformat}
> [INFO] Checking in modified POMs...
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel && git add -- pom.xml
> [INFO] Working directory: /usr/local/src/whitelabel
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel && git status
> [INFO] Working directory: /usr/local/src/whitelabel
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel && git commit --verbose -F /tmp/maven-scm-561169862.commit pom.xml
> [INFO] Working directory: /usr/local/src/whitelabel
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel/foundation && git add -- pom.xml
> [INFO] Working directory: /usr/local/src/whitelabel/foundation
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel/foundation && git status
> [INFO] Working directory: /usr/local/src/whitelabel/foundation
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel/foundation && git commit --verbose -F /tmp/maven-scm-2018482909.commit pom.xml
> {noformat}
> etc ...
> However running this command:
> {{mvn release:prepare-with-pom}}
> So that I can generate a release-pom.xml file errors because it attempts to do all the checkins on one line:
> {noformat}
> [INFO] Executing: /bin/sh -c cd /usr/local/src/whitelabel && git add -- release-pom.xml foundation/release-pom.xml module/release-pom.xml module/advertising/release-pom.xml module/buttonconfig/release-pom.xml module/core/release-pom.xml module/film/release-pom.xml module/profile/release-pom.xml module/proxy/release-pom.xml module/rental/release-pom.xml module/service/release-pom.xml module/smartcard/release-pom.xml module/telephony/release-pom.xml module/terminalui/release-pom.xml module/tv/release-pom.xml module/upsell/release-pom.xml module/urlconfig/release-pom.xml mule/release-pom.xml mule/advertising/release-pom.xml mule/button-config/release-pom.xml mule/film/release-pom.xml mule/hospediacard/release-pom.xml mule/location/release-pom.xml mule/profile/release-pom.xml mule/proxy/release-pom.xml mule/rental/release-pom.xml mule/service/release-pom.xml mule/smartcard/release-pom.xml mule/startup/release-pom.xml mule/terminaluimenu/release-pom.xml mule/tv/release-pom.xml mule/upsell/release-pom.xml mule/urlconfig/release-pom.xml
> {noformat}
> This doesn't work for my setup because each directory is a git submodule so must be run separately, it looks to me like it's simply ignoring the {{commitByProject}} setting, but the docs (http://maven.apache.org/plugins/maven-release-plugin/prepare-with-pom-mojo.html) list it as being a supported property since {{2.0-beta5}}.  I've marked this as a blocker because I wanted to use the release-pom.xml and I have no way to generate them now (since the {{-DgenerateReleasePoms}} option on the {{release:prepare}} goal seems to have been deprecated).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira