# TIPS

**URL:** https://bnd.discourse.group/c/tips/10.md

[Latest](https://bnd.discourse.group/latest.md) · [Categories](https://bnd.discourse.group/categories.md)

---

## [About the TIPS category](https://bnd.discourse.group/t/about-the-tips-category/16)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 0

</div>

Tips for using Bnd/Bndtools. This can describe features of Bnd/Bndtools and how to use them.

---

## [\[Performance\] Faster incremental builds in Bndtools Eclipse Plugin](https://bnd.discourse.group/t/performance-faster-incremental-builds-in-bndtools-eclipse-plugin/568)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [August 31, 2026, 6:17pm UTC](https://bnd.discourse.group/t/performance-faster-incremental-builds-in-bndtools-eclipse-plugin/568 "2026-08-31T18:17:24Z")

</div>

In the current bndtools SNAPSHOT there is an experimental feature which can save you lots of time when you save a java file. The new Rebuild Trigger policy setting helps prevent unnecessary cascade rebuilds in Eclipse. …

---

## [Visualize package dependencies with mermaid and 'bnd xref'](https://bnd.discourse.group/t/visualize-package-dependencies-with-mermaid-and-bnd-xref/371)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 5\
**Last updated:** [July 12, 2026, 10:15am UTC](https://bnd.discourse.group/t/visualize-package-dependencies-with-mermaid-and-bnd-xref/371 "2026-07-12T10:15:45Z")

</div>

Run the bnd xref command in your comand line (e.g. install via brew on MacOS): bnd xref \*/generated/\*.jar | sed -r 's/ \< / --\> /g' The sed replaces the \< in the output with --\>. The direction might not be correct, bu…

---

## [Automate META-INF/services chores](https://bnd.discourse.group/t/automate-meta-inf-services-chores/397)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 7\
**Last updated:** [January 21, 2026, 8:46pm UTC](https://bnd.discourse.group/t/automate-meta-inf-services-chores/397 "2026-01-21T20:46:58Z")

</div>

The Java Service Loader mechanisms has become quite important when JPMS started to enforce the module boundaries. It provides the crucial abstraction between the service you can use and the actual implementation class. H…

---

## [Printing MANIFESTs of all .jar files in a folder](https://bnd.discourse.group/t/printing-manifests-of-all-jar-files-in-a-folder/543)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [December 13, 2025, 11:20pm UTC](https://bnd.discourse.group/t/printing-manifests-of-all-jar-files-in-a-folder/543 "2025-12-13T23:20:42Z")

</div>

Use case I recenlty OSGified an open source library using bnd-maven-plugin to add OSGi meta data. It was a multi-module maven project resulting in one .jar file per module. I wanted to quickly view all MANIFEST.MF files …

---

## [Bnd Cheatsheet available](https://bnd.discourse.group/t/bnd-cheatsheet-available/540)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [November 23, 2025, 5:20pm UTC](https://bnd.discourse.group/t/bnd-cheatsheet-available/540 "2025-11-23T17:20:22Z")

</div>

A by-product of recent improvements of the bnd Macros docs is the Bnd Cheatsheet: workspace-templates/cheatsheet/org.bndtools.cheatsheet/bnd.bnd at master · bndtools/workspace-templates · GitHub This file demonstrates…

---

## [Confusing behaviour as Bnd runs tests against empty bundles](https://bnd.discourse.group/t/confusing-behaviour-as-bnd-runs-tests-against-empty-bundles/538)

<div class="topic-metadata">

**Author:** [@ejjcase](https://bnd.discourse.group/u/ejjcase)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 10:01pm UTC](https://bnd.discourse.group/t/confusing-behaviour-as-bnd-runs-tests-against-empty-bundles/538 "2025-10-28T22:01:55Z")

</div>

I suspect this is less a bug in Bnd than a bug in my understanding of Bnd, but I couldn’t find it documented anywhere. Now that I understand it better, I thought I’d write it down. I’ve been trying to set up a Bnd works…

---

## [\[Performance\] Improve build performance by narrowing annotation scanning to specific packages](https://bnd.discourse.group/t/performance-improve-build-performance-by-narrowing-annotation-scanning-to-specific-packages/535)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [August 6, 2025, 7:41pm UTC](https://bnd.discourse.group/t/performance-improve-build-performance-by-narrowing-annotation-scanning-to-specific-packages/535 "2025-08-06T19:41:52Z")

</div>

This post can be seen as a continuation of Improve build speed in bndtools by using -compression: STORE (maybe I consider combining them in the future in a Performance tuning post) TL;DR The following describes how you …

---

## [Improvements about Bnd Manual / Documentation](https://bnd.discourse.group/t/improvements-about-bnd-manual-documentation/530)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 1\
**Last updated:** [July 16, 2025, 4:16am UTC](https://bnd.discourse.group/t/improvements-about-bnd-manual-documentation/530 "2025-07-16T04:16:01Z")

</div>

The bnd manual did grow and improve recently, because it is now partly generated from the bnd Java Source Code, specifically the pages for Headers, Instructions and Commands on those overviews: Headers | bnd Instructio…

---

## [\[Performance\] Improve build speed in bndtools by using -compression: STORE](https://bnd.discourse.group/t/performance-improve-build-speed-in-bndtools-by-using-compression-store/502)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 2\
**Last updated:** [May 4, 2025, 8:56am UTC](https://bnd.discourse.group/t/performance-improve-build-speed-in-bndtools-by-using-compression-store/502 "2025-05-04T08:56:16Z")

</div>

As you know bnd always produces a .jar file per bundle as its build output, and .jar files are actually zip files. And zip files can be used with and without compression. I just found a simple way to speed up performanc…

---

## [Getting a list of all java packages in your workspace](https://bnd.discourse.group/t/getting-a-list-of-all-java-packages-in-your-workspace/503)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [March 9, 2025, 9:59am UTC](https://bnd.discourse.group/t/getting-a-list-of-all-java-packages-in-your-workspace/503 "2025-03-09T09:59:02Z")

</div>

Not exactly bnd / bndtools related, but useful in this context. Use case Recently I needed an overview about all package names we have in our workspace, to do some cleanup and check if package names conform to naming co…

---

## [Wires command of the Equinox Console Shell for debugging how bundles are wired](https://bnd.discourse.group/t/wires-command-of-the-equinox-console-shell-for-debugging-how-bundles-are-wired/499)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [February 20, 2025, 11:33am UTC](https://bnd.discourse.group/t/wires-command-of-the-equinox-console-shell-for-debugging-how-bundles-are-wired/499 "2025-02-20T11:33:15Z")

</div>

There is a very useful command called wires in the Equinox Console, which can help debugging OSGi applications. Especially when you want to “see” (with your eyes) how Bundle A is wired to other bundles and why. The probl…

---

## [Generating multiple bundles per project](https://bnd.discourse.group/t/generating-multiple-bundles-per-project/84)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 1\
**Last updated:** [February 15, 2025, 9:21am UTC](https://bnd.discourse.group/t/generating-multiple-bundles-per-project/84 "2025-02-15T09:21:01Z")

</div>

In most cases it is best to have one project generate one bundle. However, sometimes it creates a lot of overhead and you’d like to be able to provide multiple bundles in a project since they share so much information. I…

---

## [Building bnd workspaces with pomless Maven via Eclipse Tycho](https://bnd.discourse.group/t/building-bnd-workspaces-with-pomless-maven-via-eclipse-tycho/494)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 0\
**Last updated:** [February 5, 2025, 3:24pm UTC](https://bnd.discourse.group/t/building-bnd-workspaces-with-pomless-maven-via-eclipse-tycho/494 "2025-02-05T15:24:47Z")

</div>

Today Eclipse Tycho 4.0.11 was released which has some great additions for building bnd workspaces with Maven. Features: See BND Workspace Layout and Pomless Builds requires almost zero configuration supports Export o…

---

## [Bndtools: Context-Menu for .bnd files - What are the things I can add to bnd.bnd file?](https://bnd.discourse.group/t/bndtools-context-menu-for-bnd-files-what-are-the-things-i-can-add-to-bnd-bnd-file/472)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 9:23am UTC](https://bnd.discourse.group/t/bndtools-context-menu-for-bnd-files-what-are-the-things-i-can-add-to-bnd-bnd-file/472 "2024-10-07T09:23:03Z")

</div>

Have you ever wanted to see what things you can add in the source-view of a bnd.bnd file? I just discovered there are context menu entries for Plugins, Instructions, Headers and Macros (in addition to some code-completi…

---

## [Eclipse \>= 2024-03: Solution for "The type x.y.z cannot be resolved. It is indirectly referenced from required type a.b.c"](https://bnd.discourse.group/t/eclipse-2024-03-solution-for-the-type-x-y-z-cannot-be-resolved-it-is-indirectly-referenced-from-required-type-a-b-c/453)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 4\
**Last updated:** [June 7, 2024, 8:32am UTC](https://bnd.discourse.group/t/eclipse-2024-03-solution-for-the-type-x-y-z-cannot-be-resolved-it-is-indirectly-referenced-from-required-type-a-b-c/453 "2024-06-07T08:32:09Z")

</div>

In case anyone stumbles over the following error when using Eclipse with bndtools: After upgrading my bnd workspace from Eclipse \<= 2023-12 to Eclipse 2024-03 our code suddenly did not compile anymore in Eclipse. The P…

---

## [More convenience for Maven Repos](https://bnd.discourse.group/t/more-convenience-for-maven-repos/435)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 1\
**Last updated:** [April 10, 2024, 1:41pm UTC](https://bnd.discourse.group/t/more-convenience-for-maven-repos/435 "2024-04-10T13:41:26Z")

</div>

The MavenBndRepository is one of the bnd workhorses. However, it is always kind of work to setup the plugin and the separate Maven Group:Artifact:Version file feels a bit superfluous. You can set the GAVs in the bnd fil…

---

## [Using reflection in Java](https://bnd.discourse.group/t/using-reflection-in-java/414)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 0\
**Last updated:** [January 30, 2024, 1:41pm UTC](https://bnd.discourse.group/t/using-reflection-in-java/414 "2024-01-30T13:41:50Z")

</div>

Maybe not so much a bnd tip … However, I am a great fan of Java reflection and much of the code I write uses reflection to make my code more declarative. Yesterday I had a great example and just want to share it. Domain…

---

## [Refactoring lambdas](https://bnd.discourse.group/t/refactoring-lambdas/404)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 2\
**Last updated:** [December 21, 2023, 1:35pm UTC](https://bnd.discourse.group/t/refactoring-lambdas/404 "2023-12-21T13:35:37Z")

</div>

Somehow I quite often starter with a lambda that has a single statement, like: Supplier\<String\> c = ()-\> "".substring(0); However, then sometime later I need to convert this into a block because I need more than one…

---

## [Regular Expressions Revisited](https://bnd.discourse.group/t/regular-expressions-revisited/400)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 0\
**Last updated:** [December 11, 2023, 4:42pm UTC](https://bnd.discourse.group/t/regular-expressions-revisited/400 "2023-12-11T16:42:14Z")

</div>

Most java developers seem to shy away from regular expressions because they are difficult. And I fully agree, the syntax devised for regular expressions puts the word terse to shame. We all know how to match everything w…

---

## [Eclipse, Java 17, and JUnit testen](https://bnd.discourse.group/t/eclipse-java-17-and-junit-testen/386)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 3\
**Last updated:** [November 17, 2023, 1:42pm UTC](https://bnd.discourse.group/t/eclipse-java-17-and-junit-testen/386 "2023-11-17T13:42:45Z")

</div>

II regularly run into issues with launching JUnit tests in Eclipse. I try to compile my open source code as much as possible on Java 8 to increase compatibility. However, more and more projects move to later versions. I…

---

## [The Educational Story of the Service Objects](https://bnd.discourse.group/t/the-educational-story-of-the-service-objects/378)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 3\
**Last updated:** [November 16, 2023, 7:59am UTC](https://bnd.discourse.group/t/the-educational-story-of-the-service-objects/378 "2023-11-16T07:59:31Z")

</div>

I am working on a project where someone expressed a great desire to use the OSGi PROTOTYPE scope. This PROTOTYPE feature was added to OSGi in my absence and then I admit grudgingly that such absence rarely makes my heart…

---

## [The resolve cache mode](https://bnd.discourse.group/t/the-resolve-cache-mode/302)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 21\
**Last updated:** [November 3, 2023, 7:32am UTC](https://bnd.discourse.group/t/the-resolve-cache-mode/302 "2023-11-03T07:32:53Z")

</div>

In 6.4.0 I added a new resolve mode called cache. If you select this mode then it is no longer necessary to update the -runbundles. Whenever the run bundles are requested, the resolver will run if the bndrun/bnd file and…

---

## [Stop gradle from stepping on Eclipse's (long) toes](https://bnd.discourse.group/t/stop-gradle-from-stepping-on-eclipses-long-toes/295)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 13\
**Last updated:** [March 20, 2023, 2:41pm UTC](https://bnd.discourse.group/t/stop-gradle-from-stepping-on-eclipses-long-toes/295 "2023-03-20T14:41:50Z")

</div>

In the default setup of the workspace, the gradle build tool & eclipse share the same output directories. In general, this means you always have to clean in each tool and in the case of Eclipse stop the incremental build…

---

## [When you're left behind](https://bnd.discourse.group/t/when-youre-left-behind/296)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 1\
**Last updated:** [March 10, 2023, 9:28am UTC](https://bnd.discourse.group/t/when-youre-left-behind/296 "2023-03-10T09:28:51Z")

</div>

bnd took the brave step to Java 17 and things seem to flow smoothly, we finally have the var keyword I always dreamed of! For desktops and & server farms Java 17 is not in any way complicated, the amount of choice after…

---

## [Eclipse Modeling Framework (EMF) video](https://bnd.discourse.group/t/eclipse-modeling-framework-emf-video/249)

<div class="topic-metadata">

**Author:** [@pkriens](https://bnd.discourse.group/u/pkriens)\
**Replies:** 0\
**Last updated:** [June 13, 2022, 6:50am UTC](https://bnd.discourse.group/t/eclipse-modeling-framework-emf-video/249 "2022-06-13T06:50:43Z")

</div>

Made a video about how you can use the Eclipse Modeling Framework (EMF) with the bndtools generate & new library function. Change your model and your bundle is automatically updated in the runtime. Demonstrated by Jürgen…

---

## [Creating a minimal stand alone maven integration test](https://bnd.discourse.group/t/creating-a-minimal-stand-alone-maven-integration-test/230)

<div class="topic-metadata">

**Author:** [@laeubi](https://bnd.discourse.group/u/laeubi)\
**Replies:** 9\
**Last updated:** [April 16, 2022, 5:06am UTC](https://bnd.discourse.group/t/creating-a-minimal-stand-alone-maven-integration-test/230 "2022-04-16T05:06:14Z")

</div>

I’m trying to derive a minimal stand alone project that uses: bnd-testing-maven-plugin osgi-test I’m using the example at https://github.com/osgi/osgi-test/tree/main/examples/osgi-test-example-mvn what runs fine when …

---

## [Bnd workspace vs Maven vs Gradle](https://bnd.discourse.group/t/bnd-workspace-vs-maven-vs-gradle/237)

<div class="topic-metadata">

**Author:** [@kriegfrj](https://bnd.discourse.group/u/kriegfrj)\
**Replies:** 0\
**Last updated:** [April 14, 2022, 3:42am UTC](https://bnd.discourse.group/t/bnd-workspace-vs-maven-vs-gradle/237 "2022-04-14T03:42:35Z")

</div>

Introduction As most Bnd/tools users will be aware, there are three main options for setting up your workspace to use Bnd: Bnd workspace (optionally with Gradle for CI support) Maven using the bnd-maven plugins Gradle …

---

## [Disable Build automatically & change Keyboard Shortcuts - Faster builds, less waiting](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196)

<div class="topic-metadata">

**Author:** [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 10:15pm UTC](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196 "2021-12-11T22:15:35Z")

</div>

Resulting from discussions like this or this by and with @kriegfrj I came up with something I’d like to share. I disabled Build automatically and changed default eclipse keyboard shortcuts for building the current proj…

---

## [More Facades: Streamlining Eclipse plugin dev with ExtensionFacade](https://bnd.discourse.group/t/more-facades-streamlining-eclipse-plugin-dev-with-extensionfacade/153)

<div class="topic-metadata">

**Author:** [@kriegfrj](https://bnd.discourse.group/u/kriegfrj)\
**Replies:** 3\
**Last updated:** [September 10, 2021, 3:20pm UTC](https://bnd.discourse.group/t/more-facades-streamlining-eclipse-plugin-dev-with-extensionfacade/153 "2021-09-10T15:20:05Z")

</div>

Hi all, I pray that you are well. In a previous post More TDD: Facade pattern to streamline Eclipse extension development I wrote about the facade pattern for the Bndtools quick fix processor. When I started trying to a…

[Next page](https://bnd.discourse.group/c/tips/10.md?page=1)
