Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The only time I would set Private-Package would be to have more control over what ends up in the bundle - either to remove certain packages or perhaps pull in additional packages not found by the source scanner. Also note that both Export-Package and Private-Package accept wildcards such as "org.example.*" which can reduce the number of entries in the list, but you should be careful not to set either the export or private instruction to "*" as this would pull in the entire classpath... dependencies and all!

How do a remove the generated Maven information from my resulting bundle JAR file?

Use the following archive setting:

No Format

<configuration>
  <archive>
    <addMavenDescriptor>false</addMavenDescriptor>
  </archive>
</configuration>

Put this in either the JAR or bundle plugin configuration.