diff --git a/biz.aQute.bnd.gradle/README.md b/biz.aQute.bnd.gradle/README.md index e70250c5d9..e8c9f304c0 100644 --- a/biz.aQute.bnd.gradle/README.md +++ b/biz.aQute.bnd.gradle/README.md @@ -321,6 +321,11 @@ default is `false`. If `true` the build will fail if the resolve process changes the value of the `-runbundles` property. The default is `false`. +### writeOnChanges + +If `true` the build will write changes to the value of the `-runbundles` +property back to the bndrun file. The default is `true`. + ### bndrun The bndrun to be resolved. It can be anything that `Project.file(Object)` diff --git a/biz.aQute.bnd.gradle/src/aQute/bnd/gradle/Resolve.groovy b/biz.aQute.bnd.gradle/src/aQute/bnd/gradle/Resolve.groovy index efbfb30ecf..fa25967f24 100644 --- a/biz.aQute.bnd.gradle/src/aQute/bnd/gradle/Resolve.groovy +++ b/biz.aQute.bnd.gradle/src/aQute/bnd/gradle/Resolve.groovy @@ -59,6 +59,17 @@ public class Resolve extends Bndrun { @Input boolean failOnChanges = false + /** + * Whether resolve changes should be writen back. + * + *
+ * If true
, then a change to the current -runbundles
+ * value will be writen back into the bndrun file. The default is
+ * true
.
+ */
+ @Input
+ boolean writeOnChanges = true
+
/**
* Whether to report optional requirements.
*
@@ -91,7 +102,7 @@ public class Resolve extends Bndrun {
protected void worker(def run) {
logger.info 'Resolving runbundles required for {}', run.getPropertiesFile()
try {
- def result = run.resolve(failOnChanges, true)
+ def result = run.resolve(failOnChanges, writeOnChanges)
logger.info '{}: {}', Constants.RUNBUNDLES, result
} catch (ResolutionException e) {
logger.error ResolveProcess.format(e, reportOptional)
diff --git a/maven/bnd-resolver-maven-plugin/README.md b/maven/bnd-resolver-maven-plugin/README.md
index 1bb91f6243..24a50a54a6 100644
--- a/maven/bnd-resolver-maven-plugin/README.md
+++ b/maven/bnd-resolver-maven-plugin/README.md
@@ -63,6 +63,7 @@ The `-runee` and `-runrequires` values can be inferred from the maven project as
| --- | --- |
|`bndruns` | Can contain `bndrun` child elements naming a bndrun file to resolv. You can also specify `include` and `exclude` child elements using Ant-style globs to specify bndrun files. These are relative to the `${project.basedir}` directory. _Defaults to `