2015-01-14 12:48 GMT+01:00 Anders Hammar <and...@hammar.net>:
> Wouldn't it be better to get it from the classpath of the mojo execution?
> i.e. it should be added as a dep to the plugin declaration.

That's pretty much the way we do it today with providers in surefire.

If we exported a distinct "client-api" module from the plugin you
could actually depend on this in a "pluginextension" module within
your own build and implement all kinds of custom features. It might
even be possible to depend on multiple "client-api" definitions within
a single module and hence collect extension points to multiple plugins
within that single project (maybe - there may be some gotchas). The
implementation module itself can be in "any language". The only
problem with this is that I seem to remember we couldn't build a
surefire provider within the same reactor as we actually used it,
since the resolution order does not permit this. From a point of view
of "simple" extensibility, that does not work entirely well.

And there's still the issue of service discovery.....

Kristian




 In a sense, if you make a separate module called "pluginextension" you coul

>
> /Anders
>
>
>> A more general solution
>> would perhaps be to permit an entire module in a multi-module build to
>> contain extension mechanisms; so such a module could add dependencies
>> to the public api of the plugin and thereby gain access to a set of
>> extension points.
>>
>> Kristian
>>
>>
>> 2015-01-14 11:58 GMT+01:00 Tibor Digana <tibordig...@apache.org>:
>> > Hi Kristian, Igor,
>> >
>> > I think i have found the way to inject custom objects into plugin
>> execution
>> > without SPI.
>> >
>> > Look at this example
>> >
>> http://docs.codehaus.org/display/GMAVENPLUS/Examples#Examples-ExecuteScripts
>> >
>> > The user can write a trivial script launched like this
>> >
>> >
>> >
>> > and write a RunOrder servis by setting it in to execution property:
>> >
>> > <<someScript.groovy>>
>> > hook.set(new RunOrder());
>> >
>> > Tha's it, very simple.
>> > All we need to do is to provide the execution property 'hook' - the name
>> is
>> > just for illustration purposes only.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://maven.40175.n5.nabble.com/Plugable-Softcoded-Customized-Maven-Plugins-tp5823365p5823467.html
>> > Sent from the Maven Developers mailing list archive at Nabble.com.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: dev-h...@maven.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to