Functionality

These things are needed to be done when developing Ecipse plugin (or bundle) with Maven2:

  • Register org.eclipse.pde.ManifestBuilder and org.eclipse.pde.SchemaBuilder builders, and the org.eclipse.pde.PluginNature nature. This can be done by configuring the maven eclipse plugin and are not handled by this plugin. The eclipse plugin is configured in the sk.baka.eclipse:plugin-parent-pom POM project which you should set as parent for your POM file.
  • Move eclipse bundles dependencies from .classpath file to the META-INF/MANIFEST.MF file.
  • The META-INF/MANIFEST.MF must be modified to contain these entries:
    Bundle-Name: ${project.name}
    Bundle-SymbolicName: ${project.artifactId}; singleton:=true
    Bundle-Version: ${project.version}
    Bundle-Vendor: ${project.organization.name}
    Export-Package: just export all packages in all sourcepaths for now.
    Require-Bundle: org.eclipse.core.runtime,
     org.eclipse.jface,
     org.eclipse.swt,
     org.eclipse.draw2d
    Bundle-ClassPath: ${artifactId}-${version}.jar,
     lib/stax-api-1.0.jar,
     lib/commons-io-1.3.jar
  • When another Eclipse bundle depends on our bundle, it may want to use this bundle's libraries. This is possible only when libraries are placed in the bundle's project filesystem. Therefore, we need to modify the .project file to introduce symlinks of dependent libraries, creating links of Maven2 repository libraries in the lib/ directory.
  • Symlink definition cannot use the M2_REPO variable introduced by the maven-eclipse-plugin; we need to weave the M2_REPO variable into the Linked Resource variable list.