mvnd release:prepare and mvn release:prepare doesn't behave the same
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 250
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 36
Description
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.
```bash
$ 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.
```
```bash
$ 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"
```
```bash
$ 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.
```bash
~/.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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with `mvn release:prepare` and `mvnd release:prepare`, including `git config commit.gpgsign true`, and compare the interactive behavior and the stall at `map-release-versions`. Trace the mvnd release:prepare execution from the reported 17-phase log; done means both commands prompt consistently and the signed-commit case completes without stalling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java, linux
- Domain
- build-system, cli, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100