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

Suppress empty classpath warnings from bnd when creating a fragment with a manifest only

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • maven-bundle-plugin-3.0.1
    • None
    • Maven Bundle Plugin
    • None

    Description

      Currently bnd emits the following warnings when building a fragment with the maven-bundle-plugin which does not contain any classes (which is totally valid)

      WARNING] Bundle somegroup:system-fragment-xml-api:bundle:1.0-SNAPSHOT : Classpath is empty. Private-Package (-privatepackage) and Export-Package can only expand from the classpath when there is one
      [WARNING] Bundle somegroup:system-fragment-xml-api:bundle:1.0-SNAPSHOT : Unused Private-Package instructions, no such package(s) on the class path: [!*]
      [WARNING] Bundle somegroup:system-fragment-xml-api:bundle:1.0-SNAPSHOT : The JAR is empty: The instructions for the JAR named somegroup.system-fragment-xml-api did not cause any content to be included, this is likely wrong
      

      Attached is a demo pom.xml.

      Just setting the instruction -resourceonly to true in that case should be enough to suppress those warning (compare with https://github.com/bndtools/bnd/issues/1287).

      Maven-Bundle-Plugin should check if the header FragmentHost host is set and the classpath is empty. IFF that is the case it should call bnd with resourceonly:true.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            kwin Konrad Windszus

            Dates

              Created:
              Updated:

              Slack

                Issue deployment