Changes in 4.1.0

BJ Hargrave edited this page Oct 18, 2018 · 13 revisions

Bnd 4.1.0

For Bndtools 4.1.0 changes, see https://github.com/bndtools/bndtools/wiki/Changes-in-4.1.0.

Bnd

  • Macros ${removeall;list;list} and ${retainall;list;list} are updated to work with empty args.

  • Adds support for Bearer (OAuth2) authentication. If the <server> configuration has only a password and no username, then Bearer authentication is in effect with the password used as the token.

    -connection-settings: server;id="https://*.server.com";password="oauth2token"

    will cause

    Authorization: Bearer oauth2token

    request header to be sent to servers matching the glob https://*.server.com.

    See https://github.github.com/maven-plugins/site-plugin/authentication.html for an example of a <server> configuration for OAuth2.

  • Baselining will no longer report version mismatches when either side of the baselining has a major version of 0. See https://semver.org/#spec-item-4.

  • The pattern support for globbing things like package names has been updated to support some regular expression features. This should be backwards compatible for most normal usages.

  • The new DS 1.4 annotations support is now implemented.

  • The type inferencing for DS annotations support has been completely rewritten using a new Java generic signature parsing API.

  • Internal plugin class loader in bnd now closes any open files within 5-10 seconds on Windows.

  • On Windows, you can override the default Java home directory with the HOME env variable. This one is now * supposed to expand macros recursively

  • CDI R7 annotation support in bnd

  • OSGiRepository handles refreshing correctly now

  • Accept Groovy test case method names with spaces.

  • Contracts are now default on for all packages

  • Added server certificate verification to the built in Http Client. That is, you can now set <verify>true</verify> and <trust>relative-path-to-cert</trust>.

  • Being able to set the -compression level to deflate or store, see https://bnd.bndtools.org/instructions/compression.html

  • Options for an -executable instructions that can remove resources from the dependency JARs that are packaged in the über JAR. It is also possible to change their compression level. See https://bnd.bndtools.org/instructions/executable.html

  • Support for Java 10 & 11

  • Maven Bnd Repository can now support resources that contain aggregate artifacts like ZIP files that contain bundles. See https://bnd.bndtools.org/plugins/maven.html

  • Bnd plugins can now also access any package exported by the framework when bnd runs on an OSGi Framework.

  • Added an -includepackage instruction that includes a package from the -buildpath but does not generate any headers from it. Might be required when you need to override @Export annotations.

  • An OSGi sub system exporter

  • Returned Fixed Indexed Repository as a sub class of OSGiRepository to not break builds. In this light also a more relaxed interpretation of Service-Component header

  • Using Felix resolver 2.0

  • Support of Photon test folders

  • Launcher now uses reference: urls when possible, significantly minimizing memory consumption.

  • Protection against zip-slip attack

  • @ProviderType can now be added to the package to apply to all classes

  • Added support for the PDE target platform in the P2Repository

  • Update of the Maven Bnd Repository that allows redeploy and more options on the put

Bnd Command Line

  • Additional possibilities for the bnd command line
    • xref : provides cross reference information over a very large set of bundles
    • repo : copy, sync, index commands
    • com : see the communication settings and test them. Also see https://bnd.bndtools.org/instructions/connection-settings.html
    • shell: opens a shell against the current workspace (the default workspace if not inside an existing workspace)
    • graph: roots command
  • bnd command line can now have a -d option to set default logging level to debug

Documentation

Bnd Maven Plugins

  • The Bnd maven plugins now support Maven property references using array subscripts such as

    Bundle-License: ${project.licenses\\[0\\].name}

  • bnd-baseline-maven-plugin now ignores projects with pom packaging type.

  • bnd-maven-plugin:

    • seamlessly supports WARs (enabled with packaging type war)
      • transparently handles Bundle-ClassPath following maven-war-plugin heuristics for included lib jars
    • now explicitly supports only jar and war packaging
    • optionally includeClassesDir (a.k.a. ${project.build.outputDirectory})

Bnd Gradle Plugins

  • Tasks of type TestOSGi no longer add themselves as a dependency of the check task. This is to allow for multiple such tasks which should not be executed for the check task.
  • A new task type Bndrun is added which can be used to run bndrun files.

Backward compatibility

  • Tasks of type TestOSGi no longer add themselves as a dependency of the check task. This is to allow for multiple such tasks which should not be executed for the check task. So if you need your tasks of type TestOSGi to be dependencies of check, you must modify the check task to add them as dependencies.
  • The pattern support for globbing things like package names has been updated to support some regular expression features. This should be backwards compatible for most normal usages but some characters may now require escaping. For example [ and ] will need to be escaped as \\[ and \\] since the [ and ] characters are now used for regular expression character classes.
  • The type inferencing for DS annotations support has been completely rewritten using a new Java generic signature parsing API. So it is possible that some corner cases may no longer be supported.

Known Issues

  • The fix to verify the server certificate can generate an error if the trusted certificate is not found or invalid. This was not reported before. See the bnd com command how to diagnose communication issues.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.