[ 
https://issues.apache.org/jira/browse/FELIX-5308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15382245#comment-15382245
 ] 

Carsten Ziegeler commented on FELIX-5308:
-----------------------------------------

Metatype generation makes only sense if you have properties to configure. The 
above message seems to indicate that you have no single property defined for 
your component.
You can either fix the problem by generating metatype and adding properties - 
or - you don't have properties and no metatype info and in that case, remove 
the label from @Component as this is only used for metatype generation

> Inconsistent Validation with Metatype Container
> -----------------------------------------------
>
>                 Key: FELIX-5308
>                 URL: https://issues.apache.org/jira/browse/FELIX-5308
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Tooling
>    Affects Versions: maven-scr-plugin 1.22.0
>            Reporter: JBodkin
>
> There are inconsistence warnings that are produced when generating the 
> components using the maven-scr-plugin.
> Case 1
> {code}
> @Component(label = "Alphabet")
> {code}
> {quote}
> Component x.y.Z has set a label. However metatype is set to false. This label 
> is ignored.
> {quote}
> Case 2
> {code}
> @Component(metatype = true, label = "Alphabet")
> {code}
> {quote}
> @Component : Component is defined to generate metatype information, however 
> no properties have been defined; in case no properties are wanted, consider 
> to use 'metatype=false'
> {quote}
> As an developer, if I enable strictMode, the build will always fail as either 
> the code in SCRDescriptorGenerator.java or Validator.java will output the 
> above warnings as errors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to