apache / maven-mvnd

Apache Maven Daemon
https://maven.apache.org/
Apache License 2.0
2.92k stars 212 forks source link

mvnd release:prepare and mvn release:prepare doesn't behave the same #1081

Open tofflos opened 4 months ago

tofflos commented 4 months ago

The goal release:prepare is interactive and will ask the user questions when running under mvn but not when running under mvnd. Another difference is that mvnd release:prepare will stall when used in conjunction with git config commit.gpgsign true even though the gpg passphrase has been "primed" in gpg-agent.

$ mvnd release:prepare
[INFO] Processing build on daemon 28cde3f8
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO]
[INFO] Using the SmartBuilder implementation with a thread count of 3
[INFO]
[INFO] --------------------------< com.example:app1 >--------------------------
[INFO] Building app1 0.0.6-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- release:3.1.1:prepare (default-cli) @ app1 ---
[INFO] starting prepare goal, composed of 17 phases: check-poms, scm-check-modifications, check-dependency-snapshots, create-backup-poms, map-release-versions, input-variables, map-development-versions, rewrite-poms-for-release, generate-release-poms, run-preparation-goals, scm-commit-release, scm-tag, rewrite-poms-for-development, remove-release-poms, run-completion-goals, scm-commit-development, end-release
[INFO] 1/17 prepare:check-poms
[INFO] 2/17 prepare:scm-check-modifications
[INFO] Verifying that there are no local modifications...
[INFO]   ignoring changes on: **/pom.xml.releaseBackup, **/pom.xml.next, **/pom.xml.tag, **/pom.xml.branch, **/release.properties, **/pom.xml.backup
[INFO] Executing: /bin/sh -c cd '/home/erik/projects/app1' && 'git' 'rev-parse' '--show-prefix'
[INFO] Working directory: /home/erik/projects/app1
[INFO] Executing: /bin/sh -c cd '/home/erik/projects/app1' && 'git' 'status' '--porcelain' '.'
[INFO] Working directory: /home/erik/projects/app1
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] 3/17 prepare:check-dependency-snapshots
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] 4/17 prepare:create-backup-poms
[INFO] Creating pom.xml backup with .releaseBackup suffix
[INFO] 5/17 prepare:map-release-versions
# Stall occurs here.
# I waited a few minutes then pressed Ctrl-C a couple of times to cancel the build.
$ mvn --version
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /home/erik/tools/mvn/current
Java version: 21.0.3, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-19041-microsoft", arch: "amd64", family: "unix"
$ mvnd --version
Apache Maven Daemon (mvnd) 1.0.1 linux-amd64 native client (621c13a190faf99724130a4dd0b8ec473a9cde44)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jni.linux.LinuxNativePty
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /home/erik/tools/mvnd/1.0.1/mvn
Java version: 21.0.3, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-19041-microsoft", arch: "amd64", family: "unix"

Not related but mvnd and mvn also report Maven Home a bit differently when displaying version information.

~/.local/bin/mvn -> /home/erik/tools/mvn/current/bin/mvn
# Maven home: /home/erik/tools/mvn/current

~/.local/bin/mvnd -> /home/erik/tools/mvnd/current/bin/mvnd
# Maven home: /home/erik/tools/mvnd/1.0.1/mvn