2012/5/21 Brett Porter <br...@apache.org>:
>
> On 21/05/2012, at 3:45 AM, Hervé BOUTEMY wrote:
>
>> here, the end-user is a plugin developer, then someone who should be able to
>> create a (Plexus) component when necessary
>>
>> Yes, I liked @Component too but as soon as you write a component and inject
>> somponents inside it, you discover the discrepency: the more I work on this,
>> the more I discover these little discrepencies that lost me for a long time.
>> Notice that the target is JSR330 @Inject.
>> Is it too early to use @Inject?
>
> Agree - I didn't think @component (the Javadoc annotation) would carry over 
> to the plugin annotation. It should just use @Inject if that's feasible.
Yup possible
   @Inject
   @Named( value = "maven" )
   protected ArtifactMetadataSource artifactMetadataSource;

But not possible anymore for
@Component( role = ArtifactMetadataSource.class, roleHint = "maven" )
protected Object artifactMetadataSource;

but not sure it's a real problem for this "feature" :-)

But again we use annotations here only for plugin metadata generation
and not at runtime.

Maybe in the future we could handle @Inject at runtime level.

But IMHO classpath scanning at runtime to find various annotations
will have a huge performance impact whereas simply reading the xml
plugin descriptor is fast.
And that's what we need with a tool such Maven fast startup/execution.

my 0.02 euros

>
> - Brett
>
> --
> Brett Porter
> br...@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>



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

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

Reply via email to