Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Changes in 3.0.0

Bram Pouwelse edited this page Sep 25, 2015 · 24 revisions

Bnd/Bndtools 3.0.0

New Eclipse Incremental Builder and Classpath Container implementations

  • Access violations (e.g. using private, or more accurate not exported, packages) are now warnings
  • We now faithfully use the built JAR file instead of the bin folder with version=latest. version=project uses the bin folder directly. Using the built JAR means that any extra packaged code will be visible in downstream projects.
  • F3 et al work despite having a binary reference
  • Project dependencies are now faithfully recorded in the project’s dynamic dependencies, this results in building the projects in proper bnd order.
  • You can add a packages attribute on a bundle in the -buildpath with a (comma separated) wildcarded expression for packages that are not exported but should not generate access warnings.
  • Non-bundle jars are fully visible, they generate no warnings
  • cnf will refresh if any of the build.bnd, ext/*.bnd, or included files have changed
  • Project is now rebuilt when:
  • cnf was refreshed
  • Any resource in the project that is not in generated, src, test, bin_test has changed
  • Any upstream dependency has changed its generated/buildfiles file
  • Error markers in test are not blocking the build. In src they are blocking by default but this can be changed in the preferences.
  • The option to include Eclipse build path dependencies is removed
  • Builder implementation code is now split in separate classes for handling markers & errors, deltas, cnf, and general build making it a lot more easy to maintain.
  • Workspace is refreshed if you actually build classes in the cnf project (yes you can …) so that any bnd plugins that are built in the cnf project are refreshed.
  • Dependencies in -buildpath and/or -runbundles can be restricted to specific repositories. For example: -buildpath: osgi.cmpn; version=5.0; repo="Build*,Release" (will match repositories named exactly "Release", or matching the pattern "Build*").
  • Wildcards are permitted in -buildpath, for example: -buildpath: *; repo=Build. This will add every JAR in the Build repo to the build path! The intended purpose of this feature is to enable type-level searching over repository contents in Eclipse. We recommend not using wildcards outside of the cnf project.

bnd-maven-plugin Changes

  • The bnd-maven-plugin can now be added to the build configuration of the parent project POM, and will be inherited by the child projects. Therefore it is possible to configure the plugin just one time on the parent.
  • Also, the plugin now inherits bnd properties and instructions from a bnd.bnd file that can be placed in the parent project. Settings in the bnd.bnd file of each module can supplement and override the settings in the parent bnd.bnd.
  • The bnd.bnd file in each project is optional. If omitted, then only settings inherited from the parent (and bnd's built-in defaults) are applied.
  • POM properties can be used in the bnd.bnd file. For example:
    Bundle-SymbolicName: ${project.groupId}.${project.artifactId}

bnd Gradle Plugin Changes

  • Includes the biz.aQute.repository code, so this jar is not needed on the -pluginpath to access the repository plugins.
  • Can be used outside of a normal Bnd Workspace build environment. See Gradle Plugin for non-Workspace builds for details.
  • In the build.gradle file, test.ignoreFailures = true can be used to ignore test failures in the test task and check.ignoreFailures = true can be used to ignore test failures in the check task.

Other Notable Changes

  • The run resolution wizard now provides possible candidates for optional dependencies. You can select one or more of these to augment your run requirements and then re-resolve. Selected options can be removed again afterwards if you don't like the new result.
  • The Repositories view has a new Advanced Search button, which will allow repositories to be searched for exported packages, or OSGi Services, or any other capability namespace. Note that only repositories implementing the OSGi Repository Service (OSGi Compendium, chapter 132) will return results:
  • The Imports/Exports view has been renamed to the Resolution view, and displays all of the capabilities and requirements of the selected bundle, not just packages.
  • The Repositories view has a Download button which will eagerly download and cache bundles from a remote repository. It can be used for individual bundles or an entire repository. The progress of the job can be tracked in the standard Eclipse Progress view. The job supports cancellation but not during the download of an individual resource, i.e. it will stop after finishing the current download.
  • Bnd and Bndtools are now built targeting Java 7. So they require Java 7 or later to run.
  • Bndtools is now built targeting Eclipse Kepler 4.3.2. So it requires Eclipse Kepler 4.3.2 or later to run.
  • Multiple source folders can now be specified on the src property.
  • No longer analyzes the packages on the classpath, only information in manifest is used to find out package information
  • Added bnd command bnd resolve validate <index.xml> to validate that a repository file is complete
  • Extended the resource package with many functions to work easily with resources, capabilities and requirements
  • Handles SCR Release 6
  • Added knowledge about OSGi R6 Core to OSGi
  • Build path can now handle wildcards for bsn
  • Added a -augment instruction to add capabilities and requirements to resources during bnd resolves
  • In places where a bundle returns a boolean words like not set, empty string, false, not, off are interpreted as false, otherwise the expression is true. As a slight addition, you can start it with ! to invert the remaining part.
  • Replaced the biz.aQute.junit tester with biz.aQute.tester. The difference is that the biz.aQute.tester runs as a bundle and does NOT provide JUnit (and broken hamcrest) packages. The old tester can be set with -tester=biz.aQute.junit.
  • Use source file SHA for baselining when a class has corresponding source in OSGI-OPT/src. This ignores differences in compilers
  • ${tstamp} is now consistent for a project build
  • target attribute is removed in bindex from a DS component
  • Launcher changes to support multiple remote launchers
  • Better support for error locations on errors
  • Drop generale JAR urls on JPM repo will analyze the JAR and cerate an entry (though it will of course not be on JPM itself)
  • -runpath.* adds any provided capabilities to the frameworks (as it already did for packages)
  • Performance improvements
  • SearchableRepo now provides the browse URL
  • RepoIndex now supports DS > 1.2
  • Allowing embedded activators to start before the bundles are started (they normally started after all bundles were started)
  • Dropping URLs to JPM from Linux failed due to mucky URLs (newlines!!)
  • No longer a warning when you import from yourself and there is no export metadata (we’re building it!)
  • Additional conversions in converter; Dictionary, URI/L cleanup
  • Force the current working directory to be the project base during launching
  • Version mismatch between pacakge(-)info(.java) and manifest are now not taking qualifier into account
  • Missing bundles on -runbundles are now errors
  • ${isdir} and ${env} now return empty (false) if no value
  • Additional checks for non-existent imports or empty imports
  • -runkeep does now work
  • ${versionmask} macro to use when {version} is used for other purposes
  • Added annotation attributes by treating manifest annotations as meta annotations
  • Versionless import when having split packages where earlier packages have no content
  • -runproperties is now a merged header
  • Added JSONCodec hook
  • Gradle plugin supports non-bnd builds better
  • OSGi Enterprise DS & Metatype annotations
  • -pom now accepts artifactid, groupid, where, and version properties. General better support for generating POMs
  • Added a {stem;} macro that returns the stem (before the extension) of a file name
  • Added a ${thisfile} macro that returns the name of the properties file of the current processor if it exists.

Backwards compatibility

  • Bnd plugins now get a TypeRef for .class arguments in annotations. This might break annotation processing related plugins.
  • -nobundles now consistently takes a expression. Being unset and the values empty string, false, not, off are evaluated as false; otherwise the expression is evaluated as true. You can start with ! to invert the following expression.
  • Bnd now uses the OSGi specified osgi.extender name of osgi.component for Declarative Services. Previously, bnd used the placeholder name osgi.ds. So if you encounter resolution exceptions for osgi.extender=osgi.component, you will need to regenerate your repository indexes since they likely include capabilities for the temporary osgi.ds name rather than the specified osgi.component name.
  • The Bnd annotations will be deprecated in a future release of Bnd. Please make plans to migrate to the OSGi Release 6 specified annotations which now offer more features than the bnd annotations.
  • The -dsannotations instruction was changed to default to *. So this means Bnd will process OSGi DS annotations by default. To disable OSGi DS annotation processing, set to an empty value:
    -dsannotations:
  • If you compile DS components using the R6/DS 1.3 component annotations you must use Bnd 3 to generate component xml descriptors. Use of earlier Bnd versions will result in faulty configuration-pid values.

Known Issues

  • The new feature of the bnd-maven-plugin to support POM properties in bnd files was broken just before release.
  • On OS X Yosemite, an Eclipse bug causes visibility issues on some dialogs. Eclipse 4.4.2 or later fixes this.