Hi Sebastian,
first: Not sure if we should discuss the issue here or in the Github
issue :D
My personal thought on the descirbed problem: I guess that in most cases
the user does not know that it's not needed to list all or that the user
does not know how to solve a specific situation, e.g. the user wants to
make sure that all projects are based, before installed/deployed so he
first runs "verify" on all and then "install/deploy" on all instead of
switching configuration "installAtEnd" / "deployAtEnd" to "true". Based
on the issue you linked there might be other cases that several
executes in a specific order might be a reasonible thing.
So my gut feeling is:
If two (or more) phases (including pre/post or new before/after) of the
same life cycle are listed in the "ascending" order without nothing else
(e.g. a specific plugin goal) in between, only the latest should be
executed and an INFO message tells the user about this. There should
also be a configuration option to disable this behavior and get back to
current state
Phases of different lifecycles or phased of the same not in "ascending"
order should not be touched. For the later situation you could think
about an INFO message to "ask" if they really want to do this but not sure.
Have a nice Sunday evening
Matthias
Am 02.10.2026 um 10:58 schrieb Sebastian Tiemann via dev:
hey all,
I had a look at this oldie https://issues.apache.org/jira/browse/MNG-5885 and that made me think about how to better handle maven executions like 'mvn package compile'.
I would love to hear you thoughts about it. Here are some ideas:
* Execute everything with all duplicate lifecycle phases and to nothing
(current state)
* Execute everything with all duplicate lifecycle phases and print a log
message, e.g. warn
* Filter the duplicate lifecycle phases and only execute the lifecycle
phases from install in this case. Print a log message, e.g. warn
o the filtering code could look like this:
https://github.com/apache/maven/pull/13270
o hint: this also includes removing lifecycles from duplicated goals
in a specific order
* Throw an error: Doing this is a bad idea.
Thanks,
Sebastian
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]