Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16259

Karaf examples don't get deployed

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.8.0
    • 3.10.0
    • examples, karaf
    • None
    • Unknown

    Description

      Karaf example jars should have OSGi-related metadata such as Import-Package but they don't. Using bnd:

      $ 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
      

      This causes the following deploy command on Karaf to fail:

      install -s mvn:org.apache.camel.example/camel-example-servlet-rest-blueprint/${camel.version}
      

      Checking Camel 2.x (which still worked):

      $ 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
      

       

      Attachments

        Issue Links

          Activity

            People

              tadayosi Tadayoshi Sato
              tadayosi Tadayoshi Sato
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: