Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5698

Bundle plugin cannot cope with Java 9 module-info.java

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: maven-bundle-plugin-3.3.0
    • Fix Version/s: maven-bundle-plugin-3.5.0
    • Component/s: Maven Bundle Plugin
    • Labels:
      None
    • Environment:
      java version "9"
      Java(TM) SE Runtime Environment (build 9+181)
      Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

      Description

      Please see the trivial repro case at:

      maven-bundle-plugin-20170923

      The plugin fails with:

      [ERROR] Bundle com.io7m.bugs:maven-bundle-plugin-20170923:bundle:0.1.0 : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
      [ERROR] Bundle com.io7m.bugs:maven-bundle-plugin-20170923:bundle:0.1.0 : Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
      

      There doesn't appear to be a way to exclude the module-info.java files from BND's class file analysis. An easy fix for this bug would be to simple ignore module-info.java files as they're irrelevant for OSGi (but will be present in projects that aim to support both OSGi and Jigsaw).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                io7m Mark Raynsford
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: