overriding property in build.bnd

19 views
Skip to first unread message

Bryan Hunt

unread,
Jul 20, 2016, 2:09:45 PM7/20/16
to bndtool...@googlegroups.com
Can I override a property in build.bnd from the command line when running gradle? I tried something like:

gradle -Dbnd.repo=prod build

and that didn’t seem to do what I wanted.

Bryan

BJ Hargrave

unread,
Jul 20, 2016, 2:22:29 PM7/20/16
to bndtool...@googlegroups.com
-D sets a system property which you can reference in the bnd file with ${bnd.repo}. But system properties do not override bnd properties. The system properties back the bnd properties.

--
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

Peter Kriens

unread,
Jul 21, 2016, 3:56:13 AM7/21/16
to bndtool...@googlegroups.com
Which you can the of course use to get the right value with:

${def;bnd.repo;http://…}

Kind regards,

Peter Kriens

Bryan Hunt

unread,
Jul 21, 2016, 8:23:46 AM7/21/16
to bndtool...@googlegroups.com
Thanks BJ & Peter for the help.  I’m still trying to figure out how to deal with our repositories and how our build is replicated across dev, staging, and prod.  Throw in artifactory and maven and you have a big mess :(
Reply all
Reply to author
Forward
0 new messages