karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r11673 [2/3] - in /release/karaf/documentation: 3_x.html 3_x.pdf
Date Sun, 20 Dec 2015 07:52:39 GMT

Added: release/karaf/documentation/3_x.html
==============================================================================
--- release/karaf/documentation/3_x.html (added)
+++ release/karaf/documentation/3_x.html Sun Dec 20 07:52:39 2015
@@ -0,0 +1,3812 @@
+
+<!DOCTYPE html>
+<html>
+<head>
+  <style type="text/css">
+/*
+
+Copyright (c) 2005 Hakon Wium Lie and Bert Bos
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+html {
+  margin: 0; padding: 0;
+  font: 10pt/1.26 "Gill Sans", sans-serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+  font-family: "Gill Sans", sans-serif;
+  margin: 2em 0 0.5em 0;
+  page-break-after: avoid;
+}
+
+h1 {
+  font-size: 2.0em;
+  font-weight: 900;
+
+  margin: 0;
+  margin-left:-2cm;
+  margin-top:-1cm;
+  margin-bottom:1.5cm;
+  top: 0cm;
+  left: 0cm;
+  padding: 2cm;
+  padding-top: 0cm;
+  padding-bottom: 1cm;
+  background: #888;
+  border-bottom-right-radius: 2cm;
+  page-break-before: always;
+  page-break-inside: avoid;
+}
+
+@media screen, handheld {
+h1 {
+  margin-top:1cm;
+  background-image: url("chapter-rounded-bottom.png");
+  background-repeat: no-repeat;
+  background-position: bottom right;
+}
+div.page-reset > h1 {
+  margin-top:0cm;
+}
+}
+
+
+h2 {
+  font-size: 1.2em;
+  text-transform: uppercase;
+  font-weight: bold;
+}
+
+h3 {
+  font-size: 1em;
+  font-weight: bold;
+}
+
+q::before {
+  content: "\201C";
+}
+
+q::after {
+  content: "\201D";
+}
+
+p { margin: 0 }
+p + p { text-indent: 1.3em ; margin-top: 0.2em; }
+p.sidenote + p, p.caption, p.art { text-indent: 0 }
+
+p.author {
+  margin-top: 2em;
+  text-indent: 0;
+  text-align: right;
+}
+
+a { text-decoration: none; color: black }
+
+/* cross-references */
+
+a.pageref::after { content: " on page " target-counter(attr(href), page); }
+a.chapref::before { content: " Chapter " target-counter(attr(href), chapter) ", "; }
+a.figref { content: " Figure " target-counter(attr(href), figure); }
+a.tableref { content: " Table " target-counter(attr(href), figure); }
+a.listingref { content: " Listing " target-counter(attr(href), listing); }
+
+/* sidenotes */
+
+.sidenote {
+  float: left;
+  clear: left;
+  margin: 0 0 1em -41%;
+  width: 37%;
+  font-size: 0.9em;
+  font-style: normal;
+  text-indent: 0;
+  text-align: right;
+  page-break-inside: avoid;
+}
+
+/* sidebars */
+
+div.sidebar {
+  float: top-next;
+  margin: 1.2em 0 1.2em 0;
+  border: thin solid;
+  background: #CCC;
+  padding: 0.5em 1em;
+  page-break-inside: avoid;
+  column-count: 2;
+  column-gap: 1.5em;
+}
+
+div.sidebar h2 {
+  margin-top: 0;
+}
+
+/* frontpage */
+
+.title p{
+	font-size:22pt;
+  	font-family: "Gill Sans", sans-serif;
+  	text-align: center;
+}
+
+.copyright-section {
+	text-align: center;
+	font-size: 9pt;
+	page-break-after: always;
+	margin-top: 50pt;
+	margin-bottom: 20pt;
+}
+
+.toc-title {
+	font-size:18pt;
+  	font-family: "Gill Sans", sans-serif;
+  	text-align: left;
+  	margin-left:20pt;
+  	margin-bottom: 40pt;
+
+}
+
+/* figures, tables, and listings */
+
+div.confluenceTableSmall th.confluenceTh {
+  font-size: 11px;
+}
+
+div.confluenceTableSmall td.confluenceTd {
+  font-size: 7px;
+}
+
+div.figure {
+  margin: 1em 0;
+  counter-increment: figure;
+}
+
+div.figure .caption, div.table .caption {
+  font-size: 0.9em;
+  font-style: italic;
+}
+
+div.figure .caption::before {
+  content: "Figure " counter(figure) ". ";
+  font-weight: bold;
+  font-style: normal;
+}
+
+div.table .caption::before {
+  content: "Table " counter(table) ". ";
+  font-weight: bold;
+  font-style: normal;
+}
+
+div.table {
+  margin: 1em 0;
+  counter-increment: table;
+}
+
+div.table th {
+  text-align: left;
+}
+
+table th, table td {
+  text-align: left;
+  padding-right: 1em;
+  page-break-inside: avoid;
+}
+
+table th {
+  border-top: thin solid;
+  border-bottom: thin solid;
+  padding-top: 0.2em;
+  padding-bottom: 0.2em;
+}
+table td {
+  border-top: none;
+  border-bottom: thin dotted;
+  padding-top: 0.2em;
+  padding-bottom: 0.2em;
+}
+
+div.Scrollbar {
+	display: none;
+}
+
+
+/* Weird div.codeHeader a b::before would be a better selection
+   but prince does not properly match it.. Firefox does. */
+div.codeHeader::before {
+  content: "Listing " counter(listing) ". ";
+  font-weight: bold;
+  font-style: normal;
+}
+div.codeHeader a b {
+  font-style: italic;
+  font-weight: normal;
+}
+div.codeHeader {
+  font-size: 0.9em;
+  counter-increment: listing;
+}
+div.code {
+	border: 1px dashed #c0c0c0;
+    font-size: 12px;
+	font-family: Courier;
+    margin: 5px;
+	line-height: 13px;
+	padding: 3px;
+	background-color: #f8f8f8;
+
+}
+
+
+@page {
+  margin: 2cm;
+  size: 7in 9.25in;
+
+  @footnotes {
+    border-top: thin solid black;
+    padding-top: 0.3em;
+    margin-top: 0.6em;
+  }
+}
+
+
+/* define default page and names pages: cover, blank, frontmatter */
+div.page-reset {
+    counter-reset: page 1;
+}
+
+@page :left {
+  @top-left-corner {
+    font-weight: 900; font: 9pt "Gill Sans", serif;
+    content: counter(page);
+    text-align: left;
+    margin-left: 1cm;
+    visibility: hidden;
+  }
+  @top-left {
+    font-weight: 900;
+    font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em;
+    content: string(header, first);
+    visibility: hidden;
+  }
+  @bottom-left-corner {
+    font-weight: 900; font: 9pt "Gill Sans", serif;
+    content: counter(page);
+    text-align: left;
+    margin-left: 1cm;
+  }
+  @bottom-left {
+    font-weight: 900;
+    font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em;
+    content: string(header, first);
+  }
+}
+
+@page :right {
+  @top-right-corner {
+    font-weight: 900; font: 9pt "Gill Sans", serif;
+    content: counter(page);
+    text-align: left;
+    margin-left: 1cm;
+    visibility: hidden;
+  }
+  @top-right {
+    font-weight: 900;
+    font: 9pt "Gill Sans", serif; white-space: pre; text-transform: uppercase; letter-spacing: 0.1em;
+    content: string(header, first)
+    visibility: hidden;
+  }
+  @bottom-right-corner {
+    font-weight: 900; font: 9pt "Gill Sans", serif;
+    content: counter(page);
+    text-align: right;
+    margin-right: 1cm;
+  }
+  @bottom-right {
+    font-weight: 900; font: 9pt "Gill Sans", serif;
+    white-space: pre; text-transform: uppercase; letter-spacing: 0.1em;
+    content: string(header, first)
+  }
+}
+
+/*
+  In theory we should be able to use the :first selector so taht
+  we can put the page numbering on the bottom of the first page of the chapter
+  but have the rest of the pages number at the top.  But this does not seem
+  to work.  See http://www.princexml.com/doc/6.0/page-selectors/
+
+  So for now just always number at the bottom :(
+*/
+/*
+div.chapter { page: bottom-number; }
+@page bottom-number :first {
+  @top-left {
+    visibility: hidden;
+  }
+  @bottom-left {
+    visibility: visible;
+  }
+  @top-right {
+    visibility: hidden;
+  }
+  @bottom-right {
+    visibility: visible;
+  }
+}
+*/
+
+@page cover { margin: 0; }
+
+@page frontmatter :left {
+  @bottom-left-corner {
+    content: counter(page, lower-roman);
+  }
+  @bottom-left-corner {
+    content: counter(page, lower-roman);
+  }
+}
+
+@page frontmatter :right {
+  @bottom-right-corner {
+    content: counter(page, lower-roman);
+  }
+  @bottom-right-corner {
+    content: counter(page, lower-roman);
+  }
+}
+
+@page blank :left {
+  @top-left { visibility: hidden; }
+  @bottom-left { visibility: hidden; }
+  @top-left-corner { visibility: hidden; }
+  @bottom-left-corner { visibility: hidden; }
+}
+
+@page blank :right {
+  @top-right { visibility: hidden; }
+  @bottom-right { visibility: hidden; }
+  @top-right-corner { visibility: hidden; }
+  @bottom-right-corner { visibility: hidden; }
+}
+
+/* footnotes */
+.footnote {
+  display: none;                   /* default rule */
+
+  display: prince-footnote;        /* prince-specific rules */
+  position: footnote;
+  footnote-style-position: inside;
+
+  counter-increment: footnote;
+  margin-left: 1.4em;
+  font-size: 90%;
+  line-height: 1.4;
+}
+
+.footnote::footnote-call {
+  vertical-align: super;
+  font-size: 80%;
+}
+
+.footnote::footnote-marker {
+  vertical-align: super;
+  color: green;
+  padding-right: 0.4em;
+}
+
+/* Confluence contents to hide */
+#labels-section {
+	display: none;
+}
+#comments-section {
+	display: none;
+}
+#footer {
+	display: none;
+}
+.hidden {
+	display: none;
+}
+
+/*
+   A book consists of different types of sections. We propose to use
+   DIV elements with these class names:
+
+    frontcover
+    halftitlepage: contains the title of the book
+    titlepage: contains the title of the book, name of author(s) and publisher
+    imprint: left page with copyright, publisher, library printing information
+    dedication: right page with short dedication
+    foreword: written by someone other than the author(s)
+    toc: table of contents
+    preface: preface, including acknowledgements
+    chapter: each chapter is given its own DIV element
+    references: contains list of references
+    appendix: each appendix is given its own
+    bibliography
+    glossary
+    index
+    colophon: describes how the book was produced
+    backcover
+
+   A book will use several of the types listed above, but few books
+   will use all of them.
+*/
+
+/* which section uses which named page */
+
+div.halftitlepage, div.titlepage, div.imprint, div.dedication { page: blank }
+div.foreword, div.toc, div.preface { page: frontmatter }
+
+
+/* page breaks */
+div.frontcover, div.halftitlepage, div.titlepage { page-break-before: right }
+div.imprint { page-break-before: always; }
+div.chapter { page-break-before: always; }
+div.dedication, div.foreword, div.toc, div.preface, div.reference,
+div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
+  page-break-before: always
+}
+div.backcover { page-break-before: left }
+
+/* titlepage, halftitlepage */
+
+div.titlepage h1, div.halftitlepage h1 { margin-bottom: 2em; }
+div.titlepage h2, div.halftitlepage h2 { font-size: 1.2em; margin-bottom: 3em; }
+div.titlepage h3, div.halftitlepage h3 { font-size: 1em; margin-bottom: 3em; }
+div.titlepage p, div.halftitlepage p {
+  font-size: 1.4em;
+  font-weight: bold;
+  margin: 0; padding: 0;
+}
+
+
+/* TOC */
+
+ul.toc, ul.toc ul {
+  list-style-type: none;
+  margin: 0; padding: 0;
+  margin-left: 3cm;
+}
+ul.toc ul {
+  margin-left: 1em;
+  font-weight: normal;
+}
+ul.toc > li {
+  font-weight: bold;
+  margin-bottom: 0.5em;
+}
+ul.toc a::after {
+  content: leader('.') target-counter(attr(href), page);
+  font-style: normal;
+}
+ul.toc > li.frontmatter a::after {
+  content: leader('.') target-counter(attr(href), page, lower-roman);
+  font-style: normal;
+}
+ul.toc > li.endmatter a::after {
+  content: leader('.') target-counter(attr(href), page);
+  font-style: normal;
+}
+ul.toc > li.chapter::before {
+  content: "Chapter " counter(toc-chapter, decimal);
+  display: block;
+  margin: 1em 0 0.1em -2.5cm;
+  font-weight: normal;
+  counter-increment: toc-chapter;
+  page-break-after: avoid;
+}
+
+/* chapter numbers */
+
+div.chapter { counter-increment: chapter; }
+div.chapter h1::before {
+  text-transform: uppercase;
+  letter-spacing: 0.15em;
+  content: "Chapter  " counter(chapter) " \A\B0 \B0 \B0 \B0\A";
+  white-space: pre;
+  font-size: 50%;
+}
+
+div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::before {
+  content: normal; /* that is, none */
+}
+
+h1 { string-set: header content();}
+div.chapter h1 { string-set: header "Chapter " counter(chapter) " - " content(); }
+
+/* index */
+
+ul.index {
+  list-style-type: none;
+  margin: 0; padding: 0;
+  column-count: 2;
+  column-gap: 1em;
+}
+
+ul.index a::after { content: ", " target-counter(attr(href), page); }
+
+
+span.element, span.attribute {
+  text-transform: uppercase;
+  font-weight: bold;
+  font-size: 80%;
+}
+span.property { font-weight: bold }
+code, span.css, span.value, span.declaration {
+  font: 90% "Lucida Console", "Lucida Sans Typewriter", monospace;
+}
+
+
+@media screen, handheld {
+  html {font: 14px "Gill Sans", sans-serif; }
+  h1 { margin-bottom: 0.5em }
+  div.frontcover, div.halftitlepage, div.titlepage, div.imprint,
+  div.dedication, div.foreword, div.toc, div.index { display: none }
+  body {
+      margin: 0cm;
+      margin-left: 2cm;
+      margin-right: 2cm;
+  }
+}
+
+/*
+ * Enhancements to the take advantage of some of the style markup that
+ * Confluence generates
+ */
+a sup img { visibility: hidden; position: absolute;}
+
+img {
+  prince-image-resolution:150dpi;
+}
+
+table {
+  font: "Lucida Console", "Lucida Sans Typewriter", monospace;
+}
+
+table td {
+  font-size: 10pt;
+}
+
+pre {
+   white-space: pre-wrap;
+}
+
+.codeContent {
+  font-size: 80%;
+}
+.code {
+}
+.code-keyword {
+  color: #000091;
+  background-color: inherit;
+}
+
+.code-object {
+  color: #910091;
+  background-color: inherit;
+}
+
+.code-quote {
+  color: #009100;
+  background-color: inherit;
+}
+
+.code-comment {
+  color: #808080;
+  background-color: inherit;
+}
+
+
+.code-xml .code-keyword {
+  color: inherit;
+  font-weight: bold;
+}
+
+.code-tag {
+  color: #000091;
+  background-color: inherit;
+}
+
+.noteMacro { border-color: #F0C000; background-color: #FFFFCE;}
+.warningMacro { border-color: #CC0000; background-color: #FFCCCC }
+.infoMacro { border-color: #3c78b5; background-color: #D8E4F1; }
+.tipMacro { border-color: #090; background-color: #dfd;}
+.noteMacro, .warningMacro, .infoMacro, .tipMacro, .informationMacroPadding {
+  border: thin solid;
+  float: top-next;
+  margin: 1em 0 1.2em 0;
+  padding: 0.5em;
+  column-count: 2;
+  column-gap: 1.5em;
+  width: 100%;
+}
+table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro td, table.sectionMacro td {
+    border: none;
+}
+table.infoMacro p, table.warningMacro p, table.tipMacro p, table.noteMacro p, table.sectionMacro p {
+    font-size:x-small;
+    margin-top: 1em;
+}
+  </style>
+  <style type="text/css">
+.syntax .hll { background-color: #ffffcc }
+.syntax  { background: #f0f0f0; }
+.syntax .c { color: #60a0b0; font-style: italic } /* Comment */
+.syntax .err { border: 1px solid #FF0000 } /* Error */
+.syntax .k { color: #007020; font-weight: bold } /* Keyword */
+.syntax .o { color: #666666 } /* Operator */
+.syntax .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
+.syntax .cp { color: #007020 } /* Comment.Preproc */
+.syntax .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
+.syntax .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
+.syntax .gd { color: #A00000 } /* Generic.Deleted */
+.syntax .ge { font-style: italic } /* Generic.Emph */
+.syntax .gr { color: #FF0000 } /* Generic.Error */
+.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.syntax .gi { color: #00A000 } /* Generic.Inserted */
+.syntax .go { color: #808080 } /* Generic.Output */
+.syntax .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.syntax .gs { font-weight: bold } /* Generic.Strong */
+.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.syntax .gt { color: #0040D0 } /* Generic.Traceback */
+.syntax .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.syntax .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.syntax .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.syntax .kp { color: #007020 } /* Keyword.Pseudo */
+.syntax .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.syntax .kt { color: #902000 } /* Keyword.Type */
+.syntax .m { color: #40a070 } /* Literal.Number */
+.syntax .s { color: #4070a0 } /* Literal.String */
+.syntax .na { color: #4070a0 } /* Name.Attribute */
+.syntax .nb { color: #007020 } /* Name.Builtin */
+.syntax .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.syntax .no { color: #60add5 } /* Name.Constant */
+.syntax .nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.syntax .ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.syntax .ne { color: #007020 } /* Name.Exception */
+.syntax .nf { color: #06287e } /* Name.Function */
+.syntax .nl { color: #002070; font-weight: bold } /* Name.Label */
+.syntax .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.syntax .nt { color: #062873; font-weight: bold } /* Name.Tag */
+.syntax .nv { color: #bb60d5 } /* Name.Variable */
+.syntax .ow { color: #007020; font-weight: bold } /* Operator.Word */
+.syntax .w { color: #bbbbbb } /* Text.Whitespace */
+.syntax .mf { color: #40a070 } /* Literal.Number.Float */
+.syntax .mh { color: #40a070 } /* Literal.Number.Hex */
+.syntax .mi { color: #40a070 } /* Literal.Number.Integer */
+.syntax .mo { color: #40a070 } /* Literal.Number.Oct */
+.syntax .sb { color: #4070a0 } /* Literal.String.Backtick */
+.syntax .sc { color: #4070a0 } /* Literal.String.Char */
+.syntax .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.syntax .s2 { color: #4070a0 } /* Literal.String.Double */
+.syntax .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.syntax .sh { color: #4070a0 } /* Literal.String.Heredoc */
+.syntax .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.syntax .sx { color: #c65d09 } /* Literal.String.Other */
+.syntax .sr { color: #235388 } /* Literal.String.Regex */
+.syntax .s1 { color: #4070a0 } /* Literal.String.Single */
+.syntax .ss { color: #517918 } /* Literal.String.Symbol */
+.syntax .bp { color: #007020 } /* Name.Builtin.Pseudo */
+.syntax .vc { color: #bb60d5 } /* Name.Variable.Class */
+.syntax .vg { color: #bb60d5 } /* Name.Variable.Global */
+.syntax .vi { color: #bb60d5 } /* Name.Variable.Instance */
+.syntax .il { color: #40a070 } /* Literal.Number.Integer.Long */
+
+
+/* don't highlight errors */
+.syntax .err {
+  border: none;
+}
+
+.syntax {
+  font-size: .9em;
+  font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
+  background-color: #F8F8FF;
+
+  overflow:auto;
+  -moz-background-clip:border;
+  -moz-background-inline-policy:continuous;
+  -moz-background-origin:padding;
+  margin: 1em 0 1em 0;
+  border:1px solid #DDDDDD;
+
+  border-top-left-radius: 8px; -webkit-border-top-left-radius: 8px; -moz-border-radius-topleft: 8px;
+  border-top-right-radius: 8px; -webkit-border-top-right-radius: 8px; -moz-border-radius-topright: 8px;
+  border-style: solid;  border-width: 1px; border-color: #dedede !important;
+  padding: 1em;
+}
+.syntax .linenodiv  {
+  background-color:#ECECEC;
+  border-right:1px solid #DDDDDD;
+  color:#AAAAAA;
+  padding: .5em;
+  text-align:right;
+}
+.syntax .highlight  {
+}
+.syntax pre {
+  margin:0;
+}
+
+pre.syntax {
+  padding: .5em;
+  background-color: #F8F8FF; overflow:auto;
+}
+
+.syntax code {
+  font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
+  font-size: 10pt;
+}
+
+div.compare { width: 700px; }
+div.compare div.compare-left { float:left; width:340px; padding:5px; margin-top: 15px; }
+div.compare div.compare-right { float:right; width:340px; padding:5px; margin-top: 15px; }
+div.compare div h3 {
+  margin-left: 15px;
+  padding: 5px 15px;
+  display: inline;
+  font-size: .8em;
+  color: #666;
+
+  border-top: 1px solid #ccc; -moz-border-top-colors: #ccc white white #e5e5e5;
+  border-left: 1px solid #ccc; -moz-border-left-colors: #ccc white white #e5e5e5;
+  border-right: 1px solid #ccc;-moz-border-right-colors: #ccc white white #e5e5e5;
+  border-top-left-radius: 8px; -webkit-border-top-left-radius: 8px;  -moz-border-radius-topleft: 8px;
+  border-top-right-radius: 8px; -webkit-border-top-right-radius: 8px; -moz-border-radius-topright: 8px;
+}
+div.compare div div {
+  margin: 5px 0px 0px 0px;
+}
+.clear {
+  clear:both;
+}
+.wide div.compare div.compare-left { float:none; width:700px; }
+.wide div.compare div.compare-right { float:none; width:700px; }
+
+  </style>
+
+  <title>Apache Karaf 3.0.5 Guides</title>
+</head>
+<body>
+  <div id="titlepage">
+    <div id="title">Apache Karaf</div>
+    <div id="subtitle">Version 3.0.5</div>
+  </div>
+  <div id="main">
+    <div class="title"><p><img border="0" src="images/karaf-logos.png"/><br/><br/><br/><br/><br/><br/><br/><br/><br/>Apache Karaf<br/>Users' Guide<br/><br/><br/><br/><br/><br/><br/><br/></p></div><div class="copyright-section"><p>Copyright 2011 The Apache Software Foundation</p><p>The PDF format of the Karaf Manual has been generated by Prince XML (http://www.princexml.com).</p></div><div class="toc-title"><p>Table of contents</p></div><ol style="list-style: none;"><li><a href="#Overview.html">Overview</a></li><li><a href="#QuickStart.html">Quick Start</a></li><li><a href="#UsersGuide.html">Users Guide</a></li><li><a href="#DevelopersGuide.html">Developers Guide</a></li></ol><h1 id="Overview">Overview</h1><h1 id="ApacheKarafOverview">Apache Karaf Overview</h1><p>Apache Karaf is a OSGi-based runtime which provides a lightweight container onto which various components and applications can be deployed.</p><p>Apache Karaf uses either Apache Felix Framework or Eclipse Equinox OSGi framew
 orks, and provide additional features on top of the framework.</p><p>Apache Karaf can be scaled from a very lightweight container to a fully features enterprise service: it's a very flexible and extensible container, covering all the major needs.</p><p>Here is a short list of provided features:</p><ul><li><strong>Hot deployment</strong>: simply drop a file in the <tt>deploy</tt> directory, Apache Karaf will detect the type of the file and<p> try to deploy it.</p></li><li><strong>Complete Console</strong>: Apache Karaf provides a complete Unix-like console where you can completely manage the container.</li><li><strong>Dynamic Configuration</strong>: Apache Karaf provides a set of command dedicated for the management of the configuration files.<p> All configuration files are centralized in the <tt>etc</tt> folder. Any change in a configuration file is taken on the fly.</p></li><li><strong>Advanced Logging System</strong>: Apache Karaf supports a large set of Logging framework (slf4j, 
 log4j, etc). Whatever the<p> logging framework you use, Apache Karaf centralizes the configuration in one file.</p></li><li><strong>Provisioning</strong>: Apache Karaf supports a large set of URL where you can install your application (Maven repository, HTTP,<p> file, etc). It also provides the concept of "Karaf Feature" which is a way to describe your application.</p></li><li><strong>Management</strong>: Apache Karaf is an enterprise-ready container, providing a lot of management indicators and operations<p> via JMX.</p></li><li><strong>Remote</strong>: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also<p> accessible remotely.</p></li><li><strong>Security</strong>: Apache Karaf provides a complete security framework (based on JAAS), and providing RBAC (Role-Based Access<p> Control) mechanism for console and JMX.</p></li><li><strong>Instances</strong>: multiple instances of Apache Karaf can be managed directly from a main instan
 ce (root).</li><li><strong>OSGi frameworks</strong>: Apache Karaf is not tight to one OSGi framework. By default, Apache Karaf runs with Apache Felix<p> Framework, but you can easily switch to Equinox (just change on property in a configuration file).</p><p><img border="0" src="images/karaf.png"/></p></li></ul><h1 id="QuickStart">Quick Start</h1><h1 id="QuickStart">Quick Start</h1><p>This instructions should help you get Apache Karaf up and running in 5 to 15 minutes.</p><h2 id="Prerequisites">Prerequisites</h2><p>Karaf requires a Java SE 7 environment to run. Refer to <a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a> for details on how to download and install Java SE 1.7 or greater.</p><ul><li>Open a Web browser and access the following URL: <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a></li><li>Download the binary distribution that matches your syste
 m (zip for windows, tar.gz for unixes) </li><li>Extract the archive a new folder on your hard drive; for example in c:\karaf - from now on this directory will be referenced as &lt;KARAF_HOME>.</li></ul><h2 id="Starttheserver">Start the server</h2><p>Open a command line console and change the directory to &lt;KARAF_HOME>. </p><p>To start the server, run the following command in Windows:</p><pre>
+bin\karaf.bat
+</pre><p>respectively on Unix:</p><pre>
+bin/karaf
+</pre><p>You should see the following information on the command line console:</p><pre>
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+
+</pre><h2 id="SomeshellBasics">Some shell Basics</h2><p>You can now run your first command.  Simply type the <tt>&lt;tab></tt> key in the console.</p><pre>
+karaf@root> Display all 183 possibilities? (y or n)
+*:config                            *:dev                               *:feature                           *:instance                          *:jaas                              *:kar                               *:log                               *:package
+*:region                            *:service                           *:shell                             *:ssh                               addbundle                           addfilter                           addregion                           alias
+cancel                              cl                                  clear                               clone                               config                              config:cancel                       config:delete                       config:edit
+config:list                         config:property-append              config:property-delete              config:property-list                config:property-set                 config:update                       connect                             create
+date                                delete                              destroy                             dev                                 dev:dump-create                     display                             dump-create                         each
+...
+</pre><p>You can then grab more specific help for a given command using the <tt>--help</tt> option for this command:</p><pre>
+karaf@root()> bundle:list --help
+DESCRIPTION
+        bundle:list
+
+        Lists all installed bundles.
+
+SYNTAX
+        bundle:list [options]
+
+OPTIONS
+        -u
+                Shows the update locations
+        --help
+                Display this help message
+        --table
+                Show bundles using a shell table
+        -t
+                Specifies the bundle threshold; bundles with a start-level less than this value will not get printed out.
+        -l
+                Show the locations
+        -s
+                Shows the symbolic name
+
+</pre><p>Note that the console supports tab completion so if your start typing a command it will show possible completions and also auto complete if there is only one completion.</p><h2 id="Deployasampleapplication">Deploy a sample application</h2><p>While you will learn in the Karaf user's guide how to fully use and leverage Apache Karaf, let's install a sample <a href="http://camel.apache.org">Apache Camel</a> application for now:</p><p>In the console, run the following commands:</p><pre>
+karaf@root()> feature:repo-add camel 2.10.0
+Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.10.0/xml/features
+karaf@root()> feature:install camel-spring
+karaf@root()> bundle:install -s mvn:org.apache.camel/camel-example-osgi/2.10.1
+</pre><p>The example installed is using Camel to start a timer every 2 seconds and output a message on the console.<br/>The previous commands download the Camel features descriptor and install the example feature.</p><pre>
+>>>> SpringDSL set body:  Fri Jan 07 11:59:51 CET 2011
+>>>> SpringDSL set body:  Fri Jan 07 11:59:53 CET 2011
+>>>> SpringDSL set body:  Fri Jan 07 11:59:55 CET 2011
+
+</pre><h3 id="Stoppinganduninstallingthesampleapplication">Stopping and uninstalling the sample application</h3><p>To stop this demo, run the following command:</p><pre>
+karaf@root()> bundle:stop org.apache.camel.camel-example-osgi
+</pre><h2 id="StoppingKaraf">Stopping Karaf</h2><p>To stop Karaf from the console, enter <tt>^D</tt> in the console:</p><pre>
+^D
+</pre><p>Alternatively, you can also run the following command:</p><pre>
+system:shutdown
+</pre><h3 id="CleaningtheKarafstate">Cleaning the Karaf state</h3><p>Normally Karaf remembers the features and bundles you installed and started. The reset Karaf into a clean state just delete the data directory when karaf is not running.</p><h2 id="Summary">Summary</h2><p>This document showed how simple it is to have Apache Karaf up and running and install a simple Apache Camel application.</p><h1 id="UsersGuide">Users Guide</h1><h1 id="Installation">Installation</h1><p>Apache Karaf is a lightweight container, very easy to install and administrate, on both Unix and Windows platforms.</p><h2 id="Requirements">Requirements</h2><p><strong>Hardware:</strong></p><ul><li>50 MB of free disk space for the Apache Karaf binary distribution.</li></ul><p><strong>Operating Systems:</strong></p><ul><li>Windows: Windows 8, Windows 7, Windows 2003, Windows Vista, Windows XP SP2, Windows 2000.</li><li>Unix: RedHat Enterprise Linux, Debian, SuSE/OpenSuSE, CentOS, Fedora, Ubuntu, MacOS, AIX, HP-UX, S
 olaris, any Unix platform that supports Java.</li></ul><p><strong>Environment:</strong></p><ul><li>Java SE 1.7.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>The JAVA_HOME environment variable must be set to the directory where the Java runtime is installed,</li></ul><h2 id="UsingApacheKarafbinarydistributions">Using Apache Karaf binary distributions</h2><p>Apache Karaf is available in two distributions, both as a tar.gz and zip archives.</p><p>The "default" distribution is a "ready to use" distribution.<br/>The "default" distribution provides the following features enabled.</p><p>The "minimal" distribution is like the minimal distributions that you can find for most of Unix distributions.<br/>Only the core layer is packaged, most of the features and bundles are downloaded from Internet at bootstrap.<br/>It means that Apache Karaf minimal distribution requires an Internet connection to start correct
 ly.<br/>The features provided by the "minimal" distribution are exactly the same as in the "default" distribution, the difference<br/>is that the minimal distribution will download the features from Internet.</p><h3 id="InstallationonWindowsplatform">Installation on Windows platform</h3><p>NB: the JAVA_HOME environment variable has to be correctly defined. To accomplish that, press Windows key and Break key together, switch to "Advanced" tab and click on "Environment Variables".</p><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>.</li><li>Download Apache Karaf binary distribution in the zip format: <tt>apache-karaf-3.0.0.zip</tt>.</li><li>Extract the files from the zip file into a directory of your choice (it's the <tt>KARAF_HOME</tt>.<p>NB: remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Apache Karaf is now installed.</li></o
 l><div class="tip" style="border: 1px solid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Handy Hint</b></p><p>In case you have to install Karaf into a very deep path or a path containing illegal characters for Java paths, e.g. !, % etc., you may add a bat file to <em>start \-> startup</em> that executes</p><pre>subst S: "C:\your very % problematic path!\KARAF"
+</pre><p>so your Karaf root directory is S: <del>-</del> which works for sure and is short to type.</p></div><h3 id="InstallationonUnixplatforms">Installation on Unix platforms</h3><p>NB: the JAVA_HOME environment variable has to be correctly defined. Check the current value using</p><pre>
+echo $JAVA_HOME
+</pre><p>If it's not correct, fix it using:</p><pre>
+export JAVA_HOME=....
+</pre><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>.</li><li>Download Apache Karaf binary distribution in the tar.gz format: <tt>apache-karaf-3.0.0.tar.gz</tt>.</li><li>Extract the files from the tar.gz file into a directory of your choice (it's the <tt>KARAF_HOME</tt>). For example:<pre>
+gunzip apache-karaf-3.0.0.tar.gz
+tar xvf apache-karaf-3.0.0.tar
+</pre><p>NB: remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Apache Karaf is now installed.</li></ol><h2 id="PostInstallationsteps">Post-Installation steps</h2><p>Thought it is not always required, it is strongly advised to set up the <tt>JAVA_HOME</tt> environment property to point to the JDK you want Apache Karaf to use before starting it.<br/>This property is used to locate the <tt>java</tt> executable and should be configured to point to the home directory of the Java SE 7 installation.</p><p>By default, all Apache Karaf files are "gather" in one directory: the <tt>KARAF_HOME</tt>.</p><p>You can define your own directory layout, by using some Karaf environment variables:</p><ul><li><tt>KARAF_DATA</tt> is the location of the data folder, where Karaf stores temporary files.</li><li><tt>KARAF_ETC</tt> is the location of the etc folder, where Karaf stores configuration files.</li><li><tt>KARAF_BASE</tt> is the Karaf base folder. By d
 efault <tt>KARAF_BASE</tt> is the same as <tt>KARAF_HOME</tt>.</li></ul><h2 id="BuildingfromSources">Building from Sources</h2><p>If you intend to build Apache Karaf from the sources, the requirements are a bit different:</p><p><strong>Hardware:</strong></p><ul><li>500 MB of free disk space for the Apache Karaf source distributions or SVN checkout, the Maven build and the dependencies Maven downloads.</li></ul><p><strong>Environment:</strong></p><ul><li>Java SE Development Kit 1.7.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>Apache Maven 3.0.4 (<a href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a>).</li></ul><h3 id="BuildingonWindowsplatform">Building on Windows platform</h3><ol><li>You can get the Apache Karaf sources from:</li></ol><ul><li>the sources distribution <tt>apache-karaf-3.0.0-src.zip</tt> available at <a href="http://karaf.apache.org/index/community
 /download.html">http://karaf.apache.org/index/community/download.html</a>. Extract the files in the directory of your choice.</li><li>by checkout of the git repository:<pre>
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+</pre></li></ul><ol><li>Use Apache Maven to build Apache Karaf:<pre>
+mvn clean install
+</pre><p>NB: you can speed up the build by bypassing the unit tests:</p><pre>
+mvn clean install -DskipTests
+</pre></li><li>You can find the built binary distribution in <tt>assemblies\apache-karaf\target\apache-karaf-3.0.0.zip</tt>. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.</li></ol><h3 id="BuildingonUnixplatforms">Building on Unix platforms</h3><ol><li>You can get the Apache Karaf sources from:</li></ol><ul><li>the sources distribution <tt>apache-karaf-3.0.0-src.tar.gz</tt> available at <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>. Extract the files in the directory of your choice.</li><li>by checkout of the git repository:<pre>
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+</pre></li></ul><ol><li>Use Apache Maven to build Apache Karaf:<pre>
+mvn clean install
+</pre><p>NB: you can speed up the build by bypassing the unit tests:</p><pre>
+mvn clean install -DskipTests
+</pre></li><li>You can find the built binary distribution in <tt>assemblies/apache-karaf/target/apache-karaf-3.0.0.tar.gz</tt>. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.</li></ol><h1 id="Directorystructure">Directory structure</h1><p>The directory layout of a Karaf installation is as follows:</p><ul><li><tt>/bin</tt>: control scripts to start, stop, login, ...</li><li><tt>/etc</tt>: configuration files</li><li><tt>/data</tt>: working directory <ul><li><tt>/cache</tt>: OSGi framework bundle cache</li><li><tt>/generated-bundles</tt>: temporary folder used by the deployers</li><li><tt>/log</tt>: log files</li></ul></li><li><tt>/deploy</tt>: hot deploy directory</li><li><tt>/instances</tt>: directory containing <a href="users-guide/instances.html">instances</a></li><li><tt>/lib</tt>: contains the bootstrap libraries<ul><li><tt>/lib/ext</tt>: directory for JRE extensions</li><li><tt>/lib/endorsed</tt>: directory for endorsed librari
 es</li></ul></li><li><tt>/system</tt>: OSGi bundles repository, laid out as a Maven 2 repository</li></ul><div class="tip" style="border: 1px solid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p>The <tt>data</tt> folder contains all the working and temporary files for Karaf.<br/>If you want to restart from a clean state, you can wipe out this directory, which has the same effect as<br/><a href="start-stop#Starting Karaf from clean.html">using the clean option</a>.</p></div>	<h1 id="Startstoprestartconnect">Start, stop, restart, connect</h1><h2 id="Start">Start</h2><p>Apache Karaf supports different start mode:</p><ul><li>the "regular" mode starts Apache Karaf in foreground, including the shell console.</li><li>the "server" mode starts Apache Karaf in foreground, without the shell console.</li><li>the "background" mode starts Apache Karaf in background.</li></ul><p>You can also manage Apache Karaf as a system service (see <a href="users-guide/wrapper.html">Sys
 tem Service</a> section of this manual).</p><h3 id="Regularmode">Regular mode</h3><p>The regular mode uses the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows). It's the default start process.</p><p>It starts Apache Karaf as a foreground process, and displays the shell console.</p><p>On Unix:</p><pre>
+bin/karaf
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><h3 id="Servermode">Server mode</h3><p>The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.</p><p>To use this mode, you use the <tt>server</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf server
+
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat server
+
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Backgroundmode">Background mode</h3><p>The background mode starts Apache Karaf as a background process.</p><p>To start in background mode, you have to use <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/start
+</pre><p>On Windows:</p><pre>
+bin\start.bat
+</pre><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Cleanstart">Clean start</h3><p>Apache Karaf stores all previously applications installed and changes that you did in the data folder.</p><p>If you want to start from a clean state, you can remove the data folder.</p><p>For convenience, you can use the <tt>clean</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf clean
+</pre><pre>
+bin/start clean
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat clean
+</pre><pre>
+bin\start.bat clean
+</pre><h3 id="Customizevariables">Customize variables</h3><p>Apache Karaf accepts environment variables:</p><ul><li><tt>JAVA_MIN_MEM</tt>: minimum memory for the JVM (default is 128M).</li><li><tt>JAVA_MAX_MEM</tt>: maximum memory for the JVM (default is 512M).</li><li><tt>JAVA_PERM_MEM</tt>: minimum perm memory for the JVM (default is JVM default value).</li><li><tt>JAVA_MAX_PERM_MEM</tt>: maximum perm memory for the JVM (default is JVM default value).</li><li><tt>KARAF_HOME</tt>: the location of your Apache Karaf installation (default is found depending where you launch the startup script).</li><li><tt>KARAF_BASE</tt>: the location of your Apache Karaf base (default is <tt>KARAF_HOME</tt>).</li><li><tt>KARAF_DATA</tt>: the location of your Apache Karaf data folder (default is <tt>KARAF_BASE/data</tt>).</li><li><tt>KARAF_ETC</tt>: the location of your Apache Karaf etc folder (default is <tt>KARAF_BASE/etc</tt>).</li><li><tt>KARAF_OPTS</tt>: extra arguments passed to the Java comman
 d line (default is null).</li><li><tt>KARAF_DEBUG</tt>: if 'true', enable the debug mode (default is null). If debug mode is enabled, Karaf starts a JDWP socket on port 5005. You can plug your IDE to define breakpoints, and run step by step.</li></ul><p>You can define these environment variables in <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows).</p><p>For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:</p><p>On Unix:</p><pre>
+# Content of bin/setenv
+export JAVA_MIN_MEM=256M
+exoprt JAVA_MAX_MEM=1024M
+</pre><p>On Windows:</p><pre>
+rem Content of bin\setenv.bat
+set JAVA_MIN_MEM=256M
+set JAVA_MAX_MEM=1024M
+</pre><h3 id="Connect">Connect</h3><p>Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.<br/>This connection can be local or remote. It means that you can access to Karaf console remotely.</p><p>To connect to the console, you can use the <tt>bin/client</tt> Unix script (<tt>bin\client.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/client
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\client.bat
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>By default, <tt>client</tt> tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).</p><p><tt>client</tt> accepts different options to let you connect on a remote Apache Karaf instance. You can use <tt>--help</tt> to get details about the options:</p><p>On Unix:</p><pre>
+bin/client --help
+Apache Karaf client
+  -a [port]     specify the port to connect to
+  -h [host]     specify the host to connect to
+  -u [user]     specify the user name
+  --help        shows this help message
+  -v            raise verbosity
+  -r [attempts] retry connection establishment (up to attempts times)
+  -d [delay]    intra-retry delay (defaults to 2 seconds)
+  -b            batch mode, specify multiple commands via standard input
+  -f [file]     read commands from the specified file
+  [commands]    commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>On Windows:</p><pre>
+bin\client.bat --help
+Apache Karaf client
+  -a [port]     specify the port to connect to
+  -h [host]     specify the host to connect to
+  -u [user]     specify the user name
+  --help        shows this help message
+  -v            raise verbosity
+  -r [attempts] retry connection establishment (up to attempts times)
+  -d [delay]    intra-retry delay (defaults to 2 seconds)
+  -b            batch mode, specify multiple commands via standard input
+  -f [file]     read commands from the specified file
+  [commands]    commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>Actually, <tt>client</tt> is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.</p><p>For instance, on Unix, you can do:</p><pre>
+ssh karaf@localhost -p 8101
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><h2 id="Stop">Stop</h2><p>When you start Apache Karaf in regular mode, the <tt>logout</tt> command or CTRL-D key binding logout from the console and shutdown Apache Karaf.</p><p>When you start Apache Karaf in background mode (with the <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows)), you can use the <tt>bin/stop</tt> Unix script (<tt>bin\stop.bat</tt> on Windows).</p><p>More generally, you can use the <tt>shutdown</tt> command (on the Apache Karaf console) that work in any case.</p><p>The <tt>shutdown</tt> command is very similar to the the <tt>shutdown</tt> Unix command.</p><p>To shutdown Apache Karaf now, you can simple using <tt>shutdown</tt>:</p><pre>
+karaf@root()> shutdown -h
+Confirm: halt instance root (yes/no):
+</pre><p>The <tt>shutdown</tt> command asks for a confirmation. If you want to bypass the confirmation step, you can use the <tt>-f</tt> (<tt>--force</tt>) option:</p><pre>
+karaf@root()> shutdown -f
+</pre><p>You can also use directly <tt>halt</tt> which is an alias to <tt>shutdown -f -h</tt>.</p><p>The <tt>shutdown</tt> command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.</p><p>The time argument can have different formats. First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour<br/>(in two digits). Second, it can be in the format m (or +m), in which m is the number of minutes to wait. The word <tt>now</tt> is an alias for 0.</p><p>For instance, the following command will shutdown Apache Karaf at 10:35am:</p><pre>
+karaf@root()> system:shutdown 10:35
+</pre><p>Another example to shutdown Apache Karaf in 10 minutes:</p><pre>
+karaf@root()> system:shutdown 10
+</pre><p>Like for other commands, you can find details on the <tt>shutdown</tt> command man page:</p><pre>
+karaf@root()> shutdown --help
+DESCRIPTION
+        system:shutdown
+
+        Shutdown Karaf.
+
+SYNTAX
+        system:shutdown [options] [time]
+
+ARGUMENTS
+        time
+                Shutdown after a specified delay. The time argument can have different formats. First, it can be an abolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes to
+                wait. The word now is an alias for +0.
+
+OPTIONS
+        -c, --clean, --clean-all, -ca
+                Force a clean restart by deleting the data directory
+        -f, --force
+                Force the shutdown without confirmation message.
+        -h, --halt
+                Halt the Karaf container.
+        --help
+                Display this help message
+        -cc, --clean-cache, -cc
+                Force a clean restart by deleting the cache directory
+        -r, --reboot
+                Reboot the Karaf container.
+</pre><h2 id="Status">Status</h2><p>When you start Apache Karaf in background mode, you may want to check the current status.</p><p>To do so, you can use the <tt>bin/status</tt> Unix script (<tt>bin\status.bat</tt> on Windows).</p><p>NB: the script returns 0 exit code if Apache Karaf is running, 1 exit code else.</p><p>On Unix:</p><pre>
+bin/status
+Not Running ...
+</pre><pre>
+bin/status
+Running ...
+</pre><p>On Windows:</p><pre>
+bin\status.bat
+Not Running ...
+</pre><pre>
+bin\status.bat
+Running ...
+</pre><h2 id="Restart">Restart</h2><p>The <tt>shutdown</tt> command accepts the <tt>-r</tt> (<tt>--restart</tt>) option to restart Apache Karaf:</p><pre>
+karaf@root()> system:shutdown -r
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>This command does not start a new JVM. It simply restarts the OSGi framework.</p></div><h2 id="SystemMBean">SystemMBean</h2><p>Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.</p><p>The SystemMBean object name is <tt>org.apache.karaf:type=system</tt>.</p><p>The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:</p><ul><li><tt>reboot()</tt> reboots Apache Karaf now (without cleaning the cache)</li><li><tt>reboot(time)</tt> reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the <tt>shutdown</tt> command.</li><li><tt>rebootCleanCache(time)</tt> reboots Apache Karaf at a given time, including the cleanup of the cache.</li><li><tt>rebootCleanAll(time)</tt> reboots Apache Karaf at 
 a given time, including the cleanup of the whole data folder.</li><li><tt>halt()</tt> shutdown Apache Karaf now.</li><li><tt>halt(time)</tt> shutdown Apache Karaf at a given time. The time format is the same as the time argument of the <tt>shutdown</tt> command.</li></ul><h1 id="IntegrationintheoperatingsystemtheServiceWrapper">Integration in the operating system: the Service Wrapper</h1><p>In the previous chapter, we saw the different scripts and commands to start, stop, restart Apache Karaf.</p><p>Instead of using these commands and scripts, you can integrate Apache Karaf directly in your operating system service control.</p><p>Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate Apache Karaf:</p><ul><li>like a native Windows Service</li><li>like a Unix daemon process</li></ul><p>The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.
 </p><p>It also includes advanced fault detection software which monitors an application.<br/>The "Service Wrapper" is able to detect crashes, freezes, out of memory and other exception events, then automatically react by restarting Apache Karaf with a minimum of delay.<br/>It guarantees the maximum possible uptime of Apache Karaf.</p><h2 id="Supportedplatforms">Supported platforms</h2><ul><li>Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)</li><li>Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)</li><li>FreeBSD 9.x, 8.x</li><li>AIX 5.x, 6.x, 7.x (Power architecture)</li><li>Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)</li><li>HP-UX 10.x, 11.x (32 and 64 bits architecture)</li><li>SGI Irix</li><li>MacOS X</li></ul><h2 id="Installation">Installation</h2><p>Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.</p><p>In the console:</p><pre>
+karaf@root()> feature:install service-wrapper
+</pre><p>Now, you have the <tt>wrapper:install</tt> command, to "register" Apache Karaf as service/daemon on your system:</p><pre>
+karaf@root()> wrapper:install --help
+DESCRIPTION
+        wrapper:install
+
+        Install the container as a system service in the OS.
+
+SYNTAX
+        wrapper:install [options]
+
+OPTIONS
+        -d, --display
+                The display name of the service.
+                (defaults to karaf)
+        --help
+                Display this help message
+        -s, --start-type
+                Mode in which the service is installed. AUTO_START or DEMAND_START (Default: AUTO_START)
+                (defaults to AUTO_START)
+        -n, --name
+                The service name that will be used when installing the service. (Default: karaf)
+                (defaults to karaf)
+        -D, --description
+                The description of the service.
+                (defaults to )
+</pre><h2 id="Installation2">Installation</h2><p>Karaf Wrapper is an optional feature. To install it, simply type:</p><pre>
+karaf@root> feature:install wrapper
+</pre><p>Once installed, wrapper feature will provide <tt>wrapper:install</tt> new command in the Karaf shell:</p><pre>
+karaf@root> wrapper:install --help
+DESCRIPTION
+        wrapper:install
+
+        Install the container as a system service in the OS.
+
+SYNTAX
+        wrapper:install [options]
+
+OPTIONS
+        -s, --start-type
+                Mode in which the service is installed. AUTO_START or DEMAND_START (Default: AUTO_START)
+                (defaults to AUTO_START)
+        --help
+                Display this help message
+        -n, --name
+                The service name that will be used when installing the service. (Default: karaf)
+                (defaults to karaf)
+        -d, --display
+                The display name of the service.
+        -D, --description
+                The description of the service.
+                (defaults to )
+</pre><p>The <tt>wrapper:install</tt> command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.</p><p>For instance, on a Ubuntu/Debian Linux system:</p><pre>
+karaf@root()> wrapper:install
+Creating file: /opt/apache-karaf-3.0.5/bin/karaf-wrapper
+Creating file: /opt/apache-karaf-3.0.5/bin/karaf-service
+Creating file: /opt/apache-karaf-3.0.5/etc/karaf-wrapper.conf
+Creating file: /opt/apache-karaf-3.0.5/lib/libwrapper.so
+Creating file: /opt/apache-karaf-3.0.5/lib/karaf-wrapper.jar
+Creating file: /opt/apache-karaf-3.0.5/lib/karaf-wrapper-main.jar
+
+Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
+        /opt/apache-karaf-3.0.5/etc/karaf-wrapper.conf
+before installing and starting the service.
+
+
+Ubuntu/Debian Linux system detected:
+  To install the service:
+    $ ln -s /opt/apache-karaf-3.0.5/bin/karaf-service /etc/init.d/
+
+  To start the service when the machine is rebooted:
+    $ update-rc.d karaf-service defaults
+
+  To disable starting the service when the machine is rebooted:
+    $ update-rc.d -f karaf-service remove
+
+  To start the service:
+    $ /etc/init.d/karaf-service start
+
+  To stop the service:
+    $ /etc/init.d/karaf-service stop
+
+  To uninstall the service :
+    $ rm /etc/init.d/karaf-service
+
+</pre><p>You can note that <tt>wrapper:install</tt> command detected the running operating system ("Ubuntu/Debian Linux system detected").</p><p>You have a complete explanation and list of system commands to perform to integrate Apache Karaf in your systemV:</p><pre>
+ln -s /opt/apache-karaf-3.0.5/bin/karaf-service /etc/init.d/
+update-rc.d karaf-service defaults
+</pre><p>Karaf also supports systemd service, so you can use systemctl instead of SystemV based service:</p><pre>
+systemctl enable /opt/apache-karaf-3.0.5/bin/karaf.service
+</pre><p>This will enable Karaf at system boot.</p><h2 id="Uninstall">Uninstall</h2><p>The <tt>wrapper:install</tt> provides the system commands to perform to uninstall the service/daemon).</p><p>For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove the <tt>karaf-service</tt> script from the runlevel scripts:</p><pre>
+rm /etc/init.d/karaf-service
+</pre><p>If you prefered the systemd service instead of systemV:</p><pre>
+systemctl disable karaf
+</pre><p>You can remove the "Wrapper Service" installer after that:</p><pre>
+karaf@root()> feature:uninstall service-wrapper
+</pre><h2 id="NoteforMacOSusers">Note for MacOS users</h2><p>On MacOS you can install the service for an user or for the system.</p><p>If you want to add bin/org.apache.karaf.KARAF as user service move this file into ~/Library/LaunchAgents/:</p><pre>
+mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
+</pre><p>If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:</p><pre>
+sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
+</pre><p>Change owner and rights:</p><pre>
+sudo chown root:wheel /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+sudo chmod u=rw,g=r,o=r /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+</pre><p>You can test your service:</p><pre>
+launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
+launchctl start org.apache.karaf.KARAF
+launchctl stop org.apache.karaf.KARAF
+</pre><p>Finally, after restart your session or system you can use launchctl command to start and stop your service.</p><p>If you want to remove the service call:</p><pre>
+launchctl remove org.apache.karaf.KARAF
+</pre><h2 id="Configuration">Configuration</h2><p>When using scripts in the Apache Karaf <tt>bin</tt> folder, you can using <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows) as described in the <a href="users-guide/start-stop.html">Start, stop, restart, connect</a> section of the documentation.</p><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>The <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows) is not used by the Apache Karaf Service Wrapper.</p></div><p>To configure Apache Karaf started by the Service Wrapper, you have to tune the <tt>etc/karaf-wrapper.conf</tt> file. If you provided the <tt>name</tt> option to the <tt>wrapper:install</tt> command, the file is <tt>etc/karaf-yourname.conf</tt>.</p><p>In this file, you can configure the different environment variables used by Apache Karaf. The Service Wrapper installer automatically populate these variabl
 es for you during the installation (using <tt>wrapper:install</tt> command).<br/>For instance:</p><ul><li><tt>set.default.JAVA_HOME</tt> is the <tt>JAVA_HOME</tt> used to start Apache Karaf (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_HOME</tt> is the location of your Apache Karaf installation (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_BASE</tt> is the location of your Apache Karaf installation (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_DATA</tt> is the location of the Apache Karaf data folder (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_ETC</tt> is the location of the Apache Karaf etc folder (populated during Service Wrapper installation).</li><li><tt>wrapper.java.additional</tt> is used to pass additional arguments to the Java command, indexed by the argument number. The next index to use is 11.</li><li><tt>wrapper.java.initmemory</tt> is the 
 initial JVM memory size (the <tt>-Xms</tt>). It's not set by default (JVM default).</li><li><tt>wrapper.java.maxmemory</tt> is the maximum JVM memory size (the <tt>-Xmx</tt>). It's set to 512M by default.</li><li><tt>wrapper.logfile</tt> is the location of the Service Wrapper log file. It's set to <tt>%KARAF_DATA%/log/wrapper.log</tt> by default.</li><li><tt>wrapper.logfile.loglevel</tt> is the Service Wrapper log level. It's set to <tt>INFO</tt> by default.</li><li><tt>wrapper.logfile.maxsize</tt> is the Service Wrapper log file maximum size (before rotation). It's set to <tt>10m</tt> (10MB) by default.</li><li><tt>wrapper.logfile.maxfiles</tt> is the number of Service Wrapper log files created (and rotated). It's set to <tt>5</tt> by default.</li><li><tt>wrapper.syslog.loglevel</tt> is the integration with Unix syslog daemon. By default, it's set to <tt>none</tt> meaning disabled.</li><li><tt>wrapper.ntservice.name</tt> is Windows service specific and defines the Windows service n
 ame. It's set to the <tt>name</tt> option of the <tt>wrapper:install</tt> command, or <tt>karaf</tt> by default.</li><li><tt>wrapper.ntservice.displayname</tt> is Windows service specific and defines the Windows service display name. It's set to the <tt>display</tt> option of the <tt>wrapper:install</tt> command, or <tt>karaf</tt> by default.</li><li><tt>wrapper.ntservice.description</tt> is Windows service specific and defines the Windows service description. It's set to the <tt>description</tt> option of the <tt>wrapper:install</tt> command, or empty by default.</li><li><tt>wrapper.ntservice.starttype</tt> is Windows service specific and defines if the Windows service is started automatically with the service, or just on demand. It's set to <tt>AUTO_START</tt> by default, and could be switch to <tt>DEMAND_START</tt>.</li></ul><p>This is a example of generated <tt>etc/karaf-wrapper.conf</tt> file:</p><pre>
+# ------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ------------------------------------------------------------------------
+
+#********************************************************************
+# Wrapper Properties
+#********************************************************************
+set.default.JAVA_HOME=/opt/jdk/1.7.0_21
+set.default.KARAF_HOME=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.5-SNAPSHOT
+set.default.KARAF_BASE=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.5-SNAPSHOT
+set.default.KARAF_DATA=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.5-SNAPSHOT/data
+set.default.KARAF_ETC=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.5-SNAPSHOT/etc
+
+# Java Application
+wrapper.working.dir=%KARAF_BASE%
+wrapper.java.command=%JAVA_HOME%/bin/java
+wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
+wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
+wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
+wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar
+wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-wrapper-main.jar
+wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
+wrapper.java.library.path.1=%KARAF_HOME%/lib/
+
+# Application Parameters.  Add parameters as needed starting from 1
+#wrapper.app.parameter.1=
+
+# JVM Parameters
+# note that n is the parameter number starting from 1.
+wrapper.java.additional.1=-Dkaraf.home=%KARAF_HOME%
+wrapper.java.additional.2=-Dkaraf.base=%KARAF_BASE%
+wrapper.java.additional.3=-Dkaraf.data=%KARAF_DATA%
+wrapper.java.additional.4=-Dkaraf.etc=%KARAF_ETC%
+wrapper.java.additional.5=-Dcom.sun.management.jmxremote
+wrapper.java.additional.6=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.7=-Dkaraf.startRemoteShell=true
+wrapper.java.additional.8=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
+wrapper.java.additional.9=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
+
+# Uncomment to enable jmx
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
+
+# Uncomment to enable YourKit profiling
+#wrapper.java.additional.n=-Xrunyjpagent
+
+# Uncomment to enable remote debugging
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=3
+
+# Maximum Java Heap Size (in MB)
+wrapper.java.maxmemory=512
+
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console.  (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output.  (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=%KARAF_DATA%/log/wrapper.log
+
+# Format of output for the log file.  (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output.  (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+#  the log is rolled. Size is specified in bytes.  The default value
+#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
+#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=10m
+
+# Maximum number of rolled log files which will be allowed before old
+#  files are deleted.  The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=5
+
+# Log Level for sys/event log output.  (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=karaf
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+#  using this configuration file has been installed as a service.
+#  Please uninstall the service before modifying this section.  The
+#  service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=karaf
+
+# Display name of the service
+wrapper.ntservice.displayname=karaf
+
+# Description of the service
+wrapper.ntservice.description=
+
+# Service dependencies.  Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed.  AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+</pre><h3 id="SystemD">SystemD</h3><p>The Karaf service wrapper also support Linux SystemD service.</p><h1 id="Usingtheconsole">Using the console</h1><h2 id="Availablecommands">Available commands</h2><p>To see a list of the available commands in the console, you can use the <tt>help</tt>:</p><pre>
+karaf@root()> help
+COMMANDS
+bundle
+bundle:capabilities               Displays OSGi capabilities of a given bundles.
+bundle:classes                    Displays a list of classes contained in the bundle
+...
+</pre><p>You have the list of all commands with a short description.</p><p>You can use the tab key to get a quick list of all commands:</p><pre>
+karaf@root()> Display all 280 possibilities? (y or n)
+...
+</pre><h2 id="Subshellandcompletionmode">Subshell and completion mode</h2><p>The commands have a scope and a name. For instance, the command <tt>feature:list</tt> has <tt>feature</tt> as scope, and <tt>list</tt> as name.</p><p>Karaf "groups" the commands by scope. Each scope form a subshell.</p><p>You can directly execute a command with its full qualified name (scope:name):</p><pre>
+karaf@root()> feature:list
+...
+</pre><p>or enter in a subshell and type the command contextual to the subshell:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> list
+</pre><p>You can note that you enter in a subshell directly by typing the subshell name (here <tt>feature</tt>). You can "switch" directly from a subshell to another:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> bundle
+karaf@root(bundle)>
+</pre><p>The prompt displays the current subshell between ().</p><p>The <tt>exit</tt> command goes to the parent subshell:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> exit
+karaf@root()>
+</pre><p>The completion mode defines the behaviour of the tab key and the help command.</p><p>You have three different modes available:</p><ul><li>GLOBAL</li><li>FIRST</li><li>SUBSHELL</li></ul><p>You can define your default completion mode using the completionMode property in <tt>etc/org.apache.karaf.shell.cfg</tt> file. By default, you have:</p><pre>
+completionMode = GLOBAL
+</pre><p>You can also change the completion mode “on the fly” (while using the Karaf shell console) using the <tt>shell:completion</tt> command:</p><pre>
+karaf@root()> shell:completion
+GLOBAL
+karaf@root()> shell:completion FIRST
+karaf@root()> shell:completion
+FIRST
+</pre><p><tt>shell:completion</tt> can inform you about the current completion mode used. You can also provide the new completion mode that you want.</p><p>GLOBAL completion mode is the default one in Karaf 3.0.0 (mostly for transition purpose).</p><p>GLOBAL mode doesn’t really use subshell: it’s the same behavior as in previous Karaf versions.</p><p>When you type the tab key, whatever in which subshell you are, the completion will display all commands and all aliases:</p><pre>
+karaf@root()> &lt;TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> &lt;TAB>
+karaf@root(feature)> Display all 273 possibilities? (y or n)
+</pre><p>FIRST completion mode is an alternative to the GLOBAL completion mode.</p><p>If you type the tab key on the root level subshell, the completion will display the commands and the aliases from all subshells (as in GLOBAL mode).<br/>However, if you type the tab key when you are in a subshell, the completion will display only the commands of the current subshell:</p><pre>
+karaf@root()> shell:completion FIRST
+karaf@root()> &lt;TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> &lt;TAB>
+karaf@root(feature)>
+info install list repo-add repo-list repo-remove uninstall version-list
+karaf@root(feature)> exit
+karaf@root()> log
+karaf@root(log)> &lt;TAB>
+karaf@root(log)>
+clear display exception-display get log set tail
+</pre><p>SUBSHELL completion mode is the real subshell mode.</p><p>If you type the tab key on the root level, the completion displays the subshell commands (to go into a subshell), and the global aliases.<br/>Once you are in a subshell, if you type the TAB key, the completion displays the commands of the current subshell:</p><pre>
+karaf@root()> shell:completion SUBSHELL
+karaf@root()> &lt;TAB>
+karaf@root()>
+* bundle cl config dev feature help instance jaas kar la ld lde log log:list man package region service shell ssh system
+karaf@root()> bundle
+karaf@root(bundle)> &lt;TAB>
+karaf@root(bundle)>
+capabilities classes diag dynamic-import find-class headers info install list refresh requirements resolve restart services start start-level stop
+uninstall update watch
+karaf@root(bundle)> exit
+karaf@root()> camel
+karaf@root(camel)> &lt;TAB>
+karaf@root(camel)>
+backlog-tracer-dump backlog-tracer-info backlog-tracer-start backlog-tracer-stop context-info context-list context-start context-stop endpoint-list route-info route-list route-profile route-reset-stats
+route-resume route-show route-start route-stop route-suspend
+</pre><h2 id="Unixlikeenvironment">Unix like environment</h2><p>Karaf console provides a full Unix like environment.</p><h3 id="Helporman">Help or man</h3><p>We already saw the usage of the <tt>help</tt> command to display all commands available.</p><p>But you can also use the <tt>help</tt> command to get details about a command or <br/>the <tt>man</tt> command which is an alias to the <tt>help</tt> command.<br/>You can also use another form to get the command help, by using the <tt>--help</tt> option to the command.</p><p>So these commands </p><pre>
+karaf@root()> help feature:list
+karaf@root()> man feature:list
+karaf@root()> feature:list --help
+</pre><p>All produce the same help output:</p><pre>
+DESCRIPTION
+        feature:list
+
+        Lists all existing features available from the defined repositories.
+
+SYNTAX
+        feature:list [options]
+
+OPTIONS
+        --help
+                Display this help message
+        -o, --ordered
+                Display a list using alphabetical order
+        -i, --installed
+                Display a list of all installed features only
+        --no-format
+                Disable table rendered output
+
+</pre><h3 id="Completion">Completion</h3><p>When you type the tab key, Karaf tries to complete:</p><ul><li>subshell</li><li>commands</li><li>aliases</li><li>command arguments</li><li>command options</li></ul><h3 id="Alias">Alias</h3><p>An alias is another name associated to a given command.</p><p>The <tt>shell:alias</tt> command creates a new alias. For instance, to create the <tt>list-installed-features</tt> alias to the actual<br/><tt>feature:list -i</tt> command, you can do:</p><pre>
+karaf@root()> alias "list-features-installed = { feature:list -i }"
+karaf@root()> list-features-installed 
+Name       | Version  | Installed | Repository     | Description
+---------------------------------------------------------------------------------------------------------
+standard   | 3.0.0    | x         | standard-3.0.0 | Karaf standard feature
+config     | 3.0.0    | x         | standard-3.0.0 | Provide OSGi ConfigAdmin support
+region     | 3.0.0    | x         | standard-3.0.0 | Provide Region Support
+package    | 3.0.0    | x         | standard-3.0.0 | Package commands and mbeans
+kar        | 3.0.0    | x         | standard-3.0.0 | Provide KAR (KARaf archive) support
+ssh        | 3.0.0    | x         | standard-3.0.0 | Provide a SSHd server on Karaf
+management | 3.0.0    | x         | standard-3.0.0 | Provide a JMX MBeanServer and a set of MBeans in K
+</pre><p>At login, the Apache Karaf console reads the <tt>etc/shell.init.script</tt> file where you can create your aliases.<br/>It's similar to a bashrc or profile file on Unix.</p><pre>
+ld = { log:display $args } ;
+lde = { log:exception-display $args } ;
+la = { bundle:list -t 0 $args } ;
+ls = { service:list $args } ;
+cl = { config:list "(service.pid=$args)" } ;
+halt = { system:shutdown -h -f $args } ;
+help = { *:help $args | more } ;
+man = { help $args } ;
+log:list = { log:get ALL } ;
+</pre><p>You can see here the aliases available by default:</p><ul><li><tt>ld</tt> is a short form to display log (alias to <tt>log:display</tt> command)</li><li><tt>lde</tt> is a short form to display exceptions (alias to <tt>log:exception-display</tt> command)</li><li><tt>la</tt> is a short form to list all bundles (alias to <tt>bundle:list -t 0</tt> command)</li><li><tt>ls</tt> is a short form to list all services (alias to <tt>service:list</tt> command)</li><li><tt>cl</tt> is a short form to list all configurations (alias to <tt>config:list</tt> command)</li><li><tt>halt</tt> is a short form to shutdown Apache Karaf (alias to <tt>system:shutdown -h -f</tt> command)</li><li><tt>help</tt> is a short form to display help (alias to <tt>*:help</tt> command)</li><li><tt>man</tt> is the same as help (alias to <tt>help</tt> command)</li><li><tt>log:list</tt> displays all loggers and level (alias to <tt>log:get ALL</tt> command)</li></ul><p>You can create your own aliases in the <tt>etc/
 shell.init.script</tt> file.</p><h3 id="Keybinding">Key binding</h3><p>Like on most Unix environment, Karaf console support some key bindings:</p><ul><li>the arrows key to navigate in the commands history</li><li>CTRL-D to logout/shutdown Karaf</li><li>CTRL-R to search previously executed command</li><li>CTRL-U to remove the current line</li></ul><h3 id="Pipe">Pipe</h3><p>You can pipe the output of one command as input to another one. It's a pipe, using the | character:</p><pre>
+karaf@root()> feature:list | grep -i war
+war                           | 3.0.0  |           | standard-3.0.0          | Turn Karaf as a full WebContainer
+</pre><h3 id="Grepmorefind...">Grep, more, find, ...</h3><p>Karaf console provides some core commands similar to Unix environment:</p><ul><li><tt>shell:head</tt> displays the first line of the input</li><li><tt>shell:source</tt> executes commands contained in a script</li><li><tt>shell:alias</tt> creates an alias to an existing command</li><li><tt>shell:history</tt> prints the commands history</li><li><tt>shell:cat</tt> displays the content of a file or URL</li><li><tt>shell:if</tt> allows you to use conditions (if, then, else blocks) in script</li><li><tt>shell:tac</tt> captures stdin and returns it as a string</li><li><tt>shell:clear</tt> clears the current console display</li><li><tt>shell:info</tt> prints various information about the current Karaf instance</li><li><tt>shell:tail</tt> displays the last lines of the input</li><li><tt>shell:completion</tt> displays or change the current completion mode</li><li><tt>shell:java</tt> executes a Java application</li><li><tt>shell:threa
 ds</tt> prints the current thread</li><li><tt>shell:date</tt> displays the current date (optionally using a format)</li><li><tt>shell:watch</tt> periodically executes a command and refresh the output</li><li><tt>shell:each</tt> executes a closure on a list of arguments</li><li><tt>shell:more</tt> is a file pager</li><li><tt>shell:wc</tt> prints newline, words, and byte counts for each file</li><li><tt>shell:env</tt> gets/sets the value of a shell session variable</li><li><tt>shell:echo</tt> echoes and prints arguments to stdout</li><li><tt>shell:new</tt> creates a new Java object</li><li><tt>shell:edit</tt> calls a text editor on the current file or URL</li><li><tt>shell:printf</tt> formats and prints arguments</li><li><tt>shell:exec</tt> executes a system command</li><li><tt>shell:sleep</tt> sleeps for a bit then wakes up</li><li><tt>shell:grep</tt> prints lines matching the given pattern</li><li><tt>shell:sort</tt> writes sorted concatenation of all files to stdout</li></ul><p>You
  don't have to use the fully qualified name of the command, you can directly use the command name as long as it is unique.<br/>So you can use 'head' instead of 'shell:head'</p><p>Again, you can find details and all options of these commands using <tt>help</tt> command or <tt>--help</tt> option.</p><h3 id="Scripting">Scripting</h3><p>The Apache Karaf Console supports a complete scripting language, similar to bash or csh on Unix.</p><p>The <tt>each</tt> (<tt>shell:each</tt>) command can iterate in a list:</p><pre>
+karaf@root()> list = [1 2 3]; each ($list) { echo $it }
+1
+2
+3
+</pre><p>You can create the list yourself (as in the previous example), or some commands can return a list too.</p><p>We can note that the console created a "session" variable with the name <tt>list</tt> that you can access with <tt>$list</tt>.</p><p>The <tt>$it</tt> variable is an implicit one corresponding to the current object (here the current iterated value from the<br/>list).</p><p>When you create a list with <tt>[]</tt>, Apache Karaf console creates a Java ArrayList. It means that you can use methods<br/>available in the ArrayList objects (like get or size for instance):</p><pre>
+karaf@root()> list = ["Hello" world]; echo ($list get 0) ($list get 1)
+Hello world
+</pre><p>We can note here that calling a method on an object is directly using <tt>(object method argument)</tt>.<br/>Here <tt>($list get 0)</tt> means <tt>$list.get(0)</tt> where <tt>$list</tt> is the ArrayList.</p><p>The <tt>class</tt> notation will display details about the object:</p><pre>
+karaf@root()> $list class
+...
+ProtectionDomain     ProtectionDomain  null
+ null
+ &lt;no principals>
+ java.security.Permissions@6521c24e (
+ ("java.security.AllPermission" "&lt;all permissions>" "&lt;all actions>")
+)
+
+
+Signers              null
+SimpleName           ArrayList
+TypeParameters       [E]
+</pre><p>You can "cast" a variable to a given type.</p><pre>
+karaf@root()> ("hello world" toCharArray)
+[h, e, l, l, o,  , w, o, r, l, d]
+</pre><p>If it fails, you will see the casting exception:</p><pre>
+karaf@root()> ("hello world" toCharArray)[0]
+Error executing command: [C cannot be cast to [Ljava.lang.Object;
+</pre><p>You can "call" a script using the <tt>shell:source</tt> command:</p><pre>
+karaf@root> shell:source script.txt
+True!
+</pre><p>where <tt>script.txt</tt> contains:</p><pre>
+foo = "foo"
+if { $foo equals "foo" } {
+  echo "True!"
+}
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p>The spaces are important when writing script.<br/>For instance, the following script is not correct:</p><pre>
+if{ $foo equals "foo" } ...
+</pre><p>and will fail with:</p><pre>
+karaf@root> shell:source script.txt
+Error executing command: Cannot coerce echo "true!"() to any of []
+</pre><p>because a space is missing after the <tt>if</tt> statement.</p></div><p>As for the aliases, you can create init scripts in the <tt>etc/shell.init.script</tt> file.<br/>You can also named you script with an alias. Actually, the aliases are just scripts.</p><p>See the Scripting section of the developers guide for details.</p><h2 id="Security">Security</h2><p>The Apache Karaf console supports a Role Based Access Control (RBAC) security mechanism. It means that depending of<br/>the user connected to the console, you can define, depending of the user's groups and roles, the permission to execute<br/>some commands, or limit the values allowed for the arguments.</p><p>Console security is detailed in the <a href="users-guide/security.html">Security section</a> of this user guide.</p><h1 id="Remote">Remote</h1><p>Apache Karaf supports a complete remote mechanism allowing you to remotely connect to a running Apache Karaf instance.<br/>More over, you can also browse, download, and upl
 oad files remotely to a running Apache Karaf instance.</p><p>Apache Karaf embeds a complete SSHd server.</p><h2 id="SSHdserver">SSHd server</h2><p>When you start Apache Karaf, it enables a remote console that can be accessed over SSH.</p><p>This remote console provides all the features of the "local" console, and gives a remote user complete control over the<br/>container and services running inside of it. As the "local" console, the remote console is secured by a RBAC mechanism<br/>(see the <a href="users-guide/security.html">Security section</a> of the user guide for details).</p><p>In addition of the remote console, Apache Karaf also provides a remote filesystem. This remote filesystem can be accessed<br/>using a SCP/SFTP client.</p><h3 id="Configuration">Configuration</h3><p>The configuration of the SSHd server is stored in the <tt>etc/org.apache.karaf.shell.cfg</tt> file:</p><pre>
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+
+#
+# These properties are used to configure Karaf's ssh shell.
+#
+
+#
+# Via sshPort and sshHost you define the address you can login into Karaf.
+#
+sshPort = 8101
+sshHost = 0.0.0.0
+
+#
+# The sshIdleTimeout defines the inactivity timeout to logout the SSH session.
+# The sshIdleTimeout is in milliseconds, and the default is set to 30 minutes.
+#
+sshIdleTimeout = 1800000
+
+#
+# sshRealm defines which JAAS domain to use for password authentication.
+#
+sshRealm = karaf
+
+#
+# The location of the hostKey file defines where the private/public key of the server
+# is located. If no file is at the defined location it will be ignored.
+#
+hostKey = ${karaf.etc}/host.key
+
+
+#
+# Self defined key size in 1024, 2048, 3072, or 4096
+# If not set, this defaults to 4096.
+#
+# keySize = 4096
+
+#
+# Specify host key algorithm, defaults to RSA
+#
+# algorithm = RSA
+
+#
+# Defines the completion mode on the Karaf shell console. The possible values are:
+# - GLOBAL: it's the same behavior as in previous Karaf releases. The completion displays all commands and all aliases
+#           ignoring if you are in a subshell or not.
+# - FIRST: the completion displays all commands and all aliases only when you are not in a subshell. When you are
+#          in a subshell, the completion displays only the commands local to the subshell.
+# - SUBSHELL: the completion displays only the subshells on the root level. When you are in a subshell, the completion
+#             displays only the commands local to the subshell.
+# This property define the default value when you use the Karaf shell console.
+# You can change the completion mode directly in the shell console, using shell:completion command.
+#
+completionMode = GLOBAL

[... 2267 lines stripped ...]



Mime
View raw message