Thank you, but it didn't worked (the option: @requiresProject false) 
 
What we are trying to do is have in a directory only a pom.xml that will have 
several modules.  And then call our plugin that does a download from an MKS 
Source Integrity repository all the modules (creates the modules directories 
and gets the poms and source files).  Actually the plugin that we are creating 
should continue and build those modules and create the deployment bundle all in 
one run.
 
Right now the only option that I see is to run the download with the -N option.
 
But that something that you should consider for the next version, let the 
packaging (in this case pom) manage the lifecycle.
 
Thanks for all you help.
 
Laura

________________________________

From: John Casey [mailto:[EMAIL PROTECTED]
Sent: Tue 9/26/2006 11:56 AM
To: Maven Developers List
Subject: Re: How can I create an aggregator



Sorry guys, but Maven will try to resolve/build all projects before running
any plugins. This means that if the other projects are listed in the modules
list, it will try to locate/build those project instances before the plugin
in question is executed.

I'm afraid I don't have a good suggestion for doing what you're attempting
to do. This is sort of a materialization step, I guess. One thing I might
say is that you could annotate the custom mojo with:

@requiresProject false

Then, you could manually locate and build the top-level POM, and use the
information in that POM to "materialize" the other project directories from
SCM. Then, you'd be set to re-execute maven with the default lifecycle, if
you wanted. However, it's currently a two-step operation.

If you want, you're welcome to participate in the design for 2.1's revision
of lifecycles and plugin execution. The discussion doco is sort of skeletal,
but it's at:

http://docs.codehaus.org/display/MAVEN/Lifecycle+and+Plugin+Handling

-john

On 9/26/06, dan tran <[EMAIL PROTECTED]> wrote:
>
> if you only want your plugin to run first before all modules are built,
> then
> create another module to run your plugin, then
> set that module first on the list of your <modules> element.
>
> would this work?
>
> -Dan
>
>
>
>
>
> On 9/26/06, Laura Hinojosa <[EMAIL PROTECTED]> wrote:
> >
> > I did that, and doesn't work, because I need the plugin to run BEFORE
> the
> > modules are built, because the plugin downloads the modules from a MKS
> > repository into the local repository.
> >
> > The only way I found so far to doit is the use the -N switch, but I'm
> > searching if there is other way, like reimplementing an interface or
> > something else.
> >
> > Do you have any idea??
> >
> > ________________________________
> >
> > From: Kenney Westerhof [mailto:[EMAIL PROTECTED]
> > Sent: Tue 9/26/2006 9:40 AM
> > To: Maven Developers List
> > Subject: Re: How can I create an aggregator
> >
> >
> >
> >
> > Hi,
> >
> > You should add @aggregator to the javadoc comment on the Mojo class;
> > that'll ensure the plugin runs after all modules have been built.
> >
> > -- Kenney
> >
> > Laura Hinojosa wrote:
> > > I'm having trouble with a plug-in that we are developing because of
> this
> > improvement:
> > >
> > > *     MNG-764 - pom with modules should fail if packaging is not pom
> or
> > an aggregator
> > >
> > > Our plug-in has a goal that downloads projects from and MKS
> repository,
> > when we try to execute this goal with a multimodule artifact (pom
> packaging)
> > we get an error because is trying to go through the modules BEFORE it
> > executes the plug-in (so the modules are not there yet).
> > >
> > > I tried to create another packaging instead of pom, that will execute
> > our mojo first, but I got the error that says that I need to have a pom
> for
> > an aggregator.
> > >
> > > So the questions is how do I create an aggregator??
> > >
> > > Any help will be appreciated.
> > >
> > > Thank you
> > >
> > > Laura
> > >
> > >
> > > ------------------------------------------------
> > >
> > > This e-mail, and any attachments thereto, is confidential and is
> > intended only for the individual(s) named.  If you are not the intended
> > recipient, please let us know by e-mail reply and delete it from your
> > system; do not copy/save this e-mail or disclose its contents to
> > anyone.  E-mail transmissions cannot be guaranteed to be secure or
> > error-free as the transmission could be interrupted, corrupted, lost,
> > destroyed, altered, arrive late or contain viruses.  ObjectWave does not
> > accept liability for any errors or omissions in the contents of this
> e-mail
> > which arise as a result of e-mail transmission.  The views expressed in
> this
> > e-mail do not necessarily reflect those of ObjectWave or its affiliates.
> > >
> > > ------------------------------------------------
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
>
>


Reply via email to