The reason I ask is this: freemarker/osgi.bnd at 2.3-gae · apache/freemarker · GitHub
I want to import that project since I want to do some debugging there. In the pre-bndtools past when we used Eclipse-PDE I could just import this project into Eclipse and it worked. Now with a bnd workspace it is not soo easy.
I got it working by
copying the folder into my bnd workspace
renaming the file from osgi.bnd
to bnd.bnd
+ some minor modifications
My question is now:
is this the correct way?
or can I somehow use the original name osgi.bnd
somehow
Based on the response here I might suggest a PR in the original freemarker project, to make it work with bndtools in a bnd workspace too.
For Bnd Workspace builds, the presence of bnd.bnd
in a folder indicates that the folder is project. So it must be called bnd.bnd
.
For non-Bnd Workspace builds like Maven or Gradle (and even Ant), you can tell Bnd the name of the bnd file to use.
1 Like
Thanks.
I opened a PR in freemarker to create a bnd.bnd
to make importing this project in Eclipse easier.
apache:2.3-gae
← chrisrueger:allow-bnd-workspace-for-bndtools
opened 10:07PM - 08 Oct 22 UTC
## What
This PR is to make it possible to import freemarker in a [bndtools](h… ttps://github.com/bndtools/bnd) Eclipse project (OSGI).
See https://bndtools.org/concepts.html
This allows for easier debugging and development when you are working in OSGI project based on bndtools and you need a Freemarker source build right in your IDE for debugging purposes with your other code.
## Why
Although in the past there has been some OSGi related additions for Eclipse, those changes were for Eclipse PDE-Build and do not work if you are using bndtools.
The main issue is that bndtools requires a file called `bnd.bnd`
There is already an `osgi.bnd`
The problem with `osgi.bnd` is that it
a) has the wrong name and
b) contains variables likle `${versionForOsgi}` which need to be replaced with valid values which are already available during the build.
## Details
This PR adds a small addition to the `ide-dependencies` build target to create such a valid `bnd.bnd` file from the existing `osgi.bnd` Advantage is that we leave everything untouched and just create a new file which is also `.gitignored` and only be read by Eclipse IDE with bndtools plugin installed.
* This creates a `bnd.bnd` file in build for `ide-dependencies` by simply copying the existing `osgi.bnd`
* run `ant clean jar ide-dependencies` to execute this PR's changes and see the resulting `bnd.bnd` in project root
* replaces placeholder variables in the resulting `bnd.bnd`
* this exact filename is required by bndtools in the bnd workspace model
* See https://bndtools.org/concepts.html#workspacerepositoriesproject-model for more information
FYI: My PR got merged . So next freemarker release will be easier to be used in a bnd workspace