Hi,

How should plugin developers indicate that a plugin is inter-dependant
on anther plugin?  Some have suggested a registering mechanism like that
used by the site report.  Another way is by modifying a shared variable.

For example, maven.compile.src.set can be used by plugins to make other
plugins aware of a path that needs to be involved in the compile
process, essentially there is an inter dependancy therefore between
plugins such as antlr and java:compile.  This interdependacy is
"activated" by the antlr plugin adding a pregoal to the java:compile
goal in order to generate the source and add that source path to the
maven.compile.src.set.

If we consider other plugins that want to act over maven.compile.src.set
- such as eclipse plugin, then we have a problem, as we don't want to
have to change every plugin that generates source to have a pregoal for
eclipse, or for any other such plugin for that matter.  This is a
failing of the eclipse plugin at the moment, and is commented on in both
MPECLIPSE-20 and MPECLIPSE-24.

It seems that we ideally need to have some way to indicate that a plugin
is active on a project and let it affect these variables during an
initialisation stage.  For example, an init method could be called on
the code generation plugin (e.g. antler) and a property can be checked
to indicate if the plugin is needed and modify the maven.compile.src.set
accordingly, and also indicate that generation needs to occur before
certain targets can occur (such as java:compile, eclipse and javadoc? -
I guess these would need to be identified as "compile" based goals).
This would then allow plugins to work together without having to be
aware of each other explicitly as it seems to be to me at the moment.

I get the feeling something like this already happens and I've just not
spotted it.  Is this so?  Or am I way off target?

Kris.

P.S. Wasn't sure which list to post this too - figured it was more about
how to extend maven rather than just use it so I opted for dev.

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

Reply via email to