Sorry for the late answer.
There is "isExecutionRoot()" which tells you from where (usually the parent)
maven is executed.
But me, I do the ugly hack of checking if the project is the last one in the
reactor list...
@MojoParameter(expression = "${reactorProjects}", required = true,
readonly = true)
protected List<MavenProject> reactorProjects;
MavenProject lastproject = reactorProjects.get(nbProjects - 1);
if (lastproject.isExecutionRoot()) {
Not nice but it always works.
On 7/4/07, Carlos Santos <[EMAIL PROTECTED]> wrote:
Frederic, I was aware that you could tie the plugin to a phase or
packaging
type, however how would one have it run for the last project in the list?
Regards,
CS
On 7/3/07, Frederic Simon <[EMAIL PROTECTED]> wrote:
>
> It's the plugin job to be an "Aggregator" (run once per execution), or
to
> run only on certain packaging type, or to run for the last project in
the
> list. You cannot control it from the POM configuration.
>
> On 7/4/07, Carlos Santos <[EMAIL PROTECTED]> wrote:
> >
> > I have a master POM with packaging set as pom. This is a multi-module
> POM.
> > Is there a way to run a maven plugin once instead of for each module?
> From
> > what I read in the docs it seems that setting the packaging to pom
means
> > that every module listed inherits from the parent. I've tried setting
> > inherit to false with no results (does inherit only turn on/off
> inheriting
> > configurations?).
> >
> > Any suggestions?
> >
>
>
>
> --
> "CapsLock Key is like rear mirrors in BMW! Who needs them?"
> freddy33
>
--
"CapsLock Key is like rear mirrors in BMW! Who needs them?"
freddy33