You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nicolas Dordet <do...@gmail.com> on 2008/12/01 12:02:59 UTC
Mojo's order execution in a plugin
Hi all,
I'm developing a maven plugin witch contain 2 mojos (abstractMavenReport).
I wanted maven to execute mojoA before mojoB when doing a "mvn site".
I saw that in the plugin descriptor my mojoB is declared before my mojoA.
How can I change that? Is there a way to change the plugin.xml manually and
add it to the jar created when executing mvn package or mvn install?
Re: Mojo's order execution in a plugin
Posted by Nicolas Dordet <do...@gmail.com>.
2008/12/1 Brett Porter <br...@apache.org>
> It's not a defined behaviour to honour the order of the plugin descriptor
> (nor is there a way to force that ordering when generating).
>
I solve my problem by modifiying the plugin.xml by hand (replacing order of
the mojo's declaration)... not really pretty but it work.
>
> Reports are not intended to be dependent on each other. Probably what you
> want to do here is write the common code into a goal that can be run in
> pre-site, then the two reports are generated based on that data.
>
In Fact, my second mojo need files generated by the first one. But the 2
mojo's have to give me a report at the end witch I want to have in the
report section of the maven's generated site.
Maybe I should revise my architecture...
Thx anyway
> Nico
>
> - Brett
>
>
> On 01/12/2008, at 10:02 PM, Nicolas Dordet wrote:
>
> Hi all,
>>
>> I'm developing a maven plugin witch contain 2 mojos (abstractMavenReport).
>> I wanted maven to execute mojoA before mojoB when doing a "mvn site".
>>
>> I saw that in the plugin descriptor my mojoB is declared before my mojoA.
>> How can I change that? Is there a way to change the plugin.xml manually
>> and
>> add it to the jar created when executing mvn package or mvn install?
>>
>
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Mojo's order execution in a plugin
Posted by Brett Porter <br...@apache.org>.
It's not a defined behaviour to honour the order of the plugin
descriptor (nor is there a way to force that ordering when generating).
Reports are not intended to be dependent on each other. Probably what
you want to do here is write the common code into a goal that can be
run in pre-site, then the two reports are generated based on that data.
- Brett
On 01/12/2008, at 10:02 PM, Nicolas Dordet wrote:
> Hi all,
>
> I'm developing a maven plugin witch contain 2 mojos
> (abstractMavenReport).
> I wanted maven to execute mojoA before mojoB when doing a "mvn site".
>
> I saw that in the plugin descriptor my mojoB is declared before my
> mojoA.
> How can I change that? Is there a way to change the plugin.xml
> manually and
> add it to the jar created when executing mvn package or mvn install?
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org