1

I have two strange behavior with my mvn release:prepare

1/ It do not stop when there is local changes not committed even if it detect them !

[DEBUG] release.properties not found - using empty properties
[INFO] Verifying that there are no local modifications...
[INFO]   ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup
[INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
[INFO] Working directory: D:\XX
[INFO] Executing: cmd.exe /X /C "git status --porcelain ."
[INFO] Working directory: D:\XX
[DEBUG] A  testFab2
[DEBUG] ?? release.properties
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] Checking dependencies and plugins for snapshots ...
What is the release version for "XX-parent"? (YY:XX-parent) 1.3.2: :

2/ It doesn't commit and push the modified pom.xml...

And more confusing, the normal behaviour occurs well on my colleague computer. We have the same configuration. Here some tech infos :

Git

git version 2.16.2

mvn --version

 Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
 Maven home: D:\tools\apache-maven-3.5.3
 Java version: 1.8.0_162, vendor: Oracle Corporation
 Java home: C:\Program Files\Java\jdk1.8.0_162\jre
 Default locale: fr_FR, platform encoding: Cp1252
 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

plugin maven-release

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-release-plugin</artifactId>
   <version>2.5.3</version>
   <configuration>
       <goals>install</goals>
       <tagNameFormat>@{project.version}</tagNameFormat>
       <autoVersionSubmodules>true</autoVersionSubmodules>
       <preparationGoals>verify</preparationGoals>
       <arguments>-Dmaven.javadoc.skip=true -Dmaven.site.skip=true</arguments>
   </configuration>
</plugin>

I hve tried downgrade the pluginlike in this post : mvn release:prepare not committing changes to pom.xml, but without success

If you have some ideas... Thank you

fcs
  • 11
  • 2

1 Answers1

0

Use maven command with PushChanges=false.