John S
John S

Reputation: 1747

Multiple goals in maven mojo

I am developing a mojo that I envision will have 2 goals.

e.g.

    /**
    * @goal validate-user-config
    * @goal build-user-project
    */

So far I've only ever defined a single goal with the syntax above. My question is how can I create two goals and conditionally vary the behavior of the execute() function?

Upvotes: 2

Views: 2007

Answers (1)

khmarbaise
khmarbaise

Reputation: 97537

Just implement two mojo classes one mojo class per goal in particular if they have different functionallity.

Upvotes: 3

Related Questions