-
1. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
lhein Jul 10, 2012 4:46 PM (in response to abara)Hi,
this error comes from m2e which does not handle your scr plugin. So we need to define what to do with that plugin within the lifecycle mapping.
Try to add the following to your pom.xml file:
Hope that helps with your problem.
Lars
-
2. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 10, 2012 4:57 PM (in response to lhein)Lars,
Thank you for quick reply!
Upon pom.xml extension we still have the same issue
An updated pom.xml is attached.
Thank you
-
pom.xml 3.2 KB
-
-
3. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
lhein Jul 10, 2012 4:59 PM (in response to abara)Are you sure that it is exactly the same issue? Could you post a stack or problem details info here?
-
4. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 10, 2012 5:02 PM (in response to lhein)Plugin execution not covered by lifecycle configuration: org.apache.felix:maven-scr-plugin:1.7.4:scr (execution: generate-scr-scrdescriptor, phase: process-classes) pom.xml
line 101
Maven Project Build Lifecycle Mapping Problem
-
5. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
lhein Jul 10, 2012 5:06 PM (in response to abara)Thats really odd. Usually it should fix the problem. Could you rebuild it via mvn clean install and then reimport into Eclipse? (just to be sure)
-
6. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 10, 2012 5:34 PM (in response to lhein)Result seems to be quite inconclusive: at some point I was able to get rid of the initial problem, but at this point FuseIDE (Eclipse) itself starts misbehaving:
Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'DbConfigMng'. java.lang.NullPointerException *
This happened after I moved "pluginManagement" tag under "build" tag as it was suggested here: http://maven.apache.org/pom.html#Plugin_Management
It looks like even "clean" on the project does not help any longer, so I will re-assemble from the clean slate in minimal form and will check again...
Thank you
-
7. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
lhein Jul 10, 2012 5:36 PM (in response to abara)If you are fine with it you can also send me your zipped project so I can have a look at the problem.
-
8. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 11, 2012 11:00 AM (in response to lhein)Upon project re-assembly, the original problem was positively RESOLVED (although, as newcomers to the technology we are struggling through other baby-steps).
Thank you!
-
9. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
lhein Jul 11, 2012 3:02 PM (in response to abara)Good to hear that it works out now for you. Please let us know if you encounter other problems. We are happy to help you solve your problems.
Lars
-
10. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 16, 2012 2:52 PM (in response to lhein)Lars,
It looks like we were able to get past compilation, but not really to use the service...
I'm providing a reduced samples in the file attached.
Hello1Service is using SCR plugin to declare and publish service.
Hello1Camel is creating a bean using the service and then uses bean in camel route.
On the surface:
18:40:14,219 | INFO | rint Extender: 3 | BlueprintContainerImpl | ? ? | 10 - org.apache.aries.blueprint - 0.3.1 | Bundle com.videonext.tests.Hello1Camel is waiting for dependencies
smx@root> osgi:list|grep Hello
Hello1Service OSGi Bundle (0.0.1.SNAPSHOT)
Hello1Camel Blueprint Route (1.0.0.SNAPSHOT)
When looking deeper into Hello1Service assembled bundle:
afomenko:0 afomenko$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Bnd-LastModified: 1342463910466
Build-Jdk: 1.6.0_33
Built-By: afomenko
Bundle-ManifestVersion: 2
Bundle-Name: Hello1Service OSGi Bundle
Bundle-SymbolicName: com.videonext.tests.Hello1Service
Bundle-Version: 0.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: com.videonext.tests.Hello1Service;version="0.0.1.SNAPSHO
T",com.videonext.tests.Hello1Service.Impl;uses:="com.videonext.tests.He
llo1Service";version="0.0.1.SNAPSHOT"
Import-Package: org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
Service-Component: OSGI-INF/serviceComponents.xml
Tool: Bnd-1.50.0
afomenko:0 afomenko$ cat OSGI-INF/serviceComponents.xml
It looks like maven-plugin is ignoring export directive not to export "Impl" packages, but this is not a biggest issue.
The bigger one is: Hello1Camel is waiting forever to discover service which should have been essentially declared by Hello1Service exported configuration. Not sure where to go next from here. Please help!
thank you,
-
sample.tgz 21.1 KB
-
-
11. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 16, 2012 3:30 PM (in response to abara)Mistake from our side: we thought that upon sample successful compilation the rest would work, but apparently we still have the issue... Please see reply to last message for the problem description
Edited by: abara on Jul 16, 2012 7:29 PM
-
12. Re: Problem with DeclarativeServices meta generation out of SCR annotations.
abara Jul 16, 2012 5:13 PM (in response to abara)the question was relocated to another (fresh) thread