Re: Weird behavior in plugin phase resolution

2023-06-27 Thread Romain Manni-Bucau
You can take jetty example, no phase -> resolution -> failure if you use a not resolvable version or whatever. If you put a phase which is not "current" one then you get a passing build. This is a very bad end user experience cause you fixed something by a completely wrong solution IMHO. Romain M

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Christoph Läubrich
Can you please given an example where adding a phases "fixes" the build, this does not fix anything nor would I suspect a user will use such a solution to fix something that is completely hypothetical for me, as I either would fix the error (e.g. wrong group id) or remove the execution at all..

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Romain Manni-Bucau
Le mar. 27 juin 2023 à 08:27, Christoph Läubrich a écrit : > I'm not sure what snippet you refer to? If you mean the link, I don't > see any issue with it, if a phase is specified there is no need to > determine the default what might lead to a mojo never executed because I > specify a non existi

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Christoph Läubrich
I'm not sure what snippet you refer to? If you mean the link, I don't see any issue with it, if a phase is specified there is no need to determine the default what might lead to a mojo never executed because I specify a non existing phase or specify one that is not executed at all... Am 27.06.

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Romain Manni-Bucau
Well I agree we should be lazy if we can but not at the cost to make look like fixing the issue is about adding a phase (which makes the plugin ignored actually and does not fix the build). So think the snippet I sent should either always resolve the evaluated plugins or warn a plugin was wrongly r

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Christoph Läubrich
The main point is: If my build is "broken" by adding another phase, it is not broken by that fact, it was broken before. > Do you have some example about that, where it is placed it shouldn't > until you use maven-core as a lib and then you have to reimplement the > maven preconditions AFAIK. I

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Romain Manni-Bucau
Hi Christoph, Added a few questions inline cause I'm not sure I got it all. Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn

Re: Weird behavior in plugin phase resolution

2023-06-26 Thread Christoph Läubrich
Just a few remarks: 1) There might be situations were no cache is there so it can hurt performance to resolve "useless" plugins (e.g. from deploy phase) and probably long dependency chains. 2) one should not optimize for the error case, if I never test my project it is not the task of maven

Weird behavior in plugin phase resolution

2023-06-26 Thread Romain Manni-Bucau
Hi all, With JB Onofré we discussed a surprising behavior of maven plugin execution chain. Long story short it is this piece of code: https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java#L93 . The overall ide