-
1. Re: Karaf console commands for osgi
davsclaus Apr 11, 2014 7:20 AM (in response to rich.peters)1 of 1 people found this helpfulThe Karaf console is like the unix shell so you can pipe commands,
list -l | grep -i " org.springframework/spring-core"
Yeah I guess there isn't a sed/awk to grab what you then need.
You are welcome to make a suggestion at the Apache Karaf project as this is karaf specific
http://karaf.apache.org/index/community/discussion-forums.html
-
2. Re: Karaf console commands for osgi
janstey Apr 11, 2014 7:39 AM (in response to rich.peters)1 of 1 people found this helpfulAgree, those would be nice features to add to Karaf. If it helps, here is some ugly scripting I recently used to upgrade Spring 3.1 libs to 3.2:
#!/bin/bash
./bin/client -u admin -p admin "osgi:list -s" | grep org.springframework | grep 3.1 | grep -v asm | sed 's/\[ \([0-9]*\).*/\1/' |
while read id
do (
name=`./bin/client -u admin -p admin "osgi:headers --force $id" | grep Symbolic | sed 's/.*= \(.*\)/\1/'`
echo "Updating $name to 3.2.4.RELEASE"
./bin/client -u admin -p admin "osgi:update --force $id mvn:org.springframework/$name/3.2.4.RELEASE"
)
done
-
3. Re: Karaf console commands for osgi
rich.peters Apr 15, 2014 11:29 AM (in response to davsclaus)Claus,
thanks I did post it on the Karaf forum
Rich