You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Cristiano Gavião <cv...@gmail.com> on 2013/07/03 16:05:56 UTC

[maven-scr-plugin] Duplicate definition for property foo ?

Hi,

I'm trying to declare a DS component with a property with multiple values:

@Component(name = "My commands", 
property={"foo:Integer=1","foo:Integer=2","foo:Integer=3"})

And I'm getting the following error:

> Duplicate definition for property foo in class MyCommandsComponent 
> (org.apache.felix:maven-scr-plugin:1.13.0:scr:generate-scr-scrdescriptor:process-classes)

I'm using this dependency:

         <dependency>
             <groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.ds-annotations</artifactId>
         </dependency>



Could someone point me what am I  missing here?

thanks,

Cristiano

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: [maven-scr-plugin] Duplicate definition for property foo ?

Posted by Cristiano Gavião <cv...@gmail.com>.
FYI,

the problem was fixed and will be available in next release.

https://issues.apache.org/jira/browse/FELIX-4159


On 03/07/13 12:58, Jad Naous wrote:
> looks like you're defining three properties called "foo" in your @Component
> parameters. Try change "foo" to foo1, foo2, foo3.
>
>
> On Wed, Jul 3, 2013 at 7:05 AM, Cristiano Gavião <cv...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to declare a DS component with a property with multiple values:
>>
>> @Component(name = "My commands", property={"foo:Integer=1","**
>> foo:Integer=2","foo:Integer=3"**})
>>
>> And I'm getting the following error:
>>
>>   Duplicate definition for property foo in class MyCommandsComponent
>>> (org.apache.felix:maven-scr-**plugin:1.13.0:scr:generate-**
>>> scr-scrdescriptor:process-**classes)
>>>
>> I'm using this dependency:
>>
>>          <dependency>
>>              <groupId>org.apache.felix</**groupId>
>> <artifactId>org.apache.felix.**scr.ds-annotations</**artifactId>
>>          </dependency>
>>
>>
>>
>> Could someone point me what am I  missing here?
>>
>> thanks,
>>
>> Cristiano
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: [maven-scr-plugin] Duplicate definition for property foo ?

Posted by Cristiano Gavião <cv...@gmail.com>.
Hi,

That was intentional since the OSGi compendium spec (112.14 
org.osgi.service.component.annotations) defines that:

> Each property string is specified as "key=value". The type of the 
> property value can be specified in the key as key:type=value. The type 
> must be one of the property types supported by the type attribute of 
> the property element of a Component Description.
>
> To specify a property with multiple values, use multiple key, value 
> pairs. For example, "foo=bar", "foo=baz".
>
> OSGi Service Platform Release 4 Service Compendium Version 4.3 
so the resulting xml should be:

<property name="foo">
             bar
             baz
  </property>

On 03/07/13 12:58, Jad Naous wrote:
> looks like you're defining three properties called "foo" in your @Component
> parameters. Try change "foo" to foo1, foo2, foo3.
>
>
> On Wed, Jul 3, 2013 at 7:05 AM, Cristiano Gavião <cv...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to declare a DS component with a property with multiple values:
>>
>> @Component(name = "My commands", property={"foo:Integer=1","**
>> foo:Integer=2","foo:Integer=3"**})
>>
>> And I'm getting the following error:
>>
>>   Duplicate definition for property foo in class MyCommandsComponent
>>> (org.apache.felix:maven-scr-**plugin:1.13.0:scr:generate-**
>>> scr-scrdescriptor:process-**classes)
>>>
>> I'm using this dependency:
>>
>>          <dependency>
>>              <groupId>org.apache.felix</**groupId>
>> <artifactId>org.apache.felix.**scr.ds-annotations</**artifactId>
>>          </dependency>
>>
>>
>>
>> Could someone point me what am I  missing here?
>>
>> thanks,
>>
>> Cristiano
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>


Re: [maven-scr-plugin] Duplicate definition for property foo ?

Posted by Jad Naous <ja...@compassquality.com>.
looks like you're defining three properties called "foo" in your @Component
parameters. Try change "foo" to foo1, foo2, foo3.


On Wed, Jul 3, 2013 at 7:05 AM, Cristiano Gavião <cv...@gmail.com> wrote:

> Hi,
>
> I'm trying to declare a DS component with a property with multiple values:
>
> @Component(name = "My commands", property={"foo:Integer=1","**
> foo:Integer=2","foo:Integer=3"**})
>
> And I'm getting the following error:
>
>  Duplicate definition for property foo in class MyCommandsComponent
>> (org.apache.felix:maven-scr-**plugin:1.13.0:scr:generate-**
>> scr-scrdescriptor:process-**classes)
>>
>
> I'm using this dependency:
>
>         <dependency>
>             <groupId>org.apache.felix</**groupId>
> <artifactId>org.apache.felix.**scr.ds-annotations</**artifactId>
>         </dependency>
>
>
>
> Could someone point me what am I  missing here?
>
> thanks,
>
> Cristiano
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>