Collecting properties across projects in a master project

Dear Bndtools community,

I pray that you are all well!

I have a workspace using the Bnd workspace model. I have several plugin projects that are add-ons for a third-party application (iDempiere) and another “launch” project which has my launch.bndrun that launches iDempiere and adds in my plugins.

For each of the plugins, I would like to configure some -runproperties. At the moment, I configure all of these in the main launch.bndrun. However, this widely separates the place where the configuration is stored from the project that the configuration pertains to. I would like to be able to define the properties in the individual plugin projects and somehow incorporate it in the main launch.bndrun file by reference. I would also like it if I could add/remove additional plugin projects and have the configuration added to the launch without having to update the main launch.bndrun.

I can think of a few ways to do this but I’m not sure how efficient they would be, so I thought to ask the community if anyone had any first-hand experience and suggestions on the best way to do this.

Any thoughts or comments appreciated!

Blessings,
Fr Jeremy

Why not use -include?

At a customer we analyzed all possible run time configurations and then put the variations in include files. I.e. for the development versions we had a shared/dev.bnd and for the one running in the IDE we had a shared/ide.bnd. We gave each dimensions a 3 letter code and the bndrun was then the amalgamation of these codes:

 foo-bar-ide-dev.bndrun

We had one project, the application project, that held all the bndrun files and created the executable jars with the -export instruction. I think that the ‘application’ aspect is sufficiently distinct from the code (which should be reusable and should be usable in multiple applications) to collect the runtime information in a separate dedidcated project.

My workspace is configured similarly - I have an “application” project that contains the main bndrun and brings all of the projects together into a single application launch. I agree, the “application” aspect is distinct from the code.

I think your tip is helpful. At this stage I don’t think I need the multi-dimensional complexity that you are talking about (though I’ll file it away for possible future use!), but a single-dimensional version of what you described should do what I need. The run-time configuration for each project can be configured in a file like <project>/<dimension>.bndrun and then I can include ${workspace}/*/<dimension>.bndrun to aggregate all of these in the main launch file in the application project. This way I can add/remove/reconfigure individual projects without having to update the main application file.