Skip to content

Warn when profile ID matches a lifecycle phase name#11926

Open
utafrali wants to merge 1 commit intoapache:masterfrom
utafrali:fix/issue-10310-lifecycle-phase-profile-warning
Open

Warn when profile ID matches a lifecycle phase name#11926
utafrali wants to merge 1 commit intoapache:masterfrom
utafrali:fix/issue-10310-lifecycle-phase-profile-warning

Conversation

@utafrali
Copy link
Copy Markdown

When a profile ID matches a default Maven lifecycle phase name (e.g. "test", "deploy", "integration-test"), users can accidentally trigger that phase. This adds a validation warning to alert about the potential confusion.

Includes a new test case with a POM containing both phase-matching and safe profile IDs.

Closes #10310

Emit a validation warning when a profile ID matches a default Maven
lifecycle phase (clean, compile, test, package, deploy, etc.). Using
lifecycle phase names as profile IDs can lead to accidental phase
execution when the name is misused on the command line.

Closes apache#10310
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.

[MNG-8762] Print warning, when profile has name of a lifecycle phase

1 participant