> "
> @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?

Well, it seems that this annotation _does_ work. The jar is getting
generated in the target directory as expected. But still
"project.getArtifact().getFile()" returns null. Why is this the case?


Best regards
Marco


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to