see 
http://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html
and 
http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html


2012/11/29 Barrie Treloar <[email protected]>:
> On Thu, Nov 29, 2012 at 8:49 AM, Jason van Zyl <[email protected]> wrote:
>> The MavenProject is not a component that is injected by the container. It's 
>> handled by the PluginParameterExpressionEvaluator[1] which looks at all the 
>> non-@component things and sets their values once the Mojo instance is 
>> constructed.
>>
>> [1]: 
>> https://github.com/apache/maven-3/blob/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
>
> Does that mean our docs are wrong?
> Do you have an example?
>
> I've not used annotations before and I was trying to help someone
> else's user list question.
> And unfortunately google returns javadoc matches as well so wading
> through examples was time consuming and not very enlightening.
>
> And the link Olivier sent is using
>     /**
>      * The Maven project.
>      */
>     @Component
>     private MavenProject project;
> and is working, but when I tried that it didn't.
>
> I'm going to try looking at the pom to see if there are some incorrect
> versions of dependencies might be causing an issue.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to