Hi JB,
thank you - that helped a lot. I am now able to update bundles at runtime
with "bundle:update <id>". However, "bundle:watch *" seems to still not
work (I installed the replacement-bundle you provided to fix the command in
3.0.2).
When I run "bundle:watch *", Karaf DEBUG starts repeating the following
every second or so:
2014-10-18 14:09:54,986 | DEBUG | Thread-23 | configadmin
| 6 - org.apache.felix.configadmin - 1.8.0 | getProperties()
2014-10-18 14:09:54,986 | DEBUG | lixDispatchQueue | framework
| 0 - org.apache.felix.framework - 4.2.1 | FrameworkEvent
PACKAGES REFRESHED - org.apache.felix.framework
However, when I run "mvn clean install" on my "under-development" bundle,
it does not refresh it. On the other hand, manually running bundle:update
works. I guess I am still missing some small detail here?
Best regards,
Oliver
2014-10-18 7:23 GMT+02:00 Jean-Baptiste Onofré <[email protected]>:
> FYI: https://issues.apache.org/jira/browse/KARAF-3324
>
> Regards
> JB
>
> On 10/17/2014 08:39 PM, Oliver Pajonk wrote:
>
>> Hi all,
>>
>> following up on the latest issue with bundle:watch I have a related
>> question. I am using the "standard" (as in documented here
>> <http://karaf.apache.org/manual/latest/developers-
>> guide/custom-distribution.html>)
>>
>> way to construct a Karaf instance which would run my feature (and a few
>> related ones). Both feature and distribution are created with
>> the karaf-maven-plugin, so all bundles get installed into the system
>> repository to make a self-sufficient distribution.
>>
>> However, what if I want to do bundle development with this setup? I have
>> tried to use bundle:update in this scenario, but enabling DEBUG log
>> output confirmed my suspicion: Karaf does not look in my local Maven
>> repository for updated SNAPSHOT bundles; it just grabs it from the
>> system repository [1] - where it is not updated, of course, when I call
>> mvn install for a bundle project.
>>
>> My question is therefore: what do you suggest as a "least effort"
>> development cycle, involving bundle:update and (when it works again)
>> bundle:watch? A link to a blogpost, a few lines of description, anything
>> will help :-) Google did not really turn up something for me...
>>
>> Best regards,
>> Oliver
>>
>>
>> [1] Log from a bundle:update call:
>>
>> 2014-10-17 20:31:52,039 | DEBUG | h for user karaf | Connection
>> | 1 - org.ops4j.pax.url.mvn - 2.2.0 | Resolving
>> [mvn:obfuscatedgroupid/obfuscatedartifactid/0.0.1-SNAPSHOT]
>> 2014-10-17 20:31:52,039 | DEBUG | h for user karaf |
>> DefaultLocalRepositoryProvider | 1 - org.ops4j.pax.url.mvn - 2.2.0 |
>> Using manager SimpleLocalRepositoryManager with priority 0.0 for
>> D:\Dev\Eclipse\Misc\obfuscatedapp\karaf-application\application\
>> target\assembly\system
>> 2014-10-17 20:31:52,039 | DEBUG | h for user karaf | AetherBasedResolver
>> | 1 - org.ops4j.pax.url.mvn - 2.2.0 | Resolved
>> (obfuscatedgroupid:obfuscatedartifactid:jar:0.0.1-SNAPSHOT) as
>> D:\Dev\Eclipse\Misc\obfuscatedapp\karaf-application\application\
>> target\assembly\system\some\where\obfuscatedartifactid\0.0.1-SNAPSHOT\
>> obfuscatedartifactid-0.0.1-SNAPSHOT.jar
>>
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>