felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (FELIX-5373) Improve failure message when enabling metatype and using no or private properties only
Date Wed, 12 Oct 2016 19:17:21 GMT

     [ https://issues.apache.org/jira/browse/FELIX-5373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Carsten Ziegeler reassigned FELIX-5373:
---------------------------------------

    Assignee: Carsten Ziegeler

> Improve failure message when enabling metatype and using no or private properties only
> --------------------------------------------------------------------------------------
>
>                 Key: FELIX-5373
>                 URL: https://issues.apache.org/jira/browse/FELIX-5373
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Tooling
>    Affects Versions: maven-scr-plugin 1.22.0
>            Reporter: Oliver Lietz
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: maven-scr-plugin 1.23.0, scr ant task 1.16.0, scr generator 1.15.0,
scr bnd plugin 1.6.0
>
>         Attachments: FELIX-5373.tar.gz
>
>
> {noformat}
> @Component(
>     label = "Foo",
>     description = "SCR Foo Service",
>     metatype = true
> )
> @Service
> @Properties({
>     @Property(
>         name = Constants.SERVICE_VENDOR,
>         value = "Example"
>     ),
>     @Property(
>         name = Constants.SERVICE_DESCRIPTION,
>         value = "service doing foo"
>     )/*,
>     @Property(
>         name = "foo",
>         value = "bar"
>     )*/
> })
> public class ScrFooService implements FooService {
>     public void foo() {
>     }
> }
> {noformat}
> {{metatype = false}} (or not set):
> {noformat}
> [WARNING] /[...]/ScrFooService.java [1:1]:  Component org.apache.felix.FELIX_5373.internal.ScrFooService
has set a label. However metatype is set to false. This label is ignored.
> [WARNING] /[...]/ScrFooService.java [1:1]:  Component org.apache.felix.FELIX_5373.internal.ScrFooService
has set a description. However metatype is set to false. This description is ignored.
> {noformat}
> {{metatype = true}}:
> {noformat}
> [ERROR] /[...]/ScrFooService.java [1:1]: @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'
> {noformat}
> The build succeeds only without warnings when adding a non-private property (-where it
should also succeed with private properties only-).



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

Mime
View raw message