Hi,

In my plugin I have a goal that is invoked manually:

mvn os:my-goal

The goal is invoked from the master project directory of a multi module
project.
I would like to force the compile phase before my goal is invoked.
It should be like invoking the following command line:

mvn compile os:my-goal     // this works

In order to do that I added the following annotation to the goal's Mojo:

/**
 * @goal my-goal
 * @execute phase=test-compile
 */

This suppose to force the execution of the lifecycle untill the test-compile
phase before the Mojo is executed.
It works when running the goal from a sub module with packaging=jar; It
doesn't work when invoking the goal from the master project directory
(packaging=pom).

Instead I get the following message:

No goals needed for project - skipping

and my goal is invoked immediatelly.

I guess I'm doing something wrong.
Can anyone help?

Thanks,
Shai
-- 
View this message in context: 
http://www.nabble.com/Forcing-the-execution-of-a-phase-before-a-goal-tp16005279s177p16005279.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to