On Tue, 11 Jul 2006, Carlos Sanchez wrote:

Indeed.

The mojo's should be as lightweight as possible - just the glue between
maven and the actual actions it performs.

This is not a maven mojo problem but a plugin design problem. Most
plugins, like the jar plugin and the surefire plugin, to name some,
are rather empty. The jar plugin just extracts information from the
MavenProject, giving it to maven-archiver (plexus-archiver under water),
and later updates the MavenProject with the newly created archive.
The same goes for the surefire plugin.

So you really don't want to re-use mojo's, but the functionality they
offer. And since the functionality they offer is, or should be, separated
from the mojo itself you actually want to use the libraries behind them.

So I really see no problem here, except maybe for some design issues with
some current plugins.

-- Kenney

> I think that's defenitely what we look for, pojos wrapped in mojos, or
> at least mojos that can be used as pojos as much as possible
>
> On 7/10/06, Mike Perham <[EMAIL PROTECTED]> wrote:
> > I would like to see plugins be made a little more independent from
> > Maven.  You know how J2EE code is difficult to test due to the need for
> > a container?  Well, Maven is the container for plugins and that need for
> > a container makes it more difficult than necessary to test and reuse
> > plugins.  There's no reason why plugins couldn't become POJOs which have
> > a MOJO container configuration layer.  Unit tests could easily
> > instantiate the POJOs for simple testing and a more thorough system
> > (like the maven-plugin-test-harness) could be used to integration test
> > the whole plugin.
> >
> > -----Original Message-----
> > From: Jochen Wiedmann [mailto:[EMAIL PROTECTED]
> > Sent: Monday, July 10, 2006 4:34 PM
> > To: Maven Developers List
> > Subject: A plugins nature
> >
> > Hi,
> >
> > in the last weeks I have thought a little bit about Maven plugins. The
> > initial question was my desire to reuse another plugin.
> >
> > There are good reasons for reusing plugins. As an example, think of a
> > plugin, which creates a jar file. Might be the retro* plugins or
> > something like that.I would think it makes sense to reuse the jar
> > plugin in such a case.
> >
> > The problem with reusing plugins is that they consist in fact of two
> > parts: One part is the lifecycle management. The other part is the
> > actual code. For example, the jar plugin contains some rules which
> > ensure that it is called in the "package" phase. Besides, there is
> > code which actually creates a jar file based on a configuration.
> >
> > The point I am trying to make is that such a plugin should possibly be
> > split into these two parts. If so, the implementation part might be
> > reused, while the lifecycle management part might still perform its
> > task.
> >
> > What do you think?
> >
> > Jochen
> >
> > --
> > Whenever you find yourself on the side of the
> > majority, it is time to pause and reflect.
> > (Mark Twain)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to