-
-
Notifications
You must be signed in to change notification settings - Fork 304
Changes in 4.3.0
BJ Hargrave edited this page Dec 18, 2019
·
30 revisions
- All projects are now dual licensed under Apache-2.0 OR EPL-2.0.
- 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
retriesmethod onHttpRequest. 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 theretryDelaymethod onHttpRequest. - 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 abeans.xmlfrom having to duplicate the mode of choice. -
NEW Java SPI Annotations
@ServiceProviderand@ServiceConsumerto help developers to generate requirements and capabilities for the Service Loader Mediator Specification.- The
@ServiceProviderannotation also results in generation of service descriptor files (a.k.a.META-INF/services).
- The
- 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 theMavenVersion.parseMavenString(String)method ornew MavenVersion(String)instead. TheparseStringmethod is probably not what you want since it parses OSGi version strings into aMavenVersionobject. The Bnd code base has been corrected to avoid theparseStringmethod. -
NEW Bnd can produce JPMS libraries driven by Bundle Annotations using the
-jpms-module-infoinstruction. - 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:
-runpath,-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 theBaselineIgnoreannotation and is baselined against a package whose version is less then the version specified in theBaselineIgnoreannotation, 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 orjava.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
usesdirectives onosgi.servicecapabilities generated for DS components. - Added
-noclassfornameinstruction which can be used to tell Bnd not to look forClass.forName("some.Class")instruction sequences in method bodies.
- Updated resolve command to have a few more options
- Added a bnd resolve dot command to output a graphviz dot file.
- The
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
exportreport readmesubcommand.
- Updated documentation for Launchpad, Launcher, and startlevels
- Added a page about resolving
- Added a page about generating documentation
-
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-runeeand-runrequiresfrom the maven project.-
-runee, if omitted, will be inferred from thetargetconfiguration ofmaven-compiler-plugin -
-runrequires, if omitted, will be inferred from the project'sartifactId(asosgi.identity;filter:='(osgi.identity=<artifactId>)'if a) the project packaging isjarorwarand b) the project has thebnd-maven-plugin
-
- The Bnd Maven plugins are now marked thread safe and can be used with
-T. -
NEW
bnd-reporter-maven-pluginis a new bnd based maven plugin that generates and exports reports of projects.
- 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. - The
ExportandResolvetask types now extend theBndruntask type and thus inherit new properties:ignoreFailuresandworkingDir. - The
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 typecharorchar[]having 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 newbiz.aQute.bnd.embedded-repoartifact.
-
Embedded-Activatorsupport in the Launcher is broken. See https://github.com/bndtools/bnd/issues/3481. This meansbiz.aQute.junitcannot be used as the-testervalue for OSGi JUnit test sincebiz.aQute.junitrelies on the Launcher to invokebiz.aQute.junit'sEmbedded-Activatorto start executing the tests. - While using the
bnd-resolver-maven-pluginto resolve more than onebndrunfile the resolution may fail. See https://github.com/bndtools/bnd/issues/3465. The workaround is to separate resolution of individualbndrunfiles into distinct executions of thebnd-resolver-maven-plugin. -
-runframework: nonesupport in the Launcher is broken. See https://github.com/bndtools/bnd/issues/3489. This support is not commonly used. It was added to support certain OSGi compliance test cases where the test case would be launching OSGi frameworks. There is no workaround. -
#3647: When using BundleTaskCovention with the Bnd Gradle plugin for non-Bnd workspace builds, either
project.versionmust be set or thearchiveVersionproperties of the JarTask must be set.