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 <mw...@iupui.edu>

> 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   mw...@iupui.edu
> Asking whether markets are efficient is like asking whether people are
> smart.
>



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

Reply via email to