Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6084

Startup bundles do not resolve correctly when compiled with Java 11 during assembly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.2
    • 4.2.3
    • karaf
    • None

    Description

      The problem is that we have a fragment for the logger which needs to be loaded in the startup phase. We compile the bundles with Java 11 which results in a

      Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"

      manifest entry. We during build we get an error that a bundle requirement is not met.

      We then discovered that the karaf-maven-plugin uses "1.8" as default value for the javase option. Changing that to "11" results in a compile error because this version is not supported.

      Therefore I suggest to add Java 10 and Java 11 to enum org.apache.karaf.profile.assembly.Builder.JavaVersion. That enables support for this Java version also.

      In my local tests this solved the compile issue when setting the javase option to 11.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            martin.krueger Martin Krüger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: