On Thu, Mar 10, 2022 at 5:22 AM Nils Breunese <n...@breun.nl> wrote: > Thomas Broyer <t.bro...@gmail.com> wrote: > > > Le mer. 9 mars 2022 à 23:48, Nils Breunese <n...@breun.nl> a écrit : > > > >> The Maven build lifecycle consists of phases [0] and you can bind plugin > >> goals to phases. As far as I know it doesn’t work the other way around, > so > >> you can’t make a plugin goal execute particular phases, which seems to > be > >> what you’re asking. It should be the other way around: you can > associate a > >> plugin goal with a phase and then when you execute that phase all > previous > >> phases will have been executed, and your plugin goal will be executed. > > > > This is not entirely true. A mojo can be annotated with @Execute() to > > execute a lifecycle up to a given phase before the mojo itself is > executed. > > That's the difference between jar:jar and jar:jar-no-fork for instance. > > Ah, interesting, I didn’t know that. But that can only controlled by the > Maven plugin developer then.
Indeed ( https://maven.apache.org/developers/mojo-api-specification.html#the-descriptor-and-annotations), but that was what Steve was asking about, right? -- Thomas Broyer /tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/>