Versions Compared

Key

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

...

If we also assume that we have a bundle activator in one of the implementation packages, then <plugins> section of the POM file would look like this:

No Format
...
<plugins>
  <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>bundle-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
      <instructions>
        <Export-Package>org.foo.myproject.api</Export-Package>
        <Private-Package>!orgPackage>org.foo.myproject.api,org.foo.myproject.*</Private-Package>
      </instructions>
    </configuration>
  </plugin>
<plugins>
...

The <Export-Package> instruction tells the plugin which of the available packages to include into the bundle and to export, while the <Private-Package> instruction tells the plugin which of the available packages to include into the bundle but not export. If the two sets overlap, as they do in the case, then the export takes precedence.

Features

Default Behavior

Instructions

Anchor
how-to
how-to

Detailed "How To"