Disable projects in a bndtools workspace

23 views
Skip to first unread message

Christophe Paris

unread,
Dec 15, 2016, 7:38:47 AM12/15/16
to bndtools-users
Hi,

I have a git repository which looks like this :

gitrepo/
  +cnf/
  +bndprj1/
  +bndprj2/
  ...

Let's say "bndprj1" depends on a bundle of "bndprj2".

I would like to disable "bndprj2" in the workspace so the dependencies are pulled from a CI repository instead of the workspace repository.

Currently even if the project is not imported or closed in eclipse, the dependency is still pulled locally.

Any idea how to do that ?


Thanks, Christophe.

BJ Hargrave

unread,
Dec 15, 2016, 8:36:47 AM12/15/16
to bndtool...@googlegroups.com
Bndtools uses Bnd to operate on the Bnd Workspace. While Bndtools is a set of Eclipse plugins, Bnd is not aware of Eclipse and only operate on the Bnd Workspace on the file system. So disabling a project in Eclipse means nothing to Bnd which will still see the project on the file system.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
BJ

Christophe Paris

unread,
Dec 15, 2016, 10:08:59 AM12/15/16
to bndtools-users
I see, so I need to get Bnd to ignore my project in the Bnd Workspace.

By looking quickly at the source code it seems it could be done by modifying the method Workspace.getAllProjects() :
https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/build/Workspace.java
Then by adding an "isEnabled()" method to the "Project" class.
Also a new "enableproject" property must be parsed from bnd file (not sure where this is done yet).

Any thoughts or better way ?

Bram Pouwelse

unread,
Dec 15, 2016, 10:24:41 AM12/15/16
to bndtools-users
I don't really get why you want to disable one project in a workspace? but if you want to disable you could add

-nobundles: true

to the bnd.bnd file of the project you want to disable


Regards, 

Bram

BJ Hargrave

unread,
Dec 15, 2016, 11:21:34 AM12/15/16
to bndtool...@googlegroups.com
I don't think we want to change Bnd code to add enablement to Project. There would be a huge ripple effect through the code. Just renaming the bnd.bnd file to some other file name will make Bnd ignore the folder.

Christophe Paris

unread,
Dec 15, 2016, 11:31:33 AM12/15/16
to bndtools-users
The idea is to work with only a subset of enabled projects in the workspace and to use bundles from a continuous integration repository for the other projects.

Unfortunately putting "-nobundles: true" in "bndprj2/bnd.bnd" breaks the run of "bndprj1".
The run is still searching for the bndprj2 workspace generated jar while the dependency is available in a "Local" repository.
Reply all
Reply to author
Forward
0 new messages