You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Tadayoshi Sato (Jira)" <ji...@apache.org> on 2021/02/25 11:21:00 UTC
[jira] [Updated] (CAMEL-16259) Karaf examples don't get deployed
[ https://issues.apache.org/jira/browse/CAMEL-16259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tadayoshi Sato updated CAMEL-16259:
-----------------------------------
Description:
[Karaf example jars|https://github.com/apache/camel-karaf-examples] should have OSGi-related metadata such as {{Import-Package}} but they don't. Using [bnd|https://bnd.bndtools.org/]:
{code:java}
$ bnd camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-3.9.0-SNAPSHOT.jar
Build-Jdk-Spec 11
Created-By Maven Jar Plugin 3.2.0
Implementation-Title Camel :: Example :: Servlet :: OSGi
Implementation-Vendor The Apache Software Foundation
Implementation-Version 3.9.0-SNAPSHOT
Manifest-Version 1.0
Specification-Title Camel :: Example :: Servlet :: OSGi
Specification-Vendor The Apache Software Foundation
Specification-Version 3.9
{code}
This causes the following deploy command on Karaf to fail:
{code:java}
install -s mvn:org.apache.camel.example/camel-example-servlet-rest-blueprint/${camel.version}
{code}
Checking Camel 2.x (which still worked):
{code:java}
$ bnd examples/camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-2.25.0-SNAPSHOT.jar
Bnd-LastModified 1568357813343
Build-Jdk 1.8.0_222
Built-By tasato
Bundle-Blueprint OSGI-INF/blueprint/camel.xml
Bundle-Description An example using Servlet REST with OSGi Blueprint
Bundle-DocURL https://www.apache.org/
Bundle-License https://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion 2
Bundle-Name camel-example-servlet-rest-blueprint
Bundle-SymbolicName camel-example-servlet-rest-blueprint
Bundle-Vendor The Apache Software Foundation
Bundle-Version 2.25.0.SNAPSHOT
Created-By Apache Maven Bundle Plugin
Export-Package org.apache.camel.example.rest;version="2.25.0.SNAPSHOT"
Implementation-Title Camel :: Example :: Servlet REST Blueprint
Implementation-URL http://camel.apache.org/camel-parent/examples/camel-example-servlet-rest-blueprint
Implementation-Vendor The Apache Software Foundation
Implementation-Vendor-Id org.apache.camel.example
Implementation-Version 2.25.0-SNAPSHOT
Import-Package org.apache.camel.component.servlet.osgi;version="[2.25,3)"
org.apache.camel.component.servlet;version="[2.25,3)"
org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
org.osgi.service.http
Import-Service org.osgi.service.http.HttpService;multiple:=false
Karaf-Info Camel;camel-example-servlet-rest-blueprint=2.25.0-SNAPSHOT
Manifest-Version 1.0
Require-Capability osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Specification-Title Camel :: Example :: Servlet REST Blueprint
Specification-Vendor The Apache Software Foundation
Specification-Version 2.25.0-SNAPSHOT
Tool Bnd-3.5.0.201709291849
{code}
was:
Karaf example jars should have OSGi-related metadata such as {{Import-Package}} but they don't. Using [bnd|https://bnd.bndtools.org/]:
{code}
$ bnd camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-3.9.0-SNAPSHOT.jar
Build-Jdk-Spec 11
Created-By Maven Jar Plugin 3.2.0
Implementation-Title Camel :: Example :: Servlet :: OSGi
Implementation-Vendor The Apache Software Foundation
Implementation-Version 3.9.0-SNAPSHOT
Manifest-Version 1.0
Specification-Title Camel :: Example :: Servlet :: OSGi
Specification-Vendor The Apache Software Foundation
Specification-Version 3.9
{code}
This causes the following deploy command on Karaf to fail:
{code}
install -s mvn:org.apache.camel.example/camel-example-servlet-rest-blueprint/${camel.version}
{code}
Checking Camel 2.x (which still worked):
{code}
$ bnd examples/camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-2.25.0-SNAPSHOT.jar
Bnd-LastModified 1568357813343
Build-Jdk 1.8.0_222
Built-By tasato
Bundle-Blueprint OSGI-INF/blueprint/camel.xml
Bundle-Description An example using Servlet REST with OSGi Blueprint
Bundle-DocURL https://www.apache.org/
Bundle-License https://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion 2
Bundle-Name camel-example-servlet-rest-blueprint
Bundle-SymbolicName camel-example-servlet-rest-blueprint
Bundle-Vendor The Apache Software Foundation
Bundle-Version 2.25.0.SNAPSHOT
Created-By Apache Maven Bundle Plugin
Export-Package org.apache.camel.example.rest;version="2.25.0.SNAPSHOT"
Implementation-Title Camel :: Example :: Servlet REST Blueprint
Implementation-URL http://camel.apache.org/camel-parent/examples/camel-example-servlet-rest-blueprint
Implementation-Vendor The Apache Software Foundation
Implementation-Vendor-Id org.apache.camel.example
Implementation-Version 2.25.0-SNAPSHOT
Import-Package org.apache.camel.component.servlet.osgi;version="[2.25,3)"
org.apache.camel.component.servlet;version="[2.25,3)"
org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
org.osgi.service.http
Import-Service org.osgi.service.http.HttpService;multiple:=false
Karaf-Info Camel;camel-example-servlet-rest-blueprint=2.25.0-SNAPSHOT
Manifest-Version 1.0
Require-Capability osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Specification-Title Camel :: Example :: Servlet REST Blueprint
Specification-Vendor The Apache Software Foundation
Specification-Version 2.25.0-SNAPSHOT
Tool Bnd-3.5.0.201709291849
{code}
> Karaf examples don't get deployed
> ---------------------------------
>
> Key: CAMEL-16259
> URL: https://issues.apache.org/jira/browse/CAMEL-16259
> Project: Camel
> Issue Type: Bug
> Components: examples, karaf
> Affects Versions: 3.8.0
> Reporter: Tadayoshi Sato
> Priority: Major
>
> [Karaf example jars|https://github.com/apache/camel-karaf-examples] should have OSGi-related metadata such as {{Import-Package}} but they don't. Using [bnd|https://bnd.bndtools.org/]:
> {code:java}
> $ bnd camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-3.9.0-SNAPSHOT.jar
> Build-Jdk-Spec 11
> Created-By Maven Jar Plugin 3.2.0
> Implementation-Title Camel :: Example :: Servlet :: OSGi
> Implementation-Vendor The Apache Software Foundation
> Implementation-Version 3.9.0-SNAPSHOT
> Manifest-Version 1.0
> Specification-Title Camel :: Example :: Servlet :: OSGi
> Specification-Vendor The Apache Software Foundation
> Specification-Version 3.9
> {code}
> This causes the following deploy command on Karaf to fail:
> {code:java}
> install -s mvn:org.apache.camel.example/camel-example-servlet-rest-blueprint/${camel.version}
> {code}
> Checking Camel 2.x (which still worked):
> {code:java}
> $ bnd examples/camel-example-servlet-rest-blueprint/target/camel-example-servlet-rest-blueprint-2.25.0-SNAPSHOT.jar
> Bnd-LastModified 1568357813343
> Build-Jdk 1.8.0_222
> Built-By tasato
> Bundle-Blueprint OSGI-INF/blueprint/camel.xml
> Bundle-Description An example using Servlet REST with OSGi Blueprint
> Bundle-DocURL https://www.apache.org/
> Bundle-License https://www.apache.org/licenses/LICENSE-2.0.txt
> Bundle-ManifestVersion 2
> Bundle-Name camel-example-servlet-rest-blueprint
> Bundle-SymbolicName camel-example-servlet-rest-blueprint
> Bundle-Vendor The Apache Software Foundation
> Bundle-Version 2.25.0.SNAPSHOT
> Created-By Apache Maven Bundle Plugin
> Export-Package org.apache.camel.example.rest;version="2.25.0.SNAPSHOT"
> Implementation-Title Camel :: Example :: Servlet REST Blueprint
> Implementation-URL http://camel.apache.org/camel-parent/examples/camel-example-servlet-rest-blueprint
> Implementation-Vendor The Apache Software Foundation
> Implementation-Vendor-Id org.apache.camel.example
> Implementation-Version 2.25.0-SNAPSHOT
> Import-Package org.apache.camel.component.servlet.osgi;version="[2.25,3)"
> org.apache.camel.component.servlet;version="[2.25,3)"
> org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
> org.osgi.service.http
> Import-Service org.osgi.service.http.HttpService;multiple:=false
> Karaf-Info Camel;camel-example-servlet-rest-blueprint=2.25.0-SNAPSHOT
> Manifest-Version 1.0
> Require-Capability osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
> Specification-Title Camel :: Example :: Servlet REST Blueprint
> Specification-Vendor The Apache Software Foundation
> Specification-Version 2.25.0-SNAPSHOT
> Tool Bnd-3.5.0.201709291849
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)