Skip to content

Fix #367 for Maven 3.x - #419

Open
wilx wants to merge 2 commits into
apache:maven-help-plugin-3.4.xfrom
wilx:agent/fix-367-maven-3
Open

Fix #367 for Maven 3.x#419
wilx wants to merge 2 commits into
apache:maven-help-plugin-3.4.xfrom
wilx:agent/fix-367-maven-3

Conversation

@wilx

@wilx wilx commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Fixes #367 for 3.x branch.

This backports the lifecycle-mapping part of #372 to the maven-help-plugin-3.4.x maintenance branch. Maven 3.10 represents the default lifecycle's built-in bindings as an empty map. The 3.x implementation only fell back to the packaging-specific mapping when that map was null, so help:describe -Dcmd=deploy reported every phase as Not defined and the existing describe-cmd integration test failed in this Actions job.

The change treats both null and empty built-in mappings as packaging-specific and replaces the deprecated string lifecycle APIs with their typed equivalents. Those APIs were verified against Maven 3.6.3, the minimum version declared by this branch.

The commits are intentionally split: the first adds a unit regression that fails without the runtime change, and the second applies the fix. The existing describe-cmd IT provides end-to-end coverage of the reported failure.

Validation

  • Maven 3.6.3 / JDK 8: mvn clean verify -P run-its — 24 unit tests and all 34 ITs passed
  • Maven 3.9.16 / JDK 21: mvn clean verify -P run-its — 24 unit tests and all 34 ITs passed
  • Maven 3.10.0-rc-1 / JDK 17: mvn clean verify -P run-its — 24 unit tests and all 34 ITs passed, including describe-cmd

Checklist

  • This pull request addresses one issue without unrelated changes.

  • The description explains what changed, how, and why.

  • Each commit has a meaningful subject line and body.

  • A regression unit test fails without the runtime change.

  • mvn verify was run successfully.

  • The integration tests were run successfully with mvn -Prun-its verify.

  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004.

  • In any other case, an Apache Individual Contributor License Agreement has been filed.

wilx added 2 commits August 10, 2026 23:52
Model Maven 3.10's empty default lifecycle map and verify that help:describe uses the packaging-specific lifecycle mapping.
Treat an empty default lifecycle map like a missing map so Maven 3.10 falls back to packaging-specific bindings. Replace the deprecated string mappings with the typed lifecycle APIs available since Maven 3.6.3.
@wilx
wilx marked this pull request as ready for review August 10, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant