You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kallin Nagelberg <ka...@gmail.com> on 2007/12/29 22:02:55 UTC

Plugins within plugins: best practices

Hello everyone,

I've created a standalone plugin in which I'm doing some unpacking/copying
of artifacts in addition to a few other things. I would like to defer the
unpacking/copying operations to the maven dependency plugin for obvious
reasons.

Has anyone tried creating and configuring a plugin instance within another
plugin and calling the execute method directly? I'm tempted to try this, but
am worried about potential side effects. I figure I can try to build the
plugin instance with what components I've already got within my plugin and
pass them along. Is there a better way to use this, perhaps some sort of
core maven plugin builder?

Any help would be greatly appreciated. Thanks!

RE: Plugins within plugins: best practices

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
It can cause problems when you have another plugin artifact listed as
your dependency so this probably won't work.

-----Original Message-----
From: Kallin Nagelberg [mailto:kallin.nagelberg@gmail.com] 
Sent: Sunday, December 30, 2007 3:37 PM
To: Maven Users List
Subject: Re: Plugins within plugins: best practices

What about creating a mojo instance manually from within another
plugin..
Has anyone tried this?

On Dec 29, 2007 11:37 PM, Kallin Nagelberg <ka...@gmail.com>
wrote:

> I need to run the unpack and copy goals repeatedly, with given
> group:artifact:version and different target directories for each one.
>
>
> On Dec 29, 2007 4:23 PM, Brian E. Fox < brianf@reply.infinity.nu>
wrote:
>
> > Which part is it that you need to use in the dependency plugin? The
> > actual copying and unpacking is mostly delegated to the
maven-archiver
> > component.
> >
> > -----Original Message-----
> > From: Kallin Nagelberg [mailto: kallin.nagelberg@gmail.com]
> > Sent: Saturday, December 29, 2007 4:03 PM
> > To: Maven Users List
> > Subject: Plugins within plugins: best practices
> >
> > Hello everyone,
> >
> > I've created a standalone plugin in which I'm doing some
> > unpacking/copying
> > of artifacts in addition to a few other things. I would like to
defer
> > the
> > unpacking/copying operations to the maven dependency plugin for
obvious
> > reasons.
> >
> > Has anyone tried creating and configuring a plugin instance within
> > another
> > plugin and calling the execute method directly? I'm tempted to try
this,
> > but
> > am worried about potential side effects. I figure I can try to build
the
> > plugin instance with what components I've already got within my
plugin
> > and
> > pass them along. Is there a better way to use this, perhaps some
sort of
> > core maven plugin builder?
> >
> > Any help would be greatly appreciated. Thanks!
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Plugins within plugins: best practices

Posted by Kallin Nagelberg <ka...@gmail.com>.
What about creating a mojo instance manually from within another plugin..
Has anyone tried this?

On Dec 29, 2007 11:37 PM, Kallin Nagelberg <ka...@gmail.com>
wrote:

> I need to run the unpack and copy goals repeatedly, with given
> group:artifact:version and different target directories for each one.
>
>
> On Dec 29, 2007 4:23 PM, Brian E. Fox < brianf@reply.infinity.nu> wrote:
>
> > Which part is it that you need to use in the dependency plugin? The
> > actual copying and unpacking is mostly delegated to the maven-archiver
> > component.
> >
> > -----Original Message-----
> > From: Kallin Nagelberg [mailto: kallin.nagelberg@gmail.com]
> > Sent: Saturday, December 29, 2007 4:03 PM
> > To: Maven Users List
> > Subject: Plugins within plugins: best practices
> >
> > Hello everyone,
> >
> > I've created a standalone plugin in which I'm doing some
> > unpacking/copying
> > of artifacts in addition to a few other things. I would like to defer
> > the
> > unpacking/copying operations to the maven dependency plugin for obvious
> > reasons.
> >
> > Has anyone tried creating and configuring a plugin instance within
> > another
> > plugin and calling the execute method directly? I'm tempted to try this,
> > but
> > am worried about potential side effects. I figure I can try to build the
> > plugin instance with what components I've already got within my plugin
> > and
> > pass them along. Is there a better way to use this, perhaps some sort of
> > core maven plugin builder?
> >
> > Any help would be greatly appreciated. Thanks!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Plugins within plugins: best practices

Posted by Kallin Nagelberg <ka...@gmail.com>.
I need to run the unpack and copy goals repeatedly, with given
group:artifact:version and different target directories for each one.

On Dec 29, 2007 4:23 PM, Brian E. Fox <br...@reply.infinity.nu> wrote:

> Which part is it that you need to use in the dependency plugin? The
> actual copying and unpacking is mostly delegated to the maven-archiver
> component.
>
> -----Original Message-----
> From: Kallin Nagelberg [mailto:kallin.nagelberg@gmail.com]
> Sent: Saturday, December 29, 2007 4:03 PM
> To: Maven Users List
> Subject: Plugins within plugins: best practices
>
> Hello everyone,
>
> I've created a standalone plugin in which I'm doing some
> unpacking/copying
> of artifacts in addition to a few other things. I would like to defer
> the
> unpacking/copying operations to the maven dependency plugin for obvious
> reasons.
>
> Has anyone tried creating and configuring a plugin instance within
> another
> plugin and calling the execute method directly? I'm tempted to try this,
> but
> am worried about potential side effects. I figure I can try to build the
> plugin instance with what components I've already got within my plugin
> and
> pass them along. Is there a better way to use this, perhaps some sort of
> core maven plugin builder?
>
> Any help would be greatly appreciated. Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Plugins within plugins: best practices

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Which part is it that you need to use in the dependency plugin? The
actual copying and unpacking is mostly delegated to the maven-archiver
component.

-----Original Message-----
From: Kallin Nagelberg [mailto:kallin.nagelberg@gmail.com] 
Sent: Saturday, December 29, 2007 4:03 PM
To: Maven Users List
Subject: Plugins within plugins: best practices

Hello everyone,

I've created a standalone plugin in which I'm doing some
unpacking/copying
of artifacts in addition to a few other things. I would like to defer
the
unpacking/copying operations to the maven dependency plugin for obvious
reasons.

Has anyone tried creating and configuring a plugin instance within
another
plugin and calling the execute method directly? I'm tempted to try this,
but
am worried about potential side effects. I figure I can try to build the
plugin instance with what components I've already got within my plugin
and
pass them along. Is there a better way to use this, perhaps some sort of
core maven plugin builder?

Any help would be greatly appreciated. Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org