User Tools

Site Tools


osgi:felix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
osgi:felix [2019/01/24 21:26] – created odeftaosgi:felix [2023/07/04 19:36] (current) – external edit 127.0.0.1
Line 10: Line 10:
  
 Apache Felix Gogo is a subproject of Apache Felix implementing a command line shell for OSGi. It is used in many OSGi runtimes and servers (Felix distro, Eclipse IDE, Apache Karaf, ...). Apache Felix Gogo is a subproject of Apache Felix implementing a command line shell for OSGi. It is used in many OSGi runtimes and servers (Felix distro, Eclipse IDE, Apache Karaf, ...).
 +
 +All commands here: http://felix.apache.org/documentation/subprojects/apache-felix-gogo.html
  
 ==== Commands ==== ==== Commands ====
  
-=== List bundles===+=== Launch Gogo === 
 + 
 +<code> 
 +java -jar bin/felix.jar  
 +</code> 
 + 
 +<code> 
 +Welcome to Apache Felix Gogo 
 +</code> 
 + 
 +=== List bundles === 
 + 
 +<code> 
 +lb 
 +</code> 
 + 
 +<code> 
 +START LEVEL 1 
 +   ID|State      |Level|Name 
 +    0|Active        0|System Bundle (6.0.1)|6.0.1 
 +    1|Active        1|JLine Bundle (3.7.0)|3.7.0 
 +    2|Active        1|Apache Felix Gogo Command (1.0.2)|1.0.2 
 +    3|Active        1|Apache Felix Gogo JLine Shell (1.1.0)|1.1.0 
 +    4|Active        1|Apache Felix Gogo Runtime (1.1.0)|1.1.0 
 +    5|Active        1|MJ-OSGIHelloWorldProvider (1.0.0)|1.0.0 
 +    6|Installed  |    1|osgi.core (6.0.0.201403061837)|6.0.0.201403061837 
 +</code> 
 + 
 +=== Install bundle === 
 + 
 +<code> 
 +install file:///E:/MJ/OSGIHelloWorldProvider/target/osgi.hello-world-provider-1.2-SNAPSHOT.jar          
 +</code> 
 + 
 +<code> 
 +Bundle ID: 5 
 +</code> 
 + 
 +=== Start bundle === 
 + 
 +<code> 
 +start 5 
 +</code> 
 + 
 +=== Check bundle status === 
 + 
 +<code> 
 +bundle 5 
 +</code> 
 + 
 +<code> 
 +Location             file:/E:/MJ/OSGIHelloWorld/target/osgi.hello-world.jar 
 +State                32 
 +LastModified         1548357508506 
 +Headers              [Export-Package=ro.medjava.osgi.provider.able;version="1.0.0",ro.medjava.osgi.provider;uses:="org.osgi.framework";version="1.0.0", Bundle-ManifestVersion=2, Bundle-SymbolicName=MJ-OSGIHelloWorldProvider, Bundle-Version=1.0.0, Created-By=1.8.0_111 (Oracle Corporation), Manifest-Version=1.0, Bnd-LastModified=1548356548522, Bundle-Name=MJ-OSGIHelloWorldProvider, Import-Package=org.osgi.framework,ro.medjava.osgi.provider.able, Bundle-Activator=ro.medjava.osgi.provider.ProviderActivator, Require-Capability=osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))", Tool=Bnd-4.0.0.201805111645] 
 +Version              1.0.0 
 +BundleContext        org.apache.felix.framework.BundleContextImpl@9bf0b04 
 +RegisteredServices   [HelloWorldService] 
 +Bundle                   5|Active        1|MJ-OSGIHelloWorldProvider (1.0.0) 
 +Revisions            [MJ-OSGIHelloWorldProvider [5](R 5.0)] 
 +SymbolicName         MJ-OSGIHelloWorldProvider 
 +BundleId             5 
 +ServicesInUse        null 
 +</code> 
 + 
 +=== Stop bundle === 
 + 
 +<code> 
 +stop 5 
 +</code> 
 + 
 +=== Uninstall bundle === 
 + 
 +<code> 
 +uninstall 5 
 +</code> 
 + 
 +=== List all services === 
 + 
 +<code> 
 +inspect capability service 
 +</code> 
 + 
 +or - short version: 
 + 
 +<code> 
 +inspect cap service 
 +</code> 
 + 
 +<code> 
 +org.apache.felix.framework [0] provides: 
 +---------------------------------------- 
 +service; org.osgi.service.resolver.Resolver with properties: 
 +   service.bundleid = 0 
 +   service.id = 1 
 +   service.scope = singleton 
 +service; org.osgi.service.packageadmin.PackageAdmin with properties: 
 +   service.bundleid = 0 
 +   service.id = 2 
 +   service.scope = singleton 
 +service; org.osgi.service.startlevel.StartLevel with properties: 
 +   service.bundleid = 0 
 +   service.id = 3 
 +   service.scope = singleton 
 +   Used by: 
 +      org.apache.felix.framework [0] 
 + 
 +org.jline [1] provides: 
 +----------------------- 
 +service [EMPTY] 
 + 
 +org.apache.felix.gogo.command [2] provides: 
 +------------------------------------------- 
 +service; org.apache.felix.gogo.command.Basic with properties: 
 +   osgi.command.function = bundlelevel, frameworklevel, headers, help, install, lb, log, refresh, resolve, start, stop, uninstall, update, which 
 +   osgi.command.scope = felix 
 +   service.bundleid = 2 
 +   service.id = 4 
 +   service.scope = singleton 
 +service; org.apache.felix.gogo.command.Inspect with properties: 
 +   osgi.command.function = inspect 
 +   osgi.command.scope = felix 
 +   service.bundleid = 2 
 +   service.id = 5 
 +   service.scope = singleton 
 +   Used by: 
 +      org.apache.felix.gogo.runtime [4] 
 +service; org.apache.felix.gogo.command.Files with properties: 
 +   osgi.command.function = cd, ls 
 +   osgi.command.scope = felix 
 +   service.bundleid = 2 
 +   service.id = 6 
 +   service.scope = singleton 
 + 
 +org.apache.felix.gogo.jline [3] provides: 
 +----------------------------------------- 
 +service; org.apache.felix.service.command.Converter with properties: 
 +   service.bundleid = 3 
 +   service.id = 9 
 +   service.scope = singleton 
 +   Used by: 
 +      org.apache.felix.gogo.runtime [4] 
 +service; org.apache.felix.gogo.jline.Builtin with properties: 
 +   osgi.command.function = format, getopt, new, set, tac, type, jobs, fg, bg, keymap, setopt, unsetopt, complete, history, widget, __files, __directories, __usage_completion 
 +   osgi.command.scope = gogo 
 +   service.bundleid = 3 
 +   service.id = 10 
 +   service.scope = singleton 
 +service; org.apache.felix.gogo.jline.Procedural with properties: 
 +   osgi.command.function = each, if, not, throw, try, until, while, break, continue 
 +   osgi.command.scope = gogo 
 +   service.bundleid = 3 
 +   service.id = 11 
 +   service.scope = singleton 
 +service; org.apache.felix.gogo.jline.Posix with properties: 
 +   osgi.command.function = cat, echo, grep, sort, sleep, cd, pwd, ls, less, watch, nano, tmux, head, tail, clear, wc, date, ttop 
 +   osgi.command.scope = gogo 
 +   service.bundleid = 3 
 +   service.id = 12 
 +   service.scope = singleton 
 +service; org.apache.felix.gogo.jline.Shell with properties: 
 +   osgi.command.function = gosh, sh, source, help 
 +   osgi.command.scope = gogo 
 +   service.bundleid = 3 
 +   service.id = 13 
 +   service.scope = singleton 
 + 
 +org.apache.felix.gogo.runtime [4] provides: 
 +------------------------------------------- 
 +service; org.apache.felix.service.threadio.ThreadIO with properties: 
 +   service.bundleid = 4 
 +   service.id = 7 
 +   service.scope = singleton 
 +service; org.apache.felix.service.command.CommandProcessor with properties: 
 +   service.bundleid = 4 
 +   service.id = 8 
 +   service.scope = singleton 
 +   Used by: 
 +      org.apache.felix.gogo.jline [3] 
 + 
 +MJ-OSGIHelloWorldProvider [5] provides: 
 +--------------------------------------- 
 +service; ro.medjava.osgi.provider.able.HelloWorldService with properties: 
 +   service.bundleid = 5 
 +   service.id = 15 
 +   service.scope = singleton 
 + 
 +Bundle 6 is not resolved. 
 +</code> 
 + 
 +=== Lists all services provided by a bundle === 
 + 
 +<code> 
 +inspect cap service 5 
 +</code>
  
-  lb+<code> 
 +MJ-OSGIHelloWorldProvider [5] provides: 
 +--------------------------------------- 
 +service; ro.medjava.osgi.provider.able.HelloWorldService with properties: 
 +   service.bundleid = 5 
 +   service.id = 15 
 +   service.scope = singleton 
 +</code>
  
 +=== Exit shell ===
  
 +<code>
 +CTRL + D
 +</code>
  
  
  
osgi/felix.1548357980.txt.gz · Last modified: 2023/07/04 19:36 (external edit)