Description
One thing I noticed quite often now is that when using Bndruns programmatically (not sure if the same problem might occur elsewhere) to perform a resolve operation one sometimes get very strange could not resolve <<INITIAL>>...
errors.
After some digging one finds that this is because there are two kind of "repositories":
- "bnd" repositories (like FileRepo) that are implemented as
RepositoryPlugin
and can be used to resolve e.g. bundle classpath and alike - "osgi" repository, that is required to perform a resolve operation (e.g. FileSetRepository) that are usually also
RepositoryPlugin
s
One example is biz.aQute.resolve.BndrunResolveContext.getAllRepos()
where it only will get all that are OSGi Repository but this will of course not cover "plain" ones. This is very confusing because the usual bnd operations work, but the resolve suddenly fails.
I could think of two ways to resolve this:
- Make bndrun / maybe others "smarter" ...
- Have some kind of way to define a "converter" that is when I call
aQute.bnd.service.Registry.getPlugins(Repository.class)
automatically wrapsRepositoryPlugin
s that do not implement that interface in aRepository
thats uses the repository plugin as a backend.
One example is the "implicit" repository CachedFileRepo
that come with each Workspace by default, one can use that for all operations in bnd except for resolve... for this purpose one has to explicitly add for example biz.aQute.tester.junit-platform
even though it is part of the implict repository.