Closed nagaraj-shan closed 8 years ago
Do you have a repro that you could share?
On 9 April 2015 at 12:39, Nagarajan Shanmugam notifications@github.com wrote:
I have create beans in blueprint.xml I gave import-package "*". While generating manifest.mf it does not consider the classes from blueprint.xml. Because of that it throwing class not found exception while deploying this bundle in Karaf. Maven felix bundle plugin resolves the dependencies including classes from bundle.xml
------Generated throw gradle Plugin Manifest-Version: 1.0 Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml Bundle-Description: Quixey Camel Servlet Bundle-DocURL: http://www.quixey.com Bundle-ManifestVersion: 2 Bundle-Name: com.quixey.api.quixey-camel-servlet Bundle-SymbolicName: com.quixey.api.quixey-camel-servlet Bundle-Vendor: Quixey Bundle-Version: 1.0.0 Created-By: 1.8.0_40 (Oracle Corporation) Embed-Dependency: *;inline=false Import-Package: org.apache.camel;version="[2.14,3)",org.apache.camel.bui lder;version="[2.14,3)",org.apache.camel.karaf.commands.internal;versio n="[2.14,3)",org.apache.camel.model;version="[2.14,3)",org.osgi.framewo rk;version="[1.6,2)",org.slf4j Private-Package: 404.html,com.quixey.api.service,logback.xml Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" Tool: Bnd-2.4.0.201411031534
----- Generated using Maven. Manifest-Version: 1.0 Bnd-LastModified: 1428556803999 Build-Jdk: 1.8.0_40 Built-By: nagarajan Bundle-Activator: com.quixey.api.service.QuixeyServiceActivator Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml Bundle-Description: An example using Servlet REST with OSGi Blueprint Bundle-ManifestVersion: 2 Bundle-Name: Camel :: Example :: Servlet Bundle-SymbolicName: com.quixey.api.quixey-camel-servlet Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: com.quixey.api.service;uses:="org.apache.camel,org.apach e.camel.builder,org.osgi.framework";version="1.0.0" Export-Service: org.apache.camel.component.servlet.HttpRegistry,org.ops4 j.pax.web.extender.whiteboard.ErrorPageMapping,org.ops4j.pax.web.extend er.whiteboard.WelcomeFileMapping Import-Package: org.apache.camel;version="[2.14,3)",org.apache.camel.bui lder;version="[2.14,3)",org.apache.camel.component.servlet;version="[2. 14,3)",org.apache.camel.component.servlet.osgi;version="[2.14,3)",org.a pache.camel.karaf.commands.internal;version="[2.14,3)",org.apache.camel .model;version="[2.14,3)",org.ops4j.pax.web.extender.whiteboard;version ="[4.1,5)",org.ops4j.pax.web.extender.whiteboard.runtime;version="[4.1, 5)",org.osgi.framework;version="[1.7,2)",org.osgi.service.blueprint;ver sion="[1.0.0,2.0.0)",org.osgi.service.http;version="[1.2,2)",org.slf4j Import-Service: org.osgi.service.http.HttpService;multiple:=false Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.5))" Tool: Bnd-2.3.0.201405100607
— Reply to this email directly or view it on GitHub https://github.com/TomDmitriev/gradle-bundle-plugin/issues/32.
Yours sincerely, Artyom Dmitriev
Hi here is the git hub project I have shared to repro the issue.
git@github.com:nagaraj-shan/osgi-sample-bundle.git
I generated bundle using both maven and gradle dm plugin. I have created beans only in buleprint.xml. nowhere else. And I have created Activator Class. See the difference while generating bundle metadata.
Sorry for the late reply, I haven't had a chance to look at your example earlier.
Try to add to the list of instructions the following:
instruction '-plugin', 'aQute.lib.spring.SpringXMLType
Hi,
Thanks for the update. This works fine.
@nagaraj-shan Is this plugin working for you using spring.xml
or blueprint.xml
config files?
I cannot make it work properly with blueprint.xml
https://github.com/TomDmitriev/gradle-bundle-plugin/issues/35
Any suggestion would be very helpful :)
Thanks
I have create beans in blueprint.xml I gave import-package "*". While generating manifest.mf it does not consider the classes from blueprint.xml. Because of that it throwing class not found exception while deploying this bundle in Karaf. Maven felix bundle plugin resolves the dependencies including classes from bundle.xml
------Generated throw gradle Plugin Manifest-Version: 1.0 Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml Bundle-Description: Quixey Camel Servlet Bundle-DocURL: http://www.quixey.com Bundle-ManifestVersion: 2 Bundle-Name: com.quixey.api.quixey-camel-servlet Bundle-SymbolicName: com.quixey.api.quixey-camel-servlet Bundle-Vendor: Quixey Bundle-Version: 1.0.0 Created-By: 1.8.0_40 (Oracle Corporation) Embed-Dependency: *;inline=false Import-Package: org.apache.camel;version="[2.14,3)",org.apache.camel.bui lder;version="[2.14,3)",org.apache.camel.karaf.commands.internal;versio n="[2.14,3)",org.apache.camel.model;version="[2.14,3)",org.osgi.framewo rk;version="[1.6,2)",org.slf4j Private-Package: 404.html,com.quixey.api.service,logback.xml Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" Tool: Bnd-2.4.0.201411031534
----- Generated using Maven. Manifest-Version: 1.0 Bnd-LastModified: 1428556803999 Build-Jdk: 1.8.0_40 Built-By: nagarajan Bundle-Activator: com.quixey.api.service.QuixeyServiceActivator Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml Bundle-Description: An example using Servlet REST with OSGi Blueprint Bundle-ManifestVersion: 2 Bundle-Name: Camel :: Example :: Servlet Bundle-SymbolicName: com.quixey.api.quixey-camel-servlet Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: com.quixey.api.service;uses:="org.apache.camel,org.apach e.camel.builder,org.osgi.framework";version="1.0.0" Export-Service: org.apache.camel.component.servlet.HttpRegistry,org.ops4 j.pax.web.extender.whiteboard.ErrorPageMapping,org.ops4j.pax.web.extend er.whiteboard.WelcomeFileMapping Import-Package: org.apache.camel;version="[2.14,3)",org.apache.camel.bui lder;version="[2.14,3)",org.apache.camel.component.servlet;version="[2. 14,3)",org.apache.camel.component.servlet.osgi;version="[2.14,3)",org.a pache.camel.karaf.commands.internal;version="[2.14,3)",org.apache.camel .model;version="[2.14,3)",org.ops4j.pax.web.extender.whiteboard;version ="[4.1,5)",org.ops4j.pax.web.extender.whiteboard.runtime;version="[4.1, 5)",org.osgi.framework;version="[1.7,2)",org.osgi.service.blueprint;ver sion="[1.0.0,2.0.0)",org.osgi.service.http;version="[1.2,2)",org.slf4j Import-Service: org.osgi.service.http.HttpService;multiple:=false Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.5))" Tool: Bnd-2.3.0.201405100607