Re: maven-scr-plugin and DS 1.3 annotations not working

2016-03-24 Thread Oliver Lietz
On Tuesday 22 March 2016 17:16:54 Carsten Ziegeler wrote:
> David Jencks wrote
> 
> > I’m not certain how the maven-bundle-plugin is set up, but with bnd by
> > itself the default is dsannotatios and metatypeannotations are *, so I’d
> > be surprised if you have to specify them in the instructions here.
> You're right, you don't have to. It seems at some 3.0.0-SNAPSHOT this
> was required and I still have them in my poms :)

You have to specify as Maven Bundle Plugin 3.0.1 uses an older version of bnd 
where those instructions are not the default.

Regards,
O.

> Carsten
> 
> > david jencks
> > 
> >> On Mar 22, 2016, at 12:18 AM, Jens Offenbach <wolle5...@gmx.de> wrote:
> >> 
> >> @Carsten
> >> This is working... Thank you very much for your help!
> >> 
> >> For all those who are on Eclipse PDE and require the OSGI-INF folder in
> >> the project root, use the maven-bundle-plugin with
> >> "true" and copy the folder to your project
> >> basedir like this: 
> >> 
> >>org.apache.maven.plugins
> >>maven-resources-plugin
> >>
> >>
> >>
> >>
> >>copy-scr-descriptor
> >>process-classes
> >>
> >>
> >>copy-resources
> >>
> >>
> >>
> >>
> >>
> >> ${basedir}/OSGI-INF
> >>
> >>
> >>
> >>
> >>
> >> ${project.build.outputDirectory}/OSGI-
INF
> >>false
> >>
> >>        
> >>            
> >>        
> >>
> >>
> >>
> >>
> >>
> >>
> >> 
> >> 
> >> 
> >> Regards,
> >> Jens
> >> 
> >> 
> >> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
> >> Von: "Carsten Ziegeler" <cziege...@apache.org>
> >> An: users@felix.apache.org
> >> Betreff: Re: maven-scr-plugin and DS 1.3 annotations not working
> >> The maven-scr-plugin does not support the DS 1.3 annotations.
> >> Using the maven-bundle-plugin 3.0.1 is all you need. I think you need to
> >> add this configuration to the bundle plugin:
> >> 
> >> 
> >> 
> >> <_dsannotations>*
> >> <_metatypeannotations>*
> >> 
> >> 
> >> 
> >> Carsten
> >> 
> >> 
> >> Jens Offenbach wrote
> >> 
> >>> Hi,
> >>> I am using maven-scr-plugin:1.21.0,
> >>> org.osgi.service.component.annotations:1.3.0,
> >>> org.apache.felix.scr.ds-annotations:1.2.8 and
> >>> org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.
> >>> 
> >>> This is my annotated class with makes use of the prototype scope:
> >>> 
> >>> @Component(immediate = true, configurationPolicy =
> >>> ConfigurationPolicy.REQUIRE) @Service(HttpContextMapping)
> >>> public class HttpContextMappingComponent implements HttpContextMapping {
> >>> 
> >>> @Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality =
> >>> ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
> >>> private HttpEndpointManager endpointManager;
> >>> ...
> >>> 
> >>> }
> >>> 
> >>> This is the component definition file created by maven-scr-plugin:
> >>> 
> >>> 
> >>> http://www.osgi.org/xmlns/scr/v1.1.0;
> >>> immediate="true"
> >>> name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingCo
> >>> mponent" configuration-policy="require" activate="activate"
> >>> deactivate="dispose">  >>> class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingC
> >>> omponent"/> 
> >>>

Re: maven-scr-plugin and DS 1.3 annotations not working

2016-03-22 Thread Carsten Ziegeler
David Jencks wrote
> I’m not certain how the maven-bundle-plugin is set up, but with bnd by itself 
> the default is dsannotatios and metatypeannotations are *, so I’d be 
> surprised if you have to specify them in the instructions here.

You're right, you don't have to. It seems at some 3.0.0-SNAPSHOT this
was required and I still have them in my poms :)

Carsten

> 
> david jencks
> 
>> On Mar 22, 2016, at 12:18 AM, Jens Offenbach <wolle5...@gmx.de> wrote:
>>
>> @Carsten 
>> This is working... Thank you very much for your help!
>>
>> For all those who are on Eclipse PDE and require the OSGI-INF folder in the 
>> project root, use the maven-bundle-plugin with 
>> "true" and copy the folder to your project 
>> basedir like this:
>> 
>>  org.apache.maven.plugins
>>  maven-resources-plugin
>>  
>>  
>>  copy-scr-descriptor
>>  process-classes
>>  
>>  copy-resources
>>  
>>  
>>  
>> ${basedir}/OSGI-INF
>>  
>>  
>>  
>> ${project.build.outputDirectory}/OSGI-INF
>>  false
>>  
>>  
>>  
>>          
>>  
>> 
>>
>> Regards,
>> Jens
>>  
>>
>> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
>> Von: "Carsten Ziegeler" <cziege...@apache.org>
>> An: users@felix.apache.org
>> Betreff: Re: maven-scr-plugin and DS 1.3 annotations not working
>> The maven-scr-plugin does not support the DS 1.3 annotations.
>> Using the maven-bundle-plugin 3.0.1 is all you need. I think you need to
>> add this configuration to the bundle plugin:
>>
>> 
>> 
>> <_dsannotations>*
>> <_metatypeannotations>*
>> 
>> 
>>
>> Carsten
>>
>>
>> Jens Offenbach wrote
>>> Hi,
>>> I am using maven-scr-plugin:1.21.0, 
>>> org.osgi.service.component.annotations:1.3.0, 
>>> org.apache.felix.scr.ds-annotations:1.2.8 and 
>>> org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.
>>>
>>> This is my annotated class with makes use of the prototype scope:
>>>
>>> @Component(immediate = true, configurationPolicy = 
>>> ConfigurationPolicy.REQUIRE)
>>> @Service(HttpContextMapping)
>>> public class HttpContextMappingComponent implements HttpContextMapping {
>>>
>>> @Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality = 
>>> ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
>>> private HttpEndpointManager endpointManager;
>>> ...
>>>
>>> }
>>>
>>> This is the component definition file created by maven-scr-plugin:
>>>
>>> 
>>> http://www.osgi.org/xmlns/scr/v1.1.0; 
>>> immediate="true" 
>>> name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"
>>>  configuration-policy="require" activate="activate" deactivate="dispose">
>>> >> class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
>>> 
>>> >> interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
>>> 
>>> 
>>>
>>> The prototype scope definition is missing and the plugin has classified the 
>>> component as DS 1.1.0 compliant.
>>>
>>> Furthermore the build failed with the following error message:
>>> [INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ 
>>> test.osgi.service.http.paxweb ---
>>> [ERROR] Bundle test:test.osgi.service.http.paxweb:bundle:1.0.0-SNAPSHOT : 
>>> Service-Component entry can not be located in JAR: 
>>> OSGI-INF/test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent.xml~
>>> [ERROR] Error(s) found in bundle configuration
>>>
>>> With maven-bundle-plugin:2.3.7 the build is working and the component 
>>> definition files get added to the jar.
>>>
>>> Has anybody an idea what's going on?
>>>
>>> --

Re: maven-scr-plugin and DS 1.3 annotations not working

2016-03-22 Thread David Jencks
I’m not certain how the maven-bundle-plugin is set up, but with bnd by itself 
the default is dsannotatios and metatypeannotations are *, so I’d be surprised 
if you have to specify them in the instructions here.

david jencks

> On Mar 22, 2016, at 12:18 AM, Jens Offenbach <wolle5...@gmx.de> wrote:
> 
> @Carsten 
> This is working... Thank you very much for your help!
> 
> For all those who are on Eclipse PDE and require the OSGI-INF folder in the 
> project root, use the maven-bundle-plugin with 
> "true" and copy the folder to your project 
> basedir like this:
> 
>   org.apache.maven.plugins
>   maven-resources-plugin
>   
>   
>   copy-scr-descriptor
>   process-classes
>   
>   copy-resources
>   
>   
>   
> ${basedir}/OSGI-INF
>   
>   
>   
> ${project.build.outputDirectory}/OSGI-INF
>   false
>   
>   
>   
>   
>   
> 
> 
> Regards,
> Jens
>  
> 
> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
> Von: "Carsten Ziegeler" <cziege...@apache.org>
> An: users@felix.apache.org
> Betreff: Re: maven-scr-plugin and DS 1.3 annotations not working
> The maven-scr-plugin does not support the DS 1.3 annotations.
> Using the maven-bundle-plugin 3.0.1 is all you need. I think you need to
> add this configuration to the bundle plugin:
> 
> 
> 
> <_dsannotations>*
> <_metatypeannotations>*
> 
> 
> 
> Carsten
> 
> 
> Jens Offenbach wrote
>> Hi,
>> I am using maven-scr-plugin:1.21.0, 
>> org.osgi.service.component.annotations:1.3.0, 
>> org.apache.felix.scr.ds-annotations:1.2.8 and 
>> org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.
>> 
>> This is my annotated class with makes use of the prototype scope:
>> 
>> @Component(immediate = true, configurationPolicy = 
>> ConfigurationPolicy.REQUIRE)
>> @Service(HttpContextMapping)
>> public class HttpContextMappingComponent implements HttpContextMapping {
>> 
>> @Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality = 
>> ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
>> private HttpEndpointManager endpointManager;
>> ...
>> 
>> }
>> 
>> This is the component definition file created by maven-scr-plugin:
>> 
>> 
>> http://www.osgi.org/xmlns/scr/v1.1.0; 
>> immediate="true" 
>> name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"
>>  configuration-policy="require" activate="activate" deactivate="dispose">
>> > class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
>> 
>> > interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
>> 
>> 
>> 
>> The prototype scope definition is missing and the plugin has classified the 
>> component as DS 1.1.0 compliant.
>> 
>> Furthermore the build failed with the following error message:
>> [INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ 
>> test.osgi.service.http.paxweb ---
>> [ERROR] Bundle test:test.osgi.service.http.paxweb:bundle:1.0.0-SNAPSHOT : 
>> Service-Component entry can not be located in JAR: 
>> OSGI-INF/test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent.xml~
>> [ERROR] Error(s) found in bundle configuration
>> 
>> With maven-bundle-plugin:2.3.7 the build is working and the component 
>> definition files get added to the jar.
>> 
>> Has anybody an idea what's going on?
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
>> For additional commands, e-mail: users-h...@felix.apache.org
>> 
>> 
> 
> 
> 
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>  
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 


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



Aw: Re: maven-scr-plugin and DS 1.3 annotations not working

2016-03-22 Thread Jens Offenbach
@Carsten 
This is working... Thank you very much for your help!

For all those who are on Eclipse PDE and require the OSGI-INF folder in the 
project root, use the maven-bundle-plugin with 
"true" and copy the folder to your project basedir 
like this:

org.apache.maven.plugins
maven-resources-plugin


copy-scr-descriptor
process-classes

copy-resources



${basedir}/OSGI-INF



${project.build.outputDirectory}/OSGI-INF
false







Regards,
Jens
 

Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
Von: "Carsten Ziegeler" <cziege...@apache.org>
An: users@felix.apache.org
Betreff: Re: maven-scr-plugin and DS 1.3 annotations not working
The maven-scr-plugin does not support the DS 1.3 annotations.
Using the maven-bundle-plugin 3.0.1 is all you need. I think you need to
add this configuration to the bundle plugin:



<_dsannotations>*
<_metatypeannotations>*



Carsten


Jens Offenbach wrote
> Hi,
> I am using maven-scr-plugin:1.21.0, 
> org.osgi.service.component.annotations:1.3.0, 
> org.apache.felix.scr.ds-annotations:1.2.8 and 
> org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.
>
> This is my annotated class with makes use of the prototype scope:
>
> @Component(immediate = true, configurationPolicy = 
> ConfigurationPolicy.REQUIRE)
> @Service(HttpContextMapping)
> public class HttpContextMappingComponent implements HttpContextMapping {
>
> @Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality = 
> ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
> private HttpEndpointManager endpointManager;
> ...
>
> }
>
> This is the component definition file created by maven-scr-plugin:
>
> 
> http://www.osgi.org/xmlns/scr/v1.1.0; 
> immediate="true" 
> name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"
>  configuration-policy="require" activate="activate" deactivate="dispose">
>  class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
> 
>  interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
> 
> 
>
> The prototype scope definition is missing and the plugin has classified the 
> component as DS 1.1.0 compliant.
>
> Furthermore the build failed with the following error message:
> [INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ 
> test.osgi.service.http.paxweb ---
> [ERROR] Bundle test:test.osgi.service.http.paxweb:bundle:1.0.0-SNAPSHOT : 
> Service-Component entry can not be located in JAR: 
> OSGI-INF/test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent.xml~
> [ERROR] Error(s) found in bundle configuration
>
> With maven-bundle-plugin:2.3.7 the build is working and the component 
> definition files get added to the jar.
>
> Has anybody an idea what's going on?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>



--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org

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

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



Re: maven-scr-plugin and DS 1.3 annotations not working

2016-03-22 Thread Carsten Ziegeler
The maven-scr-plugin does not support the DS 1.3 annotations.
Using the maven-bundle-plugin 3.0.1 is all you need. I think you need to
add this configuration to the bundle plugin:



   <_dsannotations>*
   <_metatypeannotations>*
   


Carsten


Jens Offenbach wrote
> Hi,
> I am using maven-scr-plugin:1.21.0, 
> org.osgi.service.component.annotations:1.3.0, 
> org.apache.felix.scr.ds-annotations:1.2.8 and 
> org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.
> 
> This is my annotated class with makes use of the prototype scope:
> 
> @Component(immediate = true, configurationPolicy = 
> ConfigurationPolicy.REQUIRE)
> @Service(HttpContextMapping)
> public class HttpContextMappingComponent implements HttpContextMapping {
>   
>   @Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality = 
> ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
>   private HttpEndpointManager endpointManager;
> ...
> 
> }
> 
> This is the component definition file created by maven-scr-plugin:
> 
> 
> http://www.osgi.org/xmlns/scr/v1.1.0; 
> immediate="true" 
> name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"
>  configuration-policy="require" activate="activate" deactivate="dispose">
>  class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
> 
>  interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
> 
> 
> 
> The prototype scope definition is missing and the plugin has classified the 
> component as DS 1.1.0 compliant.
> 
> Furthermore the build failed with the following error message:
> [INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ 
> test.osgi.service.http.paxweb ---
> [ERROR] Bundle test:test.osgi.service.http.paxweb:bundle:1.0.0-SNAPSHOT : 
> Service-Component entry can not be located in JAR: 
> OSGI-INF/test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent.xml~
> [ERROR] Error(s) found in bundle configuration
> 
> With maven-bundle-plugin:2.3.7 the build is working and the component 
> definition files get added to the jar.
> 
> Has anybody an idea what's going on?
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 
> 


 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org

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



maven-scr-plugin and DS 1.3 annotations not working

2016-03-22 Thread Jens Offenbach
Hi,
I am using maven-scr-plugin:1.21.0, 
org.osgi.service.component.annotations:1.3.0, 
org.apache.felix.scr.ds-annotations:1.2.8 and 
org.apache.felix.scr.annotations:1.9.12 and maven-bundle-plugin:3.0.1.

This is my annotated class with makes use of the prototype scope:

@Component(immediate = true, configurationPolicy = ConfigurationPolicy.REQUIRE)
@Service(HttpContextMapping)
public class HttpContextMappingComponent implements HttpContextMapping {

@Reference(scope = ReferenceScope.PROTOTYPE_REQUIRED, cardinality = 
ReferenceCardinality.MANDATORY, bind = "bind", unbind = "unbind")
private HttpEndpointManager endpointManager;
...

}

This is the component definition file created by maven-scr-plugin:


http://www.osgi.org/xmlns/scr/v1.1.0; 
immediate="true" 
name="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent" 
configuration-policy="require" activate="activate" deactivate="dispose">






The prototype scope definition is missing and the plugin has classified the 
component as DS 1.1.0 compliant.

Furthermore the build failed with the following error message:
[INFO] --- maven-bundle-plugin:3.0.1:bundle (default-bundle) @ 
test.osgi.service.http.paxweb ---
[ERROR] Bundle test:test.osgi.service.http.paxweb:bundle:1.0.0-SNAPSHOT : 
Service-Component entry can not be located in JAR: 
OSGI-INF/test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent.xml~
[ERROR] Error(s) found in bundle configuration

With maven-bundle-plugin:2.3.7 the build is working and the component 
definition files get added to the jar.

Has anybody an idea what's going on?

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