Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
maven-bundle-plugin-3.0.1
-
None
-
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
Attachments
Issue Links
- relates to
-
FELIX-2991 Allow the creating of fragments that populate Export-Package
-
- Open
-