And by the way, documentation is cool.
But even better is look for real-life example. And what's cool with
opensource is that it's easy to find a bunch of examples from simple to very
complex.

Cheers

2011/8/6 Baptiste MATHUS <[email protected]>

> Well, you were in the right place.
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
> What are you missing?
>
> As often today in programming, Maven mojo gets "external" property via
> dependency injection.
>
> That is, just declare your attribute with the right @parameter expression
> settings and your field will just get -DyourParam injected.
>
> Cheers.
> Baptiste
>
> 2011/8/5 Mark H. Wood <[email protected]>
>
> On Thu, Aug 04, 2011 at 04:05:10PM -0400, Mark H. Wood wrote:
>> > Back to topic:  I'm writing a plugin that needs access to the
>> > project's properties.  Nothing environmental is passed to a mojo, and
>> > fishing through the Javadocs for static methods that look promising
>> > has turned up nothing so far.  What *should* I be reading?
>>
>> Well, after more hours of fishing, it looks like people are cobbling
>> this together by declaring a @readonly @parameter
>> default-value="${project}" and calling getSomething() on the injected
>> object.  It seems to work, but is this officially documented anywhere?
>>
>> --
>> Mark H. Wood, Lead System Programmer   [email protected]
>> Asking whether markets are efficient is like asking whether people are
>> smart.
>>
>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>



-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Reply via email to