[
https://issues.apache.org/jira/browse/FELIX-4033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gavin reopened FELIX-4033:
--------------------------
temporary re-open so I can migrate the reporter account
> Issue warning messages for redundant SCR annotation combinations and an error
> for declaring the service.id property
> -------------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-4033
> URL: https://issues.apache.org/jira/browse/FELIX-4033
> Project: Felix
> Issue Type: Improvement
> Components: Maven SCR Plugin
> Reporter: Robert Munteanu
> Assignee: Carsten Ziegeler
> Fix For: maven-scr-plugin-1.12.0, scr ant task 1.6.0, scr
> generator 1.6.0
>
>
> When using SCR annotations there are some ways of using annotations which are
> redundant or useless. We should detect these early and log warning messages
> to prevent the user from being suprised when the annotations are ignored.
> *1. Labels and descriptions for components with metatype=false*
> {code}
> @Component(metatype = false,
> label = "Some label",
> description = "Some description")
> {code}
> Since the value of {{metatype}} is false, the label and description will
> never be shown. So all three attributes should be removed. The warning
> message could be "The labell and description are ignored when metatype is
> false". The warning should take into account the fact that the metatype
> defaults to false if not set.
> *2. Redundant combinations of propertyPrivate and metatype*
> {code}
> @Component(metatype = false)
> @Property(name="some.property", value="some.value", propertyPrivate=true)
> {code}
> The {{propertyPrivate}} flag is useless since there the component will not
> have metatype information. The warning message could be "Redundant
> propertyPrivate=true set for property 'some.property' since the component
> will have no metatype information".
> *3. Ignored settings for propertyPrivate*
> {code}@Property(name="service.ranking", value="10", propertyPrivate=true{code}
> This setting has no effect since {{service.ranking}} is private by default.
> The warning message could be "Redundant propertyPrivate=true set for
> 'service.ranking', this property is private by default".
> Also, this value is ignored for the built-in service.pid,
> service.description, service.id, service.vendor, service.bundlelocation and
> service.factoryPid values.The warning message could be "Ignoring
> propertyPrivate setting for property 'service.xxx', this property is not
> taken into account when generating metatype.xml".
--
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