Re: Maven plugin with annotations: default lifecycle phase?

2019-02-12 Thread Thomas Broyer
Adding the plugin won't be enough, you'll have explicitly name the mojo in an . What defaultPhase does is that you don't have to specify a in the . Actually, you can even list all mojos in the same even if they're bound to different default phases: … … … mojo1

Re: Maven plugin with annotations: default lifecycle phase?

2019-02-12 Thread Anders Hammar
You still need to declare an execution for the plugin in your pom.xml. In the execution you don't need to declare the phase though as you have a default one defined in the mojo. /Anders On Tue, Feb 12, 2019 at 9:40 AM Dirk Olmes wrote: > Hi, > > I'm creating a Maven plugin using Java

Maven plugin with annotations: default lifecycle phase?

2019-02-12 Thread Dirk Olmes
Hi, I'm creating a Maven plugin using Java Annotations and I'd like my plugin to be bound to a default lifecycle phase so I don't have to explicitly bind it to a phase in my regular projects. So far I use @Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES) public class