Versions Compared

Key

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

...

  • <Bundle-SymbolicName> is computed using the shared Maven2OsgiConverter component, which uses the following algorithm:
    Get the symbolic name as groupId + "." + artifactId, with the following exceptions:
    • if artifact.getFile is not null and the jar contains a OSGi Manifest with Bundle-SymbolicName property then that value is returned
    • if groupId has only one section (no dots) and artifact.getFile is not null then the first package name with classes is returned. eg. commons-logging:commons-logging -> org.apache.commons.logging
    • if artifactId is equal to last section of groupId then groupId is returned. eg. org.apache.maven:maven -> org.apache.maven
    • if artifactId starts with last section of groupId that portion is removed. eg. org.apache.maven:maven-core -> org.apache.maven.core
      The computed symbolic name is also stored in the $(maven-symbolicname) property in case you want to add attributes or directives to it.
  • <Export-Package> is now assumed to be the set of packages in your local Java sources, excluding the default package '.' and any packages containing 'impl' or 'internal'.
    (before version 2 of the bundleplugin it was based on the symbolic name)
  • <Private-Package> is now assumed to be the set of packages in your local Java sources (note that any packages in both <Export-Package> and <Private-Package> will be exported).
    (before version 2 of the bundleplugin it was assumed to be empty by default)
  • <Import-Package> is assumed to be "*", which imports everything referred to by the bundle content, but not contained in the bundle.
    Any exported packages are also imported by default, to ensure a consistent class space.
  • <Include-Resource> is generated from the project's Maven resources, typically "src/main/resources/", which will copy the specified project directory hierarchy into the resulting bundle JAR file, mirroring standard Maven behavior.
  • <Bundle-Version> is assumed to be "${pom.version}" with '-' character separator of the qualifier replaced with a '.' character.
  • <Bundle-Name> is assumed to be "${pom.name}".
  • <Bundle-Description> is assumed to be "${pom.description}".
  • <Bundle-License> is assumed to be "${pom.licenses}".
  • <Bundle-Vendor> is assumed to be "${pom.organization.name}".
  • <Bundle-DocURL> is assumed to be "${pom.organization.url}".

...

  • bundle - build an OSGi bundle jar for the current project
    configuration options:
    • manifestLocation defaults to ${project.build.outputDirectory}/META-INF
    • unpackBundle unpack bundle contents to output directory, defaults to false
    • excludeDependencies comma-separated list of dependency artifactIds to exclude from the classpath passed to Bnd, use "true" to exclude everything.
      Version 2 of the bundleplugin also now supports the same style of filter clauses in excludeDependencies as Embed-Dependency.
    • classifier attach bundle to the project using the given classifier
    • supportedProjectTypes defaults to "jar","bundle"

...