-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
retries
method 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 theretryDelay
method 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
source
can 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.xml
file in the bundle when the discovery mode is not already selected in the-cdiannotations
instruction. This helps existing projects having abeans.xml
from having to duplicate the mode of choice. -
NEW Java SPI Annotations
@ServiceProvider
and@ServiceConsumer
to help developers to generate requirements and capabilities for the Service Loader Mediator Specification.- The
@ServiceProvider
annotation 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. TheparseString
method is probably not what you want since it parses OSGi version strings into aMavenVersion
object. The Bnd code base has been corrected to avoid theparseString
method. -
NEW Bnd can produce JPMS libraries driven by Bundle Annotations using the
-jpms-module-info
instruction. - 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
BaselineIgnore
annotation. When an element (type or member) is annotated with theBaselineIgnore
annotation and is baselined against a package whose version is less then the version specified in theBaselineIgnore
annotation, 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_HOME
environment variable orjava.home
system 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
uses
directives onosgi.service
capabilities generated for DS components. - Added
-noclassforname
instruction 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
run
command 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 readme
subcommand.
- Updated documentation for Launchpad, Launcher, and startlevels
- Added a page about resolving
- Added a page about generating documentation
-
bnd-run-maven-plugin
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 maven plugins operating with
bndrun
files can infer-runee
and-runrequires
from the maven project.-
-runee
, if omitted, will be inferred from thetarget
configuration ofmaven-compiler-plugin
-
-runrequires
, if omitted, will be inferred from the project'sartifactId
(asosgi.identity;filter:='(osgi.identity=<artifactId>)'
if a) the project packaging isjar
orwar
and 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-plugin
is 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
--parallel
operation in Gradle. - The
Export
andResolve
task types now extend theBndrun
task type and thus inherit new properties:ignoreFailures
andworkingDir
. - The
Bndrun
task 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 typechar
orchar[]
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-repo
artifact 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-repo
artifact.
-
Embedded-Activator
support in the Launcher is broken. See https://github.com/bndtools/bnd/issues/3481. This meansbiz.aQute.junit
cannot be used as the-tester
value for OSGi JUnit test sincebiz.aQute.junit
relies on the Launcher to invokebiz.aQute.junit
'sEmbedded-Activator
to start executing the tests. - While using the
bnd-resolver-maven-plugin
to resolve more than onebndrun
file the resolution may fail. See https://github.com/bndtools/bnd/issues/3465. The workaround is to separate resolution of individualbndrun
files into distinct executions of thebnd-resolver-maven-plugin
. -
-runframework: none
support 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.version
must be set or thearchiveVersion
properties of the JarTask must be set.