Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Pending Closed
-
2.2.2
-
None
-
None
-
Linux 64bit (Ubuntu).
Description
Using this in my pom file:
<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>
Running this command:
mvn release:prepare
Correctly goes into each directory to make changes, e.g.
[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
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:
[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
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).