rwgaj opened a new issue, #2141:
URL: https://github.com/apache/karaf/issues/2141
## Usecase
For local development, I sometimes use non-snapshot versions, but still want
to auto update bundles via `bundle:watch` command.
Only updating bundles with `SNAPSHOT` in the URL is fine as default mode,
but I don't see an issue with allowing users to disable this behavior.
## Proposal
- Add option to `bundle:watch` command to enable auto update of non-snapshot
bundles
- Adjust `BundleWatcher` interface and `BundleWatcherImpl` implementation to
respect the new configuration option
### Notes
I did not really analyze `BundleWatcherImpl` in depth, but I guess the
relevant code lines are:
```java
for (Bundle bundle :
bundleService.selectBundles(Collections.singletonList(bundleURL), false)) {
if (isMavenSnapshotUrl(getLocation(bundle))) {
watchedBundles.add(bundle);
}
}
```
So I imagine something like the following might work?
```diff
for (Bundle bundle :
bundleService.selectBundles(Collections.singletonList(bundleURL), false)) {
- if (isMavenSnapshotUrl(getLocation(bundle))) {
+ if (updateNonSnapshotBundles == true ||
isMavenSnapshotUrl(getLocation(bundle))) {
watchedBundles.add(bundle);
}
}
```
I wanted to get some feedback from the maintainers. If you consider this as
a valid feature, I could try to provide the PR.
Thank you for this awesome project, looking forward to your feedback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]