You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Guido Spadotto <gs...@soluta.net> on 2009/12/21 17:59:03 UTC

Maven-scr-plugin: multivalue properties

Hi all,
 I'm a bit puzzled by this (hopefully simple to solve) issue.

I'm writing an EventHandler implementation using SCR annotations.
How do I specify multi-value  property for the topics to listen to?
I've this at the moment, is it correct?
    /**
     * The OSGi Event Topics to listen to
     *
     * @scr.property values1="org/osgi/framework/ServiceEvent/REGISTERED"
     *  values2="org/osgi/framework/ServiceEvent/UNREGISTERING"
     */
    static final String EVT_TOPICS = EventConstants.EVENT_TOPIC;

In http://felix.apache.org/site/apache-felix-maven-scr-plugin.html there 
are *two*
paragraphs that explain how to deal with multivalue properties, and I 
can't understand
which is the correct one.

Thanks,
Guido P. Spadotto

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


Re: Maven-scr-plugin: multivalue properties

Posted by Carsten Ziegeler <cz...@apache.org>.
Guido Spadotto wrote:
> Hi Carsten, after you mentioned the difference, I realized that it's
> exactly as you wrote above.
> 
> One description is about java annotations and the other one for javadocs.
> 
> My fault, I have to connect fingers with brain *before* posting.
> 
Hehe, no problem :) I think it clearly shows that the docs could be more
user friendly.

Regards
Carsten
-- 
Carsten Ziegeler
cziegeler@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: multivalue properties

Posted by Guido Spadotto <gs...@soluta.net>.
Carsten Ziegeler wrote:
> Hi,
>   
> [...]
>   
>> In http://felix.apache.org/site/apache-felix-maven-scr-plugin.html there
>> are *two* paragraphs that explain how to deal with multivalue properties, and I
>> can't understand which is the correct one.
>>     
> Hmm, can you point me to the two paragraphs? Or is one for the javadoc
> tags (you're using above) and the other one for the java annotations
Hi Carsten, after you mentioned the difference, I realized that it's 
exactly as you wrote above.

One description is about java annotations and the other one for javadocs.

My fault, I have to connect fingers with brain *before* posting.

BR,
  Guido

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


Re: Maven-scr-plugin: multivalue properties

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,

Guido Spadotto wrote:
> Hi all,
> I'm a bit puzzled by this (hopefully simple to solve) issue.
> 
> I'm writing an EventHandler implementation using SCR annotations.
> How do I specify multi-value  property for the topics to listen to?
> I've this at the moment, is it correct?
>    /**
>     * The OSGi Event Topics to listen to
>     *
>     * @scr.property values1="org/osgi/framework/ServiceEvent/REGISTERED"
>     *  values2="org/osgi/framework/ServiceEvent/UNREGISTERING"
>     */
>    static final String EVT_TOPICS = EventConstants.EVENT_TOPIC;
> 
Yes, this should be correct - the scr plugin assumes multi values as
soon as you have attribute names starting with "values".

> In http://felix.apache.org/site/apache-felix-maven-scr-plugin.html there
> are *two*
> paragraphs that explain how to deal with multivalue properties, and I
> can't understand
> which is the correct one.
> 
Hmm, can you point me to the two paragraphs? Or is one for the javadoc
tags (you're using above) and the other one for the java annotations?

Regards
Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

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