You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frank Mena <ma...@gmail.com> on 2005/12/19 06:21:02 UTC

Controlling lifecycle

I am the co-author (with andreas Brenk) of the Jibx plugin and have a
problem when running it.

Jibx is a XML-Java library that does bytecode enhancement.  Any class that
is referenced in the binding file is enhanced when the plugin is run.  This
includes enhancement of  classes that are in the 'classes' directory in
other modules when running in multi-module mode.

The problem is the classes have to be enhanced before they are Jar'red.  If
in a multi-module project I run:

mvn process-classes package

Maven runs all the lifecycles up to 'package'  for each module before it
processes the next module.  This means that the modules are jar'ed, then
bytecode enhanced, so the bytecoded classes are not included in the jars.

Is there a way to get maven to run the 'process-classes' lifecycle for all
the modules before running 'package' without having to run maven twice?

Frank Mena

Re: Controlling lifecycle

Posted by dan tran <da...@gmail.com>.
you may want to bind your mojo to compile phase. ie, after compile mojo
completes, your mojo will run

-D


On 12/21/05, Frank Mena <ma...@gmail.com> wrote:
>
> Can anyone answer this question?
>
> On 12/18/05, Frank Mena <ma...@gmail.com> wrote:
> >
> > I am the co-author (with andreas Brenk) of the Jibx plugin and have a
> > problem when running it.
> >
> > Jibx is a XML-Java library that does bytecode enhancement.  Any class
> that
> > is referenced in the binding file is enhanced when the plugin is
> run.  This
> > includes enhancement of  classes that are in the 'classes' directory in
> > other modules when running in multi-module mode.
> >
> > The problem is the classes have to be enhanced before they are Jar'red.
> > If in a multi-module project I run:
> >
> > mvn process-classes package
> >
> > Maven runs all the lifecycles up to 'package'  for each module before it
> > processes the next module.  This means that the modules are jar'ed, then
> > bytecode enhanced, so the bytecoded classes are not included in the
> jars.
> >
> > Is there a way to get maven to run the 'process-classes' lifecycle for
> all
> > the modules before running 'package' without having to run maven twice?
> >
> > Frank Mena
> >
> >
>
>

Re: Controlling lifecycle

Posted by Frank Mena <ma...@gmail.com>.
Can anyone answer this question?

On 12/18/05, Frank Mena <ma...@gmail.com> wrote:
>
> I am the co-author (with andreas Brenk) of the Jibx plugin and have a
> problem when running it.
>
> Jibx is a XML-Java library that does bytecode enhancement.  Any class that
> is referenced in the binding file is enhanced when the plugin is run.  This
> includes enhancement of  classes that are in the 'classes' directory in
> other modules when running in multi-module mode.
>
> The problem is the classes have to be enhanced before they are Jar'red.
> If in a multi-module project I run:
>
> mvn process-classes package
>
> Maven runs all the lifecycles up to 'package'  for each module before it
> processes the next module.  This means that the modules are jar'ed, then
> bytecode enhanced, so the bytecoded classes are not included in the jars.
>
> Is there a way to get maven to run the 'process-classes' lifecycle for all
> the modules before running 'package' without having to run maven twice?
>
> Frank Mena
>
>