Exporting packages from a JAR file in a Maven bundle

If you want to export packages from a JAR file in a Maven bundle, and the Maven project was converted from an OSGi bundle, you must modify the pom.xml file.

Procedure

To export packages from a JAR file in a Maven bundle:

  1. In Enterprise Explorer, expand your bundle project.
  2. Double-click the pom.xml file.
  3. Click the pom.xml tab.
  4. Locate the instructions section (between the <instructions> and </instructions> tags).
  5. Add a classpath element (<classpath></classpath>).
  6. Between the classpath tags, add the relative of the JAR file. If there are multiple JAR files, list the paths to each JAR file separated by a comma.
  7. After the classpath tags, add an Export-Package element (<Export-Package></Export-Package>).
  8. Between the Export-Package tags, list the JAR file that you want to export.
    Tip: You can use the character * as a wildcard.
  9. Click File > Save.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: texportjarmaven.html