[
https://issues.apache.org/jira/browse/FELIX-2963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049440#comment-13049440
]
Andrei Pozolotin commented on FELIX-2963:
-----------------------------------------
probably again has to do with exploded jar:
this error happens when building derived project only in eclipse with m2e:
6/14/11 4:24:32 PM CDT: Maven Builder: AUTO_BUILD
6/14/11 4:24:32 PM CDT: [INFO] Using 'UTF-8' encoding to copy filtered
resources.
6/14/11 4:24:32 PM CDT: [INFO] Copying 8 resources
6/14/11 4:24:32 PM CDT: [INFO] Copying 8 resources
6/14/11 4:24:32 PM CDT: [WARN] Unable to read SCR descriptor file from JAR File
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-backend/barchart-backend-api/target/classes
at OSGI-INF/serviceComponents.xml
6/14/11 4:24:32 PM CDT: [WARN] Unable to read SCR descriptor file from JAR File
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-backend/barchart-backend-api/target/classes
at OSGI-INF/serviceComponents.xml
6/14/11 4:24:33 PM CDT: [INFO] Writing abstract service descriptor
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-plugin-core/target/classes/OSGI-INF/scr-plugin/scrinfo.xml
with 22 entries.
6/14/11 4:24:33 PM CDT: [INFO] Generating 22 Service Component Descriptors to
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-plugin-core/target/classes/OSGI-INF/serviceComponents.xml
6/14/11 4:24:33 PM CDT: [INFO] Using 'UTF-8' encoding to copy filtered
resources.
6/14/11 4:24:33 PM CDT: [INFO] Copying 0 resource
this project contains parent:
6/14/11 4:24:32 PM CDT: [WARN] Unable to read SCR descriptor file from JAR File
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-backend/barchart-backend-api/target/classes
at OSGI-INF/serviceComponents.xml
this project contains derived:
6/14/11 4:24:33 PM CDT: [INFO] Generating 22 Service Component Descriptors to
/home/user1/Workspaces/barchart-3.6-work/barchart-platform/barchart-plugin-core/target/classes/OSGI-INF/serviceComponents.xml
and in the parent - the serviceComponents.xml is present, but it contains no
entries for @Component(componentAbstract = true)
(only for some other non-abstract components)
so, basically scr plugin is either not able to find parent abstarct component
descriptor or can not read parent xml at all
> scr annotations @Activate @Deactivate @Modified are not detected with class
> inheritance
> ---------------------------------------------------------------------------------------
>
> Key: FELIX-2963
> URL: https://issues.apache.org/jira/browse/FELIX-2963
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.0, scr generator 1.1.0
> Reporter: Andrei Pozolotin
> Assignee: Carsten Ziegeler
> Fix For: maven-scr-plugin-1.7.2, scr generator 1.1.2
>
>
> // 1) when I use a base component with scr lifecycle annotations:
> @Component(componentAbstract = true)
> public abstract class BasePluginEDT {
> @Activate
> protected final void activateEDT(final Map<String, String> config) {
> @Deactivate
> protected final void deactivateEDT(final Map<String, String> config) {
> @Modified
> protected final void modifiedEDT(final Map<String, String> config) {
> // 2) which is inherited by a derived component:
> @Service
> @Component(name = PluginSpaceService.PID, policy =
> ConfigurationPolicy.REQUIRE, immediate = true)
> public class BucketPlugin extends BasePluginEDT implements PluginSpaceService
> {
> // 3) then xml for the derived component does not show annotated methods from
> the parent
> <scr:component enabled="true" immediate="true"
> name="barchart.service.space" configuration-policy="require">
> <implementation class="com.ddfplus.core.space.BucketPlugin"/>
> <service servicefactory="false">
> <provide interface="com.ddfplus.api.plugin.PluginSpaceService"/>
> </service>
> <property name="service.pid" type="String"
> value="barchart.service.space"/>
> <reference name="beanService"
> interface="com.ddfplus.api.host.HostBeanService" cardinality="1..1"
> policy="static" bind="bind" unbind="unbind"/>
> <reference name="dispService"
> interface="com.ddfplus.api.host.HostDisplayService" cardinality="1..1"
> policy="static" bind="bind" unbind="unbind"/>
> </scr:component>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira