I am using the bnd repo index cli tool to generate an index file for some bundles that are downloaded, and used as dependency in a gradle+bnd build. The generated index file is specified as a FixedIndexedRepo in the bnd plugins configuration. I am trying to complete the automation of the build, so that it downloads the bundles, indexes them, then runs a full build all with one command. However, when I run both the indexing and the build in the same gradle execution
e.g. ./gradlew generateIndex buildNeeded
then I get a FileNotFoundException from bnd saying that the index file for the repo does not exist.
If I run
./gradlew generateIndex && ./gradlew buildNeeded
that is, perform the steps in different gradle executions everything works fine.
Note: I did try setting bnd_preCompileRefresh=true but this didn't help.
Whats happening here? Is the FixedIndexedRepo initialised before the index file is created, and failing? Why would the refresh not fix this?
Any help greatly appreciated.