[
https://issues.apache.org/jira/browse/FELIX-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560729#comment-13560729
]
Carsten Ziegeler commented on FELIX-3636:
-----------------------------------------
Unfortunately, we really have a mismatch here: as Felix wrote @Component is the
marker, only classes with this annotation should be processed - however when
the super classes of a component are processed, it's not checked whether the
class have a @Component annotation and @Service, @Property, and @Reference are
always processed. This shouldn't be the case, but it seems we always had this
in the plugin ,so for compatibility we can't change this.
I wouldn't allow classes which have a @Service but no @Component to create a
component.
So I guess, creating a warning if the project contains a class with @Service,
@Property, or @Reference but no @Component is the only thing we can do
> Using @Service without @Component should nevertheless create a component
> ------------------------------------------------------------------------
>
> Key: FELIX-3636
> URL: https://issues.apache.org/jira/browse/FELIX-3636
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin, SCR Annotations
> Affects Versions: maven-scr-plugin-1.8.0, scr annotations 1.7.0
> Reporter: Konrad Windszus
>
> If I use the annotation @Service without @Component no entry in the
> serviceComponents.xml will be generated and no warning is given out during
> build from the maven-scr-plugin.
> You should either implicitly generate a component if @Service is given
> without @Component or an error should be logged during build, since using
> @Service without @Component right now has no effect at all and this is never
> intended by someone using @Service.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira