Changes in 4.3.1
- This is a maintenance fix for Bnd/Bndtools 4.3.0.
- All projects are now dual licensed under Apache-2.0 OR EPL-2.0.
Fixes since 4.3.0
- #3415: Eclipse maven workspace is too slow with bnd plugin.
- #3458: Bndtools does not show bundles in dependencyManagement.
#3465: While using the
bnd-resolver-maven-pluginto resolve more than one
bndrunfile the resolution may fail.
Embedded-Activatorsupport in the Launcher is broken.
-runframework: nonesupport in the Launcher is broken.
- Updated support for ordering the runbundles, see startlevels
- Now avoids doing a full maven build when only the indexes need to be updated.
- HttpClient has been significantly updated to support retrying failed connections including connection timeouts, read timeouts, hung connections, 5xx response codes, read-into-cache failures, and other exceptions in establishing the connection. The default retry count is 3; the retry count can be set via the
HttpRequest. HttpClient will delay between retry attempts. The default delay for the first retry is 1 second with the delay doubling for each subsequent retry up to a maximum of 10 minutes; the retry delay, in seconds, can be set via the
- The MavenBndRepository got a bit of an overhaul:
- The index file can now use Workspace macros and properties. This allows values set in the workspace to be used in the index files and evaluated before processing by MavenBndRepository. Macros are applied per line so they only work for one GAV, you cannot specify a list of GAVs in a macro.
- A new configuration property
sourcecan contain space/newline separated GAVs that are always added to the set. This allows you to specify the GAVs in the bnd file, reducing clutter and allowing the use of list macros
- When used in Bndtools, bnd will now automatically try to attach the source of an OSGi bundle.
- Adding and removing of bundles via the menu or drag and drop will now not destroy the format of the maven file. It will try to keep the file in the same format including comments. The features have been documented.
- Launchpad is a new comprehensive testing framework integrated with the Workspace model of Bndtools. It has been documented.
- P2Repository has been updated to support checking MD5 checksum on downloads and retrying if the MD5 does not match. Two retries will be made for failed MD5 checksums.
- OSGiRepository has been updated to support checking SHA256 checksum on downloads and retrying if the SHA256 does not match. Two retries will be made for failed SHA256 checksums.
- CDI Annotation processing can detect the appropriate discovery mode from a
beans.xmlfile in the bundle when the discovery mode is not already selected in the
-cdiannotationsinstruction. This helps existing projects having a
beans.xmlfrom having to duplicate the mode of choice.
NEW Java SPI Annotations
@ServiceConsumerto help developers to generate requirements and capabilities for the Service Loader Mediator Specification.
@ServiceProviderannotation also results in generation of service descriptor files (a.k.a.
- Maven Version support has been improved to offer better fidelity to the latest maven version "rules". Any code using Bnd's
MavenVersion.parseString(String)method should change to use the
new MavenVersion(String)instead. The
parseStringmethod is probably not what you want since it parses OSGi version strings into a
MavenVersionobject. The Bnd code base has been corrected to avoid the
NEW Bnd can produce JPMS libraries driven by Bundle Annotations using the
- OSGiRepository no longer deletes the cache at start up.
- Launcher is moved to require OSGi Release 6.
- Launchpad got a JUnit Runner mode.
- Start levels added to -runbundles.
- Resolver can calculate startlevels based on dependencies.
- Decoration facility to add attributes to path instructions:
-runbundles, etc. Create a header that ends with + and the same name. This is interpreted as a selector, any matching keys will get any of the attributes on the selector. Using the ! will remove the entry.
- Baselining has been updated to support the
BaselineIgnoreannotation. When an element (type or member) is annotated with the
BaselineIgnoreannotation and is baselined against a package whose version is less then the version specified in the
BaselineIgnoreannotation, the element is ignored for baselining mismatch purposes and will not result in a baselining failure.
- A number of performance enhancements were added which enables Bnd to parse manifest and bnd file information much more quickly. This is especially noticeable on large items such as distros with many bundles.
- Bnd now tries to execute java commands from the
JAVA_HOMEenvironment variable or
java.homesystem property rather than the path of the shell. This means Bnd will generally use the same java installation used to run Bnd to locate and execute java commands.
- Bnd will generate
osgi.servicecapabilities generated for DS components.
-noclassfornameinstruction which can be used to tell Bnd not to look for
Class.forName("some.Class")instruction sequences in method bodies.
Bnd Command Line
- Updated resolve command to have a few more options
- Added a bnd resolve dot command to output a graphviz dot file.
runcommand will now actively react to changes on the bndrun file as well as runbundles and update the running instance. This enables the live coding model.
NEW Bnd can generate README files with the new
- Updated documentation for Launchpad, Launcher, and startlevels
- Added a page about resolving
- Added a page about generating documentation
Bnd Maven Plugins
bnd-run-maven-pluginwill now actively react to changes on the bndrun file as well as runbundles and update the running instance. This enables the live coding model.
NEW Bnd maven plugins operating with
bndrunfiles can infer
-runrequiresfrom the maven project.
-runee, if omitted, will be inferred from the
-runrequires, if omitted, will be inferred from the project's
osgi.identity;filter:='(osgi.identity=<artifactId>)'if a) the project packaging is
warand b) the project has the
- The Bnd Maven plugins are now marked thread safe and can be used with
bnd-reporter-maven-pluginis a new bnd based maven plugin that generates and exports reports of projects.
Bnd Gradle Plugins
- The Bnd Gradle plugins now sets the time of the bundle jars to the current time when the jars are written out. See https://github.com/bndtools/bnd/issues/3118.
- The Bnd Gradle plugins now support
--paralleloperation in Gradle.
Resolvetask types now extend the
Bndruntask type and thus inherit new properties:
Bndruntask type will now actively react to changes on the bndrun file as well as runbundles and update the running instance. This enables the live coding model.
- Bndtools is built to run on Eclipse Oxygen or later. So Bndtools 4.3 may not run on older versions of Eclipse.
- Launchpad, which previewed in Bnd 4.2, has had API changes which may not be backwards compatible.
- When processing annotation types annotated with
ObjectClassDefinition, for elements of type
charhaving a default value, Bnd 4.3 will emit the default value in the generated metatype XML resource as a single character string. Previously, the default value was emitted as a string of the unicode value of the character. This updated behavior brings Bnd inline with the expectations of the OSGi Metatype Specification reference implementation.
- The Bnd Maven and Gradle plugins no longer include a copy of the embedded-repo.jar resource and instead now have a dependency on the new
biz.aQute.bnd.embedded-repoartifact which contains the embedded-repo.jar resource. See https://github.com/bndtools/bnd/commit/18411917632f96c5b9aadc5229be09b965762c3c. For most users of the Bnd Maven and Gradle plugins, Maven and Gradle will properly handle this new dependency and this will work correctly. But if you are directly managing the dependencies, then you will need to include the new