Re: OSGi R6 - Default Configuration Values

2018-05-22 Thread Carsten Ziegeler
Hi Julian, yes, you're right of course. The second approach I described is really just creating metatype information. Please note that with R7 you can put the @Activate annotation on a field which has a component property type; in many cases no need for an activate method anymore Regards

Re: OSGi R6 - Default Configuration Values

2018-05-20 Thread Julian Sedding
Hi Carsten IIRC the second way you describe did not work for me. I was rather surprised when I first encountered it. But reading the spec seemed to confirm my understanding. According to my understanding and experiments, your first bullet is required to get default values of type annotations

Re: OSGi R6 - Default Configuration Values

2018-05-18 Thread Carsten Ziegeler
I haven't followed everything in this thread, but there are basically two ways: - use a component property type (annotation) in the activate method and annotate it with @Activate - generate metatype information to describe the component property type so you use the ObjectClassDefinition

Re: OSGi R6 - Default Configuration Values

2018-05-18 Thread Daniel Klco
Thanks for the clarification Julian and the tool is great! I wish I had known about it when I was manually diffing the configuration values for Auth Form. On Fri, May 18, 2018 at 4:48 AM, Julian Sedding wrote: > I think the chain of events is slightly different than what

Re: OSGi R6 - Default Configuration Values

2018-05-18 Thread Julian Sedding
I think the chain of events is slightly different than what Jason wrote, but the end result is the same. Properties from configuration annotations are only included in the XML if the configuration annotation is used in the signature of the activate/deactivate methods (maybe modified as well,

Re: OSGi R6 - Default Configuration Values

2018-05-17 Thread Daniel Klco
That was the problem, thanks Jason! 10 internet points and a meme to you for being awesome! https://imgflip.com/i/2aicpi Thanks, Dan On Thu, May 17, 2018 at 5:40 PM, Jason E Bailey wrote: > So this is odd, I built the project and checked out the >

Re: OSGi R6 - Default Configuration Values

2018-05-17 Thread Jason E Bailey
So this is odd, I built the project and checked out the FormAuthenticationHandler.xml that was built in the OSGI-INF directory and it only defined a deactivate method. I added the @Activate annotation and it added the definition that stated the activate method was 'activate' and it also added

Re: OSGi R6 - Default Configuration Values

2018-05-17 Thread Daniel Klco
Good thought, unfortunately the same result. On Thu, May 17, 2018 at 12:40 PM, Jason E Bailey wrote: > Your using constants in the default value, have you tried replacing those > with literals? I believe, as a compile time annotation, the constants > aren't initialized. > > -

Re: OSGi R6 - Default Configuration Values

2018-05-17 Thread Jason E Bailey
Your using constants in the default value, have you tried replacing those with literals? I believe, as a compile time annotation, the constants aren't initialized. - Jason On Thu, May 17, 2018, at 1:43 PM, Daniel Klco wrote: > Team, > > I've been trying to figure this out and can't seem to

OSGi R6 - Default Configuration Values

2018-05-17 Thread Daniel Klco
Team, I've been trying to figure this out and can't seem to crack it so I was hoping someone might have some insight. I'm trying to update Sling Auth Forms to OSGi R6 as per: https://issues.apache.org/jira/browse/SLING-7671 I've got everything converted over and it works if I specify a