You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jens Offenbach <wo...@gmx.de> on 2016/03/22 07:41:58 UTC
maven-scr-plugin and DS 1.3 annotations not working
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:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="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">
<implementation class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
<service servicefactory="false">
<provide interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
</service>
</scr:component>
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-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-scr-plugin and DS 1.3 annotations not working
Posted by Oliver Lietz <ap...@oliverlietz.de>.
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 <wo...@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
> >> "<unpackBundle>true</unpackBundle>" and copy the folder to your project
> >> basedir like this: <plugin>
> >>
> >> <groupId>org.apache.maven.plugins</groupId>
> >> <artifactId>maven-resources-plugin</artifactId>
> >> <executions>
> >>
> >> <execution>
> >>
> >> <id>copy-scr-descriptor</id>
> >> <phase>process-classes</phase>
> >> <goals>
> >>
> >> <goal>copy-resources</goal>
> >>
> >> </goals>
> >> <configuration>
> >>
> >> <outputDirectory>${basedir}/OSGI-INF</outputDirectory>
> >> <resources>
> >>
> >> <resource>
> >>
> >> <directory>${project.build.outputDirectory}/OSGI-
INF</directory>
> >> <filtering>false</filtering>
> >>
> >> </resource>
> >>
> >> </resources>
> >>
> >> </configuration>
> >>
> >> </execution>
> >>
> >> </executions>
> >>
> >> </plugin>
> >>
> >> Regards,
> >> Jens
> >>
> >>
> >> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
> >> Von: "Carsten Ziegeler" <cz...@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:
> >>
> >> <configuration>
> >> <instructions>
> >> <_dsannotations>*</_dsannotations>
> >> <_metatypeannotations>*</_metatypeannotations>
> >> </instructions>
> >> </configuration>
> >>
> >> 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:
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <scr:component xmlns:scr="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"> <implementation
> >>> class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingC
> >>> omponent"/> <service servicefactory="false">
> >>> <provide
> >>> interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
> >>> </service>
> >>> </scr:component>
> >>>
> >>> 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.HttpContextMappin
> >>> gComponent.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-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >> --
> >> Carsten Ziegeler
> >> Adobe Research Switzerland
> >> cziegeler@apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@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 and DS 1.3 annotations not working
Posted by Carsten Ziegeler <cz...@apache.org>.
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 <wo...@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 "<unpackBundle>true</unpackBundle>" and copy the folder to your project basedir like this:
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-resources-plugin</artifactId>
>> <executions>
>> <execution>
>> <id>copy-scr-descriptor</id>
>> <phase>process-classes</phase>
>> <goals>
>> <goal>copy-resources</goal>
>> </goals>
>> <configuration>
>> <outputDirectory>${basedir}/OSGI-INF</outputDirectory>
>> <resources>
>> <resource>
>> <directory>${project.build.outputDirectory}/OSGI-INF</directory>
>> <filtering>false</filtering>
>> </resource>
>> </resources>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>> Regards,
>> Jens
>>
>>
>> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
>> Von: "Carsten Ziegeler" <cz...@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:
>>
>> <configuration>
>> <instructions>
>> <_dsannotations>*</_dsannotations>
>> <_metatypeannotations>*</_metatypeannotations>
>> </instructions>
>> </configuration>
>>
>> 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:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <scr:component xmlns:scr="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">
>>> <implementation class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
>>> <service servicefactory="false">
>>> <provide interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
>>> </service>
>>> </scr:component>
>>>
>>> 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-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
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 and DS 1.3 annotations not working
Posted by David Jencks <da...@yahoo.com.INVALID>.
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 <wo...@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 "<unpackBundle>true</unpackBundle>" and copy the folder to your project basedir like this:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <executions>
> <execution>
> <id>copy-scr-descriptor</id>
> <phase>process-classes</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <outputDirectory>${basedir}/OSGI-INF</outputDirectory>
> <resources>
> <resource>
> <directory>${project.build.outputDirectory}/OSGI-INF</directory>
> <filtering>false</filtering>
> </resource>
> </resources>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> Regards,
> Jens
>
>
> Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
> Von: "Carsten Ziegeler" <cz...@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:
>
> <configuration>
> <instructions>
> <_dsannotations>*</_dsannotations>
> <_metatypeannotations>*</_metatypeannotations>
> </instructions>
> </configuration>
>
> 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:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <scr:component xmlns:scr="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">
>> <implementation class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
>> <service servicefactory="false">
>> <provide interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
>> </service>
>> </scr:component>
>>
>> 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-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Aw: Re: maven-scr-plugin and DS 1.3 annotations not working
Posted by Jens Offenbach <wo...@gmx.de>.
@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 "<unpackBundle>true</unpackBundle>" and copy the folder to your project basedir like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-scr-descriptor</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/OSGI-INF</outputDirectory>
<resources>
<resource>
<directory>${project.build.outputDirectory}/OSGI-INF</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Regards,
Jens
Gesendet: Dienstag, 22. März 2016 um 07:45 Uhr
Von: "Carsten Ziegeler" <cz...@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:
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
</instructions>
</configuration>
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:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="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">
> <implementation class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
> <service servicefactory="false">
> <provide interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
> </service>
> </scr:component>
>
> 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-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@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 and DS 1.3 annotations not working
Posted by Carsten Ziegeler <cz...@apache.org>.
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:
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
</instructions>
</configuration>
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:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="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">
> <implementation class="test.osgi.service.http.paxweb.impl.component.HttpContextMappingComponent"/>
> <service servicefactory="false">
> <provide interface="org.ops4j.pax.web.extender.whiteboard.HttpContextMapping"/>
> </service>
> </scr:component>
>
> 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-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org