Then I kindly request to put this topic into the Maven 5 backlog already, referring to this thread as a resource. How the team shall prioritise it is another topic, but that way at least it would not get lost.
One more question: If I would copy the plugin configuration from 'build' redundantly (ugh!) into the profile in question, would that enforce the order, the way Maven 3.6.3+ is designed today? -- Alexander Kriegisch https://scrum-master.de Tibor Digana schrieb am 09.05.2021 01:19 (GMT +07:00): > If two plugins with the same phase appear in the build section of one > POM, then their order matters. If they split in build and a profile, > then the order is not guaranteed because there are no in one XML > section and so the order cannot be determined. > > This might be possible in Maven 5. Let's ask such a question regarding > Maven 5 in our mailing list. We are developing a new approach in Maven > 5 and every problem may help us to make a better design. > > > On Fri, May 7, 2021 at 1:15 AM Alexander Kriegisch wrote: > >> I noticed an unexpected thing about plugin execution order: If I have >> several plugins running in the same phase, normally they are executed >> in the lexical order in which they appear in the POM. But there is a >> case in which this can change. Schematically, it looks like this: >> >> <profiles> >> <profile P> >> <build> >> <plugins> >> <plugin A, phase X /> >> </plugins> >> </build> >> </profile P> >> </profiles> >> >> <build> >> <plugins> >> <plugin B, phase X /> >> </plugins> >> </build> >> >> My expectation was that the execution order in phase X would be >> plugin A, then B. This is true sometimes, depending on which build >> other profiles are active. I mean completely unrelated profiles >> defined in other Maven modules. In my specific case, without >> specifying any other profiles (P is auto-activated bases on >> non-existence of a file), the order was B, A. If I manually activated >> any other profile or de-activated a profile which otherwise would be >> active automatically, the order changed to A, B. >> >> In my case, I had the option of moving plugin B to a later phase, >> which settled the issue for me, but that is not always possible. >> >> Can anybody enlighten me on what is happening here and if this >> behaviour is documented anywhere? Or is this just the "read the >> freakin' source code, pal" kind of detail? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org