User Tools

Site Tools


apache_karaf

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
apache_karaf [2014/05/22 08:06]
mihael bundle install
apache_karaf [2016/02/25 10:33] (current)
mihael
Line 2: Line 2:
  
 Karaf IRC channel : [[http://​karaf.apache.org/​index/​developers/​irc-room.html | Apache Karaf IRC]] Karaf IRC channel : [[http://​karaf.apache.org/​index/​developers/​irc-room.html | Apache Karaf IRC]]
 +
 +===== Jetty =====
 +
 +==== Configure Default Port ====
 +By default Jetty is configured to bind to any network device on port 8181. The configuration of the port must be done via the ConfigAdmin OSGi service. Just drop the configuration file //​org.ops4j.pax.web.cfg//​ into the //etc// folder with the following content:
 +
 +  service.pid=org.ops4j.pax.web.cfg
 +  org.osgi.service.http.port=9191
 +
 +Any additional configuration can be done in the //​jetty.xml//​ file.
  
 ===== Commands ===== ===== Commands =====
 +
 +==== Scripting ====
 +
 +=== Execute Script ===
 +To execute a script (file with Karaf shell commands) the command ''​shell:​source''​ has to be used.
 +
 +  shell:​source my.script
 +
  
 ==== Bundles ==== ==== Bundles ====
Line 12: Line 30:
 The ''​deploy''​ folder is one method. Bundles dropped in the ''​deploy''​ folder are automatically installed and started. The ''​deploy''​ folder is one method. Bundles dropped in the ''​deploy''​ folder are automatically installed and started.
  
-=== OBR ===+== OBR ==
 Bundles can be installed from on OSGi Bundle Repository (OBR) (similar to a Maven repository, but not compatiblel with it). The commands in the schema ''​obr''​ are used to manage and use OBRs. Bundles can be installed from on OSGi Bundle Repository (OBR) (similar to a Maven repository, but not compatiblel with it). The commands in the schema ''​obr''​ are used to manage and use OBRs.
  
 <note tip>The list of the bundles in an OBR is loaded once from the repository and must be refresh manually with the command ''​obr:​url-refresh''​.</​note>​ <note tip>The list of the bundles in an OBR is loaded once from the repository and must be refresh manually with the command ''​obr:​url-refresh''​.</​note>​
  
-=== Install ​===+== Install ​Command ​==
 The ''​install''​ command can be used to install bundles from various sources, like local filesystem, HTTP server, local Maven repository. The ''​install''​ command can be used to install bundles from various sources, like local filesystem, HTTP server, local Maven repository.
  
Line 30: Line 48:
  
 === Watch === === Watch ===
-During development it is very inconvenient to manually reload the new bundle version to test the last change. Karaf supports to automatically reload //watched// bundles. There are some requirements for this to work. The bundles **must** be SNAPSHOT versions and the bundles must be installed via the ''​install''​ command **with** the version passed to the command.+During development it is very inconvenient to manually reload the new bundle version to test the last change. Karaf supports to automatically reload //watched// bundles. There are some requirements for this to work. The bundles must be installed via the ''​install''​ command **with** the version passed to the command.
  
   install mvn:​my.group/​my.artifact/​1.0.0-SNAPSHOT   install mvn:​my.group/​my.artifact/​1.0.0-SNAPSHOT
Line 77: Line 95:
   ​   ​
   ​   ​
-{{tag>​osgi}}+{{tag>​osgi ​karaf}}
apache_karaf.1400746017.txt.gz ยท Last modified: 2014/05/22 08:06 by mihael