I am trying to run bnd on the command line running the resolve task. Is there any docs on how to use this ? Commands | bnd does not even list it as a command. I am trying to simulate clicking the “resolve” button on a bndrun file in eclipse
Try bnd help resolve
and bnd resolve help
to get help.
Did that.
java -jar …/…/libs/biz.aQute.bnd-6.1.0.jar resolve resolve help
Warnings
000: Using default workspace
Nothing
java -jar …/…/libs/biz.aQute.bnd-6.1.0.jar resolve resolve -h
Unrecognized option h
NAME
resolve - Resolve a bndrun file
SYNOPSIS
resolve [options] <…>
OPTIONS
[ -b, --bundles ] - Print out the bundles
[ -d, --dot ] - Create a dependency file
[ -e, --exclude <string;> ] - Exclude files by pattern
[ -f, --files ] - Print out the bundle files
[ -o, --optionals ] - Show the optionals
[ -p, --project ] - Identify another project
[ -q, --quiet ] - Quiet
[ -r, --runorder ] - Override the -runorder
[ -u, --urls ] - Print out the bundle urls
[ -v, --verbose ] - prints more processing information
[ -w, --workspace ] - Use the following workspace
[ -W, --write ] - Write -runbundles instruction back to the file
[ -x, --xchange ] - Fail on changes
So I am assuming , would spit out all the required jars OR tell me what is not resolved
java -jar …/…/libs/biz.aQute.bnd-6.1.0.jar resolve resolve -f resolve.bndrun
Instead I get this which looks like it is not doing anything
Warnings
000: Using default workspace
QQ: what toolchain are you using?
Not sure what you are asking. Ultimately trying to generate a list of bundles to build a docker container
are you working in bnd workspace, maven, or pure gradle build?
The bnd command line only works in the first. But for the other two there are different options to do what you like, making docker images from bnd resolutions is pretty common task.
If you really want to run bnd with java -jar you need to do: java -jar …/…/libs/biz.aQute.bnd-6.1.0.jar resolve resolve **/*.bndrun
Nto sure where to find the documentation or if there is any.
Got it working , For the record , no workspace required …
java -jar …/…/libs/biz.aQute.bnd-6.1.0.jar resolve resolve -u -p config.bndrun
inside the config.bndrun I define -plugins for each of the repos like this …
repo.def = aQute.bnd.deployer.repository.LocalIndexedRepo;
name="${1}";
local=/Users/davesmith/candatag/repo/base/${2};
pretty=true
-plugin.common: ${repo.def;Common;common}
etc …
Output looks like…
# URLS
file:/Users/davesmith/candatag/repo/base/internal/common/javax.servlet-api-3.1.0.jar
file:/Users/davesmith/candatag/repo/base/internal/server/org.apache.commons.logging-1.1.3.jar
…