Skip to content
BJ Hargrave edited this page Jul 13, 2020 · 2 revisions

Bnd/Bndtools 5.1.2

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

Fixes since 5.1.0

  • #4224: java: Update classfile support for Java 15.
  • #4204: MavenBndRepository does not handle multiple snapshot URLs properly.
  • #4191: bndrun graphical editor cannot resolve when using Maven implicit repository.
  • #4175: [junit-platform] Container failures don't cause test failure.
  • #4137: bnd-resolver-maven-plugin fails to resolve with Java 15 project.
  • #4139: ee: update package/module list for upcoming java versions.
  • #4144: model: Update EE properties based upon introspection of the runtime.
  • #4145: mainclass: Version attributes must be of type Version.

Bndtools

  • Bndtools is built to run on Eclipse 2018-12 or later. So Bndtools 5.0 may not run on older versions of Eclipse.
  • A quick fix to add a dependency to -buildpath or -testpath based on the class name.
  • Find function in the JAR Editor
  • Paste is now working in the Bndtools explorer
  • Debug sources now include all -runee, -runfw, -runpath and -runbundles when launching in debug mode (see compatibility notes)
  • Fixed some baseline reporting errors
  • Better visualizations of the repositories. Standardized icons & better error reporting.
  • -generate support. Plugins can be local projects
  • Bnd Pom Repositories got a menu action to copy the GAVs to make it easy to migrate to the Maven Bnd Repository
  • Removed Build path page from New Project wizard to prevent confusion
  • Bnd Editor now can handle files outside the Eclipse workspace
  • Rewritten & much improved JAR Editor
  • Bndtools explorer now supports pseudo targets to filter on. You can filter on ':error' and ':warning' (':e',':w') in the filter box. You can of course combine those with other searches like :e|test to see all error projects + test projects.
  • Add new Parameterized Eclipse commands for use in the Quick Access dialog. You can type the name of a project or the name of a bndrun file to execute those commands.

Bndtools m2e

  • Bndtools m2e is built to run on Eclipse m2e 1.10.0 (m2e version used in Eclipse 2018-12) or later. So Bndtools m2e 5.0 may not run on older versions of Eclipse or Eclipse m2e.
  • Maven Dependencies repository appears in the Bndtools Repository view populated with all dependencies referenced from maven projects in the Eclipse workspace (if such exist).
  • Maven Workspace repository appears in the Bndtools Repository view populated with all artifacts produced by bnd-maven-plugin executions from maven projects in the Eclipse workspace (if such exist).

Bnd

  • P2Repository now supports the 'packed' format (pack200) when using a JDK which includes the unpack200 command. Bnd uses the unpack200 command to support the pack200 format.

  • Bnd made significant improvements to Bundle indexing and requirement/capability matching:

    • Bnd now includes bundle-symbolic-name and bundle-version attributes on package capabilities to allow these attributes to be interrogated by the filter expressions of package requirements.
    • Bnd now includes all attributes on a wiring namespace capability (e.g. Export-Package) to allow these attributes to be interrogated by the filter expressions of requirements. See Attribute Matching.
    • Bnd now includes all attributes on a wiring namespace requirement (e.g. Import-Package) in the filter expression to allow these attributes to be matched to capabilities. See Attribute Matching.
    • Bnd now handles the mandatory directive on a wiring namespace capability (e.g. Export-Package) when matching requirements to capabilities. See Mandatory Attributes.
  • Java 15 is now supported.

  • bnd.hashes attribute on packages for quick lookup of class name

  • bnd.mainclass capability when a Manifest contains a Main-Class header

  • Projects now can build a Resource for each build bundle

  • Faster filters by caching converted filter value

  • -noparallel instruction to mark a project's Gradle tasks to not build in parallel when using Gradle's --parallel option.

  • Fixed bug in automatic sources from Maven resources in the Maven Bnd Repository

  • Improved error handling & reporting of the Maven Bnd Repository, OSGi Repository, and Bnd Pom Repository

  • Added a template processor JavaGen that can leverage the -generate instruction, using the build properties as its domain.

  • A new -generate instruction that can generate source code before the compiler runs in the build. See generate

  • Cleanup of workspace repositories, removed the .index file.

  • Handling of mandatory attributes in resolve

  • -define-contract instruction.

  • A findproviders macro that provides access to the workspace repositories

  • Changed the filenames in the executable JARs from the default launcher to not contain versions. See -executable

  • OSGi Connect runs OGSi apps without a classloader per bundle. The default launcher supports an OSGi Connect ModuleConnector with the Java Service Loader. Just adding a ModuleConnector service loader service in -runfw will make the launcher initialize the framework with it.

  • A new -runframeworkrestart command. If set to true, the launcher will restart the framework after it has been stopped. The launch.framework.restart.count is a system property with the # of the framework invocation, starting with zero.

  • Corrupt JAR files are now reported, they were reported as [Not a bundle]. They are now deleted and reported as corrupt. The deletion should automatically enforce a reload after refresh.

  • When the MavenBndRepository configuration setting noupdateOnRelease is not set to true, MavenBndRepository will now update the index file when releasing SNAPSHOT artifacts.

  • Performance improvement for building projects whose bnd files use ${system} macros. For the duration of a project build, Bnd now caches results from ${system} macro evaluations to avoid repeated evaluations.

  • MavenBndRepository has been enhanced to better make sources jars during release. If the releasing bundle does not contain an OSGI-OPT/src folder (as made by -sources: true) and the -maven-release instruction does not specify sources;path= for some path containing sources, MavenBndRepository will attempt to find a java source file for each class in the bundle using the project's -sourcepath value. You can supply an alternate source path for finding java source files by specifying a -sourcepath attribute on the -maven-release instruction's sources clause. For example:

      -maven-release: sources;-sourcepath="${project.allsourcepath}"
    
  • Improved dependencies section in generated pom.xml by passing GAV information from the repositories through to the pom generator.

  • New aQute.lib.memoize package with support for memoizing Suppliers in several fashions.

Bnd Command Line

  • Support for the generate function in the _par command and added a specific generate command.
  • mbr command to maintain .mvn files
  • Many reporting improvements
  • Improvements to bnd nexus sign command.
    • The --key option allows the user to sign with a key other than the gpg default key.
    • A --settings option to the nexus command to specify the -connections-settings property to allow the user to specify connection settings other than the default.
    • A --from uri that will get the archives from another repository
    • --xclude && --include to filter the archives when fetching

Documentation annotations are also added so that the bnd help command can provide helpful output.

Documentation

  • Minor improvements and doc pages for new features.

Bnd Maven Plugins

  • Improved handling/discovery of attached artifacts.

Bnd Gradle Plugins

  • The Bnd Gradle plugins now require a minimum of Gradle 5.1 for Java 8 to Java 12 and Gradle 6.0 for Java 13.

Backward compatibility

  • Bndtools is built to run on Eclipse 2018-12 or later. So Bndtools 5.0 may not run on older versions of Eclipse.
  • The Bnd Gradle plugins no longer work on versions of Gradle less than 5.1.
  • The -runvm instruction takes a comma-separated list of arguments to pass to the VM launch. Due to poor processing of this instruction, Bndtools previously accepted space-separated arguments when launching in Eclipse. Improvements to the processing of the -runvm instruction to better handle arguments with embedded spaces and double quote characters means that a space-separated -runvm value will be treated as a single argument rather than multiple arguments. Please ensure the -runvm (and -runprogramargs) instructions are specified with comma-separated arguments. Use of space-separated argument on -runvm can lead to failure to launch the VM. See https://github.com/bndtools/bnd/issues/3869.
  • Bnd made significant improvements to Bundle indexing and capability to requirements matching. This includes adding attributes to capabilities and to requirement filter expressions. It also includes support for mandatory attributes. So using Bnd to resolve bundles built in the workspace against indexes generated by older versions of Bnd, or other index generators, may result in resolution failures. The older indexes may not include the necessary attributes on capabilities to match newly generated filter expressions. The filter expressions in older indexes may not include mandatory attributes and so may not match capabilities which have a mandatory directive. You may need to regenerate older indexes with the latest Bnd.
  • The enhanced debug source handling updates the set of sources provided by the Bnd Dependencies source container, but it does not affect any other sources that may configured in the sources tab of your debug launch configuration. These include the Default source container (which Bndtools added by default to every launch configuration prior to 5.1) and any other sources that you may have added manually (probably to try and fill the gaps that the old Bnd Dependencies container was leaving). The new Bnd Dependencies source container generation is much more complete and should already have everything in it that you need. As such, it is most likely that these other source lookup containers are at best superfluous, but they may also slow down your source lookup or cause the debugger to look up the wrong source. Hence it is recommended to remove them from your existing debug configurations. Newly-created debug configurations will have only the Bnd Dependencies container by default.

Known Issues

Clone this wiki locally