Skip to content
BJ Hargrave edited this page Jun 7, 2022 · 2 revisions

Bnd/Bndtools 6.3.1

  • This is a maintenance fix for Bnd/Bndtools 6.3.0.

Fixes since 6.3.0

  • #5275: ClassCastException in Gradle build after upgrade to 6.3.0.

See the Release section of the README for where to find Bnd/Bndtools.

Bndtools

  • Bndtools "Bnd Bundle Path" class path container now supports negation in the packages attribute of -buildpath and -testpath clauses. Negated packages are marked NON_ACCESSIBLE | IGNORE_IF_BETTER in Eclipse.
  • Bndtools "Bnd Bundle Path" class path container can be configured, when using version=latest or version=snapshot, to hide the referenced project's folders and just use the referenced project's generated bundle. The classes in a bundle may be transformed and can be different than the classes in a project's folders. This can be configured using the source attribute of -buildpath and -testpath clauses. Setting source to a value other than project will not include the referenced project's folders. This is done by marking the referenced project as DISCOURAGED | IGNORE_IF_BETTER. Note that this can cause Eclipse's "Open Type Hierarchy" result to be incomplete due to flaws in how the Eclipse hierarchy search code handles hidden types. See #5250.
  • Bndtools "Bnd Bundle Path" class path container is updated, when using version=latest or version=snapshot, to no longer include the referenced project's folders in the runtime classpath. This changed provide better fidelity since a bundle may contain more or less classes/resources than the project's folders.
  • When hovering over a macro name in a bnd editor, the hover view will show the decorated value of the macro.

Bndtools m2e

  • Fixes to package decoration when using the new packaging goals of bnd-maven-plugin.

Bnd

  • Bnd adds decoration support for the following instructions:
    • -conditionalpackage
    • -privatepackage
    • -includepackage
    • -includeresource
  • The -privatepackage instruction is now also a merged instruction.
  • A decoration ending in ++ will include all unused literals in the decorated result whereas a decoration ending in + will not include unused literals in the result.
  • Unused literal inclusion in decoration now allows the decoration to add additional entries to the beginning or the end of the decorated item.
  • Instruction decoration now supports removal of attributes and non-overwriting of attributes. Prefixing the attribute name with ! means removal. Prefixing the attribute name with ~ means do not overwrite an existing attribute value.
  • Fixes to support the Eclipse Transformer project's Bnd Analyzer and Verifier plugins. The re-analyze code path was fixed to properly reset the analyzer and analyze the content again.
  • The external plugin handler was enhanced to support external plugins implementing the Plugin and RegistryPlugin interfaces.
  • The AnalyzerPlugins and VerifierPlugins now have an invocation ordering which can be influenced by the plugin implementation.
  • For Java 1.1, the ee name is changed to JRE.
  • Added ServiceCapability annotation as convenient way to create osgi.service capabilities.
  • Callable registered with main.thread property will not stop the Launcher if the return code is 198.
  • Fixed some bugs that caused Bnd to fail at some points on versions with leading spaces.
  • Fixed bugs in signing jar files:
    • Bnd now tries to execute the jarsigner tool from the JAVA_HOME environment variable or java.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 the jarsigner tool. The Bnd property jarsigner can be set to specify the path to the jarsigner tool if desired.
    • The use of Elliptic Curve (EC) signing keys is now properly supported.
    • The signing files in META-INF are now written to the jar immediately after the manifest as this is required for JarInputStream to be able to properly verify the signature.

Bnd Command Line

  • None.

Documentation

  • The styling of the documentation has added a search bar and indication of when macros and instructions are in effect.

Bnd Maven Plugins

  • bnd-baseline-maven-plugin now has a reportFile configuration which names the file to contain the baseline report. The report format is expanded with more detail.

Bnd Gradle Plugins

  • BundleTaskExtension is updated to make the generated manifest available from the task’s manifest.effectiveManifest property.
  • Updated the group property values for tasks to better match standard gradle task groups.

Backward compatibility

  • Bndtools is built to run on Eclipse 2020-06 (4.16) or later. So Bndtools may not run on older versions of Eclipse.
  • Bndtools m2e is built to run on Eclipse m2e 1.16.0 or later. So Bndtools m2e may not run on older versions of Eclipse m2e.
  • The Bnd Maven plugins require a minimum of Maven 3.3.9.
  • The Bnd Gradle plugins require a minimum of Gradle 6.7 for Java 8 to Java 15, Gradle 7.0 for Java 16, and Gradle 7.3 for Java 17.
  • The Bnd Gradle plugins and tasks underwent a large update in 6.0 to modernize their implementations and prepare for Gradle 7 and newer Gradle idioms. All Bnd Gradle task properties are now Gradle Properties and should generally be set using an assignment in your build script. A number of previously deprecated task properties have been removed. The conventions are now deprecated and replaced by extensions.

Known Issues

  • Eclipse m2e has a bug which can result in build looping. If you experience this, update Eclipse m2e to 1.18.2 or later which seems to have fixed the issue.

  • Windows 10 users: Windows 10 Defender significantly slows down Eclipse, reason being Windows 10 Defender scanning the JAR files. The problem has been reported to Microsoft here. Until then, a workaround to this problem is to add Eclipse root directory to Windows 10 Defender’s exclusion list, detailed steps are shared here.

    Note: This is not just an Eclipse issue on Windows 10.

    See also Bnd Tips for Windows users.

Clone this wiki locally