Hi,
> MG>lifecycle --> executes --> phase --> executes goal --> goal execution > MG>you can however reorder your lifecycle by creating a custom-lifecycle > and custom-goal(s) via maven-lifecycle-mapping > > https://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html > > MG>in that way you can implement a specific custom-goal within your > custom-lifecycle: > MG>mvn custom-lifecycle:custom-goal > > MG>makes sense? Actually, defining a custom lifecycle seems a bit too much for this simple task. But what I read from your link: " @execute phase="<phase>" This will fork an alternate build lifecycle up to the specified phase before continuing to execute the current one. If no lifecycle is specified, Maven will use the lifecycle of the current build. " lets me assume that it should be possible to force the execution of the "package" phase before actually executing my plugin. I have tried it this way: ----/---- @Mojo(name="upload", defaultPhase=LifecyclePhase.PACKAGE, requiresDependencyResolution=ResolutionScope.RUNTIME ) @Execute(goal="upload", phase=LifecyclePhase.PACKAGE) public class UploadMojo extends AbstractMojo { ... } ----/---- But obviously it doesn't work. Did I misunderstand something? Do I still need to define a custom lifecycle? But what are these annotations for then? Or do I have misused the annotations? Best regards Marco --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
