You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/01/04 10:57:28 UTC
[01/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Repository: karaf
Updated Branches:
refs/heads/master 68186c454 -> 3de05ae9a
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/wrapper.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/wrapper.conf b/manual/src/main/webapp/users-guide/wrapper.conf
deleted file mode 100644
index 6b49126..0000000
--- a/manual/src/main/webapp/users-guide/wrapper.conf
+++ /dev/null
@@ -1,395 +0,0 @@
-h1. Integration in the operating system: the Service Wrapper
-
-In the previous chapter, we saw the different scripts and commands to start, stop, restart Apache Karaf.
-
-Instead of using these commands and scripts, you can integrate Apache Karaf directly in your operating system service control.
-
-Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate Apache Karaf:
-
-* like a native Windows Service
-* like a Unix daemon process
-
-The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.
-
-It also includes advanced fault detection software which monitors an application.
-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.
-It guarantees the maximum possible uptime of Apache Karaf.
-
-h2. Supported platforms
-
-* Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)
-* Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)
-* FreeBSD 9.x, 8.x
-* AIX 5.x, 6.x, 7.x (Power architecture)
-* Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)
-* HP-UX 10.x, 11.x (32 and 64 bits architecture)
-* SGI Irix
-* MacOS X
-
-h2. Installation
-
-Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.
-
-In the console:
-
-{code}
-karaf@root()> feature:install service-wrapper
-{code}
-
-Now, you have the {{wrapper:install}} command, to "register" Apache Karaf as service/daemon on your system:
-
-{code}
-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 )
-{code}
-
-h2. Installation
-
-Karaf Wrapper is an optional feature. To install it, simply type:
-
-{code}
-karaf@root> feature:install wrapper
-{code}
-
-Once installed, wrapper feature will provide {{wrapper:install}} new command in the Karaf shell:
-
-{code}
-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 )
-{code}
-
-The {{wrapper:install}} command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.
-
-For instance, on a Ubuntu/Debian Linux system:
-
-{code}
-karaf@root()> wrapper:install
-Creating file: /opt/apache-karaf-4.0.0/bin/karaf-wrapper
-Creating file: /opt/apache-karaf-4.0.0/bin/karaf-service
-Creating file: /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
-Creating missing directory: /opt/apache-karaf-4.0.0/lib/wrapper
-Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/libwrapper.so
-Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper.jar
-Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper-main.jar
-
-Setup complete. You may wish to tweak the JVM properties in the wrapper configuration file:
- /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
-before installing and starting the service.
-
-
-Ubuntu/Debian Linux system detected:
- To install the service:
- $ ln -s /opt/apache-karaf-4.0.0/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
-
-{code}
-
-NB: you can install the wrapper without starting Karaf using bin/shell wrapper:install command.
-
-You can note that {{wrapper:install}} command detected the running operating system ("Ubuntu/Debian Linux system detected").
-
-You have a complete explanation and list of system commands to perform to integrate Apache Karaf in your systemV:
-
-{code}
-ln -s /opt/apache-karaf-4.0.0/bin/karaf-service /etc/init.d/
-update-rc.d karaf-service defaults
-{code}
-
-Karaf also supports systemd service, so you can use systemctl instead of SystemV based service:
-
-{code}
-systemctl enable /opt/apache-karaf-4.0.2/bin/karaf.service
-{code}
-
-This will enable Karaf at system boot.
-
-h2. Uninstall
-
-The {{wrapper:install}} provides the system commands to perform to uninstall the service/daemon).
-
-For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove the {{karaf-service}} script from the runlevel scripts:
-
-{code}
-rm /etc/init.d/karaf-service
-{code}
-
-If you prefered the systemd service instead of systemV:
-
-{code}
-systemctl disable karaf
-{code}
-
-You can remove the "Wrapper Service" installer after that:
-
-{code}
-karaf@root()> feature:uninstall service-wrapper
-{code}
-
-h2. Note for MacOS users
-
-On MacOS you can install the service for an user or for the system.
-
-If you want to add bin/org.apache.karaf.KARAF as user service move this file into ~/Library/LaunchAgents/:
-
-{code}
-mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
-{code}
-
-If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:
-
-{code}
-sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
-{code}
-
-Change owner and rights:
-
-{code}
-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
-{code}
-
-You can test your service:
-
-{code}
-launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
-launchctl start org.apache.karaf.KARAF
-launchctl stop org.apache.karaf.KARAF
-{code}
-
-Finally, after restart your session or system you can use launchctl command to start and stop your service.
-
-If you want to remove the service call:
-
-{code}
-launchctl remove org.apache.karaf.KARAF
-{code}
-
-h2. Configuration
-
-When using scripts in the Apache Karaf {{bin}} folder, you can using {{bin/setenv}} Unix script ({{bin\setenv.bat}} on Windows) as described in the [Start, stop, restart, connect|start-stop] section of the documentation.
-
-{warning:title=Warning}
-The {{bin/setenv}} Unix script ({{bin\setenv.bat}} on Windows) is not used by the Apache Karaf Service Wrapper.
-{warning}
-
-To configure Apache Karaf started by the Service Wrapper, you have to tune the {{etc/karaf-wrapper.conf}} file. If you provided the {{name}} option to the {{wrapper:install}} command, the file is {{etc/karaf-yourname.conf}}.
-
-In this file, you can configure the different environment variables used by Apache Karaf. The Service Wrapper installer automatically populate these variables for you during the installation (using {{wrapper:install}} command).
-For instance:
-
-* {{set.default.JAVA_HOME}} is the {{JAVA_HOME}} used to start Apache Karaf (populated during Service Wrapper installation).
-* {{set.default.KARAF_HOME}} is the location of your Apache Karaf installation (populated during Service Wrapper installation).
-* {{set.default.KARAF_BASE}} is the location of your Apache Karaf installation (populated during Service Wrapper installation).
-* {{set.default.KARAF_DATA}} is the location of the Apache Karaf data folder (populated during Service Wrapper installation).
-* {{set.default.KARAF_ETC}} is the location of the Apache Karaf etc folder (populated during Service Wrapper installation).
-* {{wrapper.java.additional}} is used to pass additional arguments to the Java command, indexed by the argument number. The next index to use is 11.
-* {{wrapper.java.initmemory}} is the initial JVM memory size (the {{-Xms}}). It's not set by default (JVM default).
-* {{wrapper.java.maxmemory}} is the maximum JVM memory size (the {{-Xmx}}). It's set to 512M by default.
-* {{wrapper.logfile}} is the location of the Service Wrapper log file. It's set to {{%KARAF_DATA%/log/wrapper.log}} by default.
-* {{wrapper.logfile.loglevel}} is the Service Wrapper log level. It's set to {{INFO}} by default.
-* {{wrapper.logfile.maxsize}} is the Service Wrapper log file maximum size (before rotation). It's set to {{10m}} (10MB) by default.
-* {{wrapper.logfile.maxfiles}} is the number of Service Wrapper log files created (and rotated). It's set to {{5}} by default.
-* {{wrapper.syslog.loglevel}} is the integration with Unix syslog daemon. By default, it's set to {{none}} meaning disabled.
-* {{wrapper.ntservice.name}} is Windows service specific and defines the Windows service name. It's set to the {{name}} option of the {{wrapper:install}} command, or {{karaf}} by default.
-* {{wrapper.ntservice.displayname}} is Windows service specific and defines the Windows service display name. It's set to the {{display}} option of the {{wrapper:install}} command, or {{karaf}} by default.
-* {{wrapper.ntservice.description}} is Windows service specific and defines the Windows service description. It's set to the {{description}} option of the {{wrapper:install}} command, or empty by default.
-* {{wrapper.ntservice.starttype}} is Windows service specific and defines if the Windows service is started automatically with the service, or just on demand. It's set to {{AUTO_START}} by default, and could be switch to {{DEMAND_START}}.
-
-This is a example of generated {{etc/karaf-wrapper.conf}} file:
-
-{code}
-# ------------------------------------------------------------------------
-# 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=/opt/apache-karaf-4.0.0
-set.default.KARAF_BASE=/opt/apache-karaf-4.0.0
-set.default.KARAF_DATA=/opt/apache-karaf-4.0.0/data
-set.default.KARAF_ETC=/opt/apache-karaf-4.0.0/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
-{code}
-
-h3. systemd
-
-The Karaf service wrapper also support Linux systemd service.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 37eacf8..486eb6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2175,10 +2175,6 @@
<exclude>**/foo</exclude>
<exclude>**/org.ops4j.pax.exam.TestContainerFactory</exclude>
<exclude>**/maven-metadata-local.xml</exclude>
- <!--manual resources -->
- <exclude>**/*.css</exclude>
- <exclude>**/*.ssp</exclude>
- <exclude>**/*.conf</exclude>
<!-- test manifests -->
<exclude>**/*.mf</exclude>
<!-- test json files -->
[16/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/configugration.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/configugration.adoc b/manual/src/main/asciidoc/user-guide/configugration.adoc
new file mode 100644
index 0000000..7226849
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/configugration.adoc
@@ -0,0 +1,384 @@
+//
+// Licensed 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.
+//
+
+== Configuration
+
+=== Files
+
+Apache Karaf stores and loads all configuration in files located in the `etc` folder.
+
+By default, the `etc` folder is located relatively to the `KARAF_BASE` folder. You can define another location
+using the `KARAF_ETC` variable.
+
+Each configuration is identified by a ID (the ConfigAdmin PID). The configuration files name follows the `pid.cfg`
+name convention.
+
+For instance, `etc/org.apache.karaf.shell.cfg` means that this file is the file used by the configuration with
+`org.apache.karaf.shell` as PID.
+
+A configuration file is a properties file containing key/value pairs:
+
+----
+property=value
+----
+
+In Apache Karaf, a configuration is PID with a set of properties attached.
+
+Apache Karaf automatically loads all `*.cfg` files from the `etc` folder.
+
+You can configure the behaviour of the configuration files using some dedicated properties in the
+`etc/config.properties` configuration file:
+
+----
+...
+#
+# Configuration FileMonitor properties
+#
+felix.fileinstall.enableConfigSave = true
+felix.fileinstall.dir = ${karaf.etc}
+felix.fileinstall.filter = .*\\.cfg
+felix.fileinstall.poll = 1000
+felix.fileinstall.noInitialDelay = true
+felix.fileinstall.log.level = 3
+felix.fileinstall.log.default = jul
+...
+----
+
+* `felix.fileinstall.enableConfigSave` flush back in the configuration file the changes performed directly on the
+configuration service (ConfigAdmin). If `true`, any change (using `config:*` commands, MBeans, OSGi service) is
+persisted back in the configuration false. Default is `true`.
+* `felix.fileinstall.dir` is the directory where Apache Karaf is looking for configuration files. Default is `${karaf.etc`}
+meaning the value of the `KARAF_ETC` variable.
+* `felix.fileinstall.filter` is the file name pattern used to load only some configuration files. Only files matching
+the pattern will be loaded. Default value is `.*\\.cfg` meaning *.cfg files.
+* `felix.fileinstall.poll` is the polling interval (in milliseconds). Default value is `1000` meaning that Apache
+Karaf "re-loads" the configuration files every second.
+* `felix.fileinstall.noInitialDelay` is a flag indicating if the configuration file polling starts as soon as Apache
+Karaf starts or wait for a certain time. If `true`, Apache Karaf polls the configuration files as soon as the configuration
+service starts.
+* `felix.fileinstall.log.level` is the log message verbosity level of the configuration polling service. More
+this value is high, more verbose the configuration service is.
+* `felix.fileinstall.log.default` is the logging framework to use, `jul` meaning Java Util Logging.
+
+You can change the configuration at runtime by directly editiing the configuration file.
+
+You can also do the same using the `config:*` commands or the ConfigMBean.
+
+=== `config:*` commands
+
+Apache Karaf provides a set of commands to manage the configuration.
+
+==== `config:list`
+
+`config:list` displays the list of all configurations available, or the properties in a given configuration (PID).
+
+Without the `query` argument, the `config:list` command display all configurations, with PID, attached bundle and
+properties defined in the configuration:
+
+----
+karaf@root()> config:list
+----------------------------------------------------------------
+Pid: org.apache.karaf.service.acl.command.system.start-level
+BundleLocation: mvn:org.apache.karaf.shell/org.apache.karaf.shell.console/4.0.0
+Properties:
+ service.guard = (&(osgi.command.scope=system)(osgi.command.function=start-level))
+ * = *
+ start-level = admin # admin can set any start level, including < 100
+ start-level[/[^0-9]*/] = viewer # viewer can obtain the current start level
+ execute[/.*/,/[^0-9]*/] = viewer # viewer can obtain the current start level
+ execute = admin # admin can set any start level, including < 100
+ service.pid = org.apache.karaf.service.acl.command.system.start-level
+ start-level[/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
+ execute[/.*/,/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ service.pid = org.apache.karaf.log
+ size = 500
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+...
+----
+
+The `query` argument accepts a query using a LDAP syntax.
+
+For instance, you can display details on one specific configuration using the following filter:
+
+----
+karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ service.pid = org.apache.karaf.log
+ size = 500
+----
+
+==== `config:edit`
+
+`config:edit` is the first command to do when you want to change a configuration. `config:edit` command put you
+in edition mode for a given configuration.
+
+For instance, you can edit the `org.apache.karaf.log` configuration:
+
+----
+karaf@root()> config:edit org.apache.karaf.log
+----
+
+The `config:edit` command doesn't display anything, it just puts you in configuration edit mode. You are now ready
+to use other config commands (like `config:property-append`, `config:property-delete`, `config:property-set`, ...).
+
+If you provide a configuration PID that doesn't exist yet, Apache Karaf will create a new configuration (and so a new
+configuration file) automatically.
+
+All changes that you do in configuration edit mode are store in your console session: the changes are not directly
+applied in the configuration. It allows you to "commit" the changes (see `config:update` command) or "rollback" and
+cancel your changes (see `config:cancel` command).
+
+==== `config:property-list`
+
+The `config:property-list` lists the properties for the currently edited configuration.
+
+Assuming that you edited the `org.apache.karaf.log` configuration, you can do:
+
+----
+karaf@root()> config:property-list
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ service.pid = org.apache.karaf.log
+ size = 500
+----
+
+==== `config:property-set`
+
+The `config:property-set` command update the value of a given property in the currently edited configuration.
+
+For instance, to change the value of the `size` property of previously edited `org.apache.karaf.log` configuration,
+you can do:
+
+----
+karaf@root()> config:property-set size 1000
+karaf@root()> config:property-list
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ service.pid = org.apache.karaf.log
+ size = 1000
+----
+
+If the property doesn't exist, the `config:property-set` command creates the property.
+
+You can use `config:property-set` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
+
+----
+karaf@root()> config:property-set -p org.apache.karaf.log size 1000
+karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ service.pid = org.apache.karaf.log
+ size = 1000
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+----
+
+[NOTE]
+====
+Using the `pid` option, you bypass the configuration commit and rollback mechanism.
+====
+
+==== `config:property-append`
+
+The `config:property-append` is similar to `config:property-set` command, but instead of completely replacing the
+property value, it appends a string at the end of the property value.
+
+For instance, to add 1 at the end of the value of the `size` property in `org.apache.karaf.log` configuration
+(and so have 5001 for the value instead of 500), you can do:
+
+----
+karaf@root()> config:property-append size 1
+karaf@root()> config:property-list
+ service.pid = org.apache.karaf.log
+ size = 5001
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+----
+
+Like the `config:property-set` command, if the property doesn't exist, the `config:property-set` command creates
+the property.
+
+You can use the `config:property-append` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
+
+----
+karaf@root()> config:property-append -p org.apache.karaf.log size 1
+karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ service.pid = org.apache.karaf.log
+ size = 5001
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+----
+
+[NOTE]
+====
+Using the `pid` option, you bypass the configuration commit and rollback mechanism.
+====
+
+==== `config:property-delete`
+
+The `config:property-delete` command delete a property in the currently edited configuration.
+
+For instance, you previously added a `test` property in `org.apache.karaf.log` configuration. To delete this `test`
+property, you do:
+
+----
+karaf@root()> config:property-set test test
+karaf@root()> config:property-list
+ service.pid = org.apache.karaf.log
+ size = 500
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+ test = test
+karaf@root()> config:property-delete test
+karaf@root()> config:property-list
+ service.pid = org.apache.karaf.log
+ size = 500
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+----
+
+You can use the `config:property-delete` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
+
+----
+karaf@root()> config:property-delete -p org.apache.karaf.log test
+----
+
+==== `config:update` and `config:cancel`
+
+When you are in the configuration edit mode, all changes that you do using `config:property*` commands are stored in "memory"
+(actually in the console session).
+
+Thanks to that, you can "commit" your changes using the `config:update` command. The `config:update` command will
+commit your changes, update the configuration, and (if possible) update the configuration files.
+
+For instance, after changing `org.apache.karaf.log` configuration with some `config:property*` commands, you have
+to commit your change like this:
+
+----
+karaf@root()> config:edit org.apache.karaf.log
+karaf@root()> config:property-set test test
+karaf@root()> config:update
+karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ service.pid = org.apache.karaf.log
+ size = 500
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+ test = test
+----
+
+On the other hand, if you want to "rollback" your changes, you can use the `config:cancel` command. It will cancel all
+changes that you did, and return of the configuration state just before the `config:edit` command. The `config:cancel`
+exits from the edit mode.
+
+For instance, you added the test property in the `org.apache.karaf.log` configuration, but it was a mistake:
+
+----
+karaf@root()> config:edit org.apache.karaf.log
+karaf@root()> config:property-set test test
+karaf@root()> config:cancel
+karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
+----------------------------------------------------------------
+Pid: org.apache.karaf.log
+BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
+Properties:
+ service.pid = org.apache.karaf.log
+ size = 500
+ pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+ felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
+----
+
+==== `config:delete`
+
+The `config:delete` command completely delete an existing configuration. You don't have to be in edit mode to delete
+a configuration.
+
+For instance, you added `my.config` configuration:
+
+----
+karaf@root()> config:edit my.config
+karaf@root()> config:property-set test test
+karaf@root()> config:update
+karaf@root()> config:list "(service.pid=my.config)"
+----------------------------------------------------------------
+Pid: my.config
+BundleLocation: null
+Properties:
+ service.pid = my.config
+ test = test
+----
+
+You can delete the `my.config` configuration (including all properties in the configuration) using the `config:delete`
+command:
+
+----
+karaf@root()> config:delete my.config
+karaf@root()> config:list "(service.pid=my.config)"
+karaf@root()>
+----
+
+==== `config:meta`
+
+The `config:meta` command lists the meta type information related to a given configuration.
+
+It allows you to get details about the configuration properties: key, name, type, default value, and description:
+
+----
+karaf@root()> config:meta -p org.apache.karaf.log
+Meta type informations for pid: org.apache.karaf.log
+key | name | type | default | description
+---------------------------------------------------------------------------------------------------------------------------------------
+size | Size | int | 500 | size of the log to keep in memory
+pattern | Pattern | String | %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n | Pattern used to display log entries
+----
+
+=== JMX ConfigMBean
+
+On the JMX layer, you have a MBean dedicated to the management of the configurations: the ConfigMBean.
+
+The ConfigMBean object name is: `org.apache.karaf:type=config,name=*`.
+
+==== Attributes
+
+The `Configs` attribute is a list of all configuration PIDs.
+
+==== Operations
+
+* `listProperties(pid)` returns the list of properties (property=value formatted) for the configuration `pid`.
+* `deleteProperty(pid, property)` deletes the `property` from the configuration `pid`.
+* `appendProperty(pid, property, value)` appends `value` at the end of the value of the `property` of the configuration `pid`.
+* `setProperty(pid, property, value)` sets `value` for the value of the `property` of the configuration `pid`.
+* `delete(pid)` deletes the configuration identified by the `pid`.
+* `create(pid)` creates an empty (without any property) configuration with `pid`.
+* `update(pid, properties)` updates a configuration identified with `pid` with the provided `properties` map.
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/console.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/console.adoc b/manual/src/main/asciidoc/user-guide/console.adoc
new file mode 100644
index 0000000..efcb8e1
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/console.adoc
@@ -0,0 +1,460 @@
+//
+// Licensed 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.
+//
+
+== Using the console
+
+=== Available commands
+
+To see a list of the available commands in the console, you can use the `help`:
+
+----
+karaf@root()> help
+bundle Enter the subshell
+bundle:capabilities Displays OSGi capabilities of a given bundles.
+bundle:classes Displays a list of classes/resources contained in the bundle
+bundle:diag Displays diagnostic information why a bundle is not Active
+bundle:dynamic-import Enables/disables dynamic-import for a given bundle.
+bundle:find-class Locates a specified class in any deployed bundle
+bundle:headers Displays OSGi headers of a given bundles.
+bundle:id Gets the bundle ID.
+...
+----
+
+You have the list of all commands with a short description.
+
+You can use the tab key to get a quick list of all commands:
+
+----
+karaf@root()> Display all 294 possibilities? (y or n)
+...
+----
+
+=== Subshell and completion mode
+
+The commands have a scope and a name. For instance, the command `feature:list` has `feature` as scope, and `list` as name.
+
+Karaf "groups" the commands by scope. Each scope form a subshell.
+
+You can directly execute a command with its full qualified name (scope:name):
+
+----
+karaf@root()> feature:list
+...
+----
+
+or enter in a subshell and type the command contextual to the subshell:
+
+----
+karaf@root()> feature
+karaf@root(feature)> list
+----
+
+You can note that you enter in a subshell directly by typing the subshell name (here `feature`). You can "switch" directly from a subshell to another:
+
+----
+karaf@root()> feature
+karaf@root(feature)> bundle
+karaf@root(bundle)>
+----
+
+The prompt displays the current subshell between ().
+
+The `exit` command goes to the parent subshell:
+
+----
+karaf@root()> feature
+karaf@root(feature)> exit
+karaf@root()>
+----
+
+The completion mode defines the behaviour of the tab key and the help command.
+
+You have three different modes available:
+
+* GLOBAL
+* FIRST
+* SUBSHELL
+
+You can define your default completion mode using the completionMode property in `etc/org.apache.karaf.shell.cfg` file. By default, you have:
+
+----
+completionMode = GLOBAL
+----
+
+You can also change the completion mode “on the fly” (while using the Karaf shell console) using the `shell:completion` command:
+
+----
+karaf@root()> shell:completion
+GLOBAL
+karaf@root()> shell:completion FIRST
+karaf@root()> shell:completion
+FIRST
+----
+
+`shell:completion` can inform you about the current completion mode used. You can also provide the new completion mode that you want.
+
+GLOBAL completion mode is the default one in Karaf 4.0.0 (mostly for transition purpose).
+
+GLOBAL mode doesn’t really use subshell: it’s the same behavior as in previous Karaf versions.
+
+When you type the tab key, whatever in which subshell you are, the completion will display all commands and all aliases:
+
+----
+karaf@root()> <TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> <TAB>
+karaf@root(feature)> Display all 273 possibilities? (y or n)
+----
+
+FIRST completion mode is an alternative to the GLOBAL completion mode.
+
+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).
+However, if you type the tab key when you are in a subshell, the completion will display only the commands of the current subshell:
+
+----
+karaf@root()> shell:completion FIRST
+karaf@root()> <TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> <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)> <TAB>
+karaf@root(log)>
+clear display exception-display get log set tail
+----
+
+SUBSHELL completion mode is the real subshell mode.
+
+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.
+Once you are in a subshell, if you type the TAB key, the completion displays the commands of the current subshell:
+
+----
+karaf@root()> shell:completion SUBSHELL
+karaf@root()> <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)> <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)> <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
+----
+
+=== Unix like environment
+
+Karaf console provides a full Unix like environment.
+
+==== Help or man
+
+We already saw the usage of the `help` command to display all commands available.
+
+But you can also use the `help` command to get details about a command or
+the `man` command which is an alias to the `help` command.
+You can also use another form to get the command help, by using the `--help` option to the command.
+
+So these commands
+
+----
+karaf@root()> help feature:list
+karaf@root()> man feature:list
+karaf@root()> feature:list --help
+----
+
+All produce the same help output:
+
+----
+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
+
+----
+
+==== Completion
+
+When you type the tab key, Karaf tries to complete:
+
+* subshell
+* commands
+* aliases
+* command arguments
+* command options
+
+==== Alias
+
+An alias is another name associated to a given command.
+
+The `shell:alias` command creates a new alias. For instance, to create the `list-installed-features` alias to the actual
+`feature:list -i` command, you can do:
+
+----
+karaf@root()> alias "list-features-installed = { feature:list -i }"
+karaf@root()> list-features-installed
+Name | Version | Required | State | Repository | Description
+------------------------------------------------------------------------------------------------------------------------------
+feature | 4.0.0 | x | Started | standard-4.0.0 | Features Support
+shell | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell
+deployer | 4.0.0 | x | Started | standard-4.0.0 | Karaf Deployer
+bundle | 4.0.0 | x | Started | standard-4.0.0 | Provide Bundle support
+config | 4.0.0 | x | Started | standard-4.0.0 | Provide OSGi ConfigAdmin support
+diagnostic | 4.0.0 | x | Started | standard-4.0.0 | Provide Diagnostic support
+instance | 4.0.0 | x | Started | standard-4.0.0 | Provide Instance support
+jaas | 4.0.0 | x | Started | standard-4.0.0 | Provide JAAS support
+log | 4.0.0 | x | Started | standard-4.0.0 | Provide Log support
+package | 4.0.0 | x | Started | standard-4.0.0 | Package commands and mbeans
+service | 4.0.0 | x | Started | standard-4.0.0 | Provide Service support
+system | 4.0.0 | x | Started | standard-4.0.0 | Provide System support
+kar | 4.0.0 | x | Started | standard-4.0.0 | Provide KAR (KARaf archive) support
+ssh | 4.0.0 | x | Started | standard-4.0.0 | Provide a SSHd server on Karaf
+management | 4.0.0 | x | Started | standard-4.0.0 | Provide a JMX MBeanServer and a set of MBeans in
+----
+
+At login, the Apache Karaf console reads the `etc/shell.init.script` file where you can create your aliases.
+It's similar to a bashrc or profile file on Unix.
+
+----
+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 } ;
+----
+
+You can see here the aliases available by default:
+
+* `ld` is a short form to display log (alias to `log:display` command)
+* `lde` is a short form to display exceptions (alias to `log:exception-display` command)
+* `la` is a short form to list all bundles (alias to `bundle:list -t 0` command)
+* `ls` is a short form to list all services (alias to `service:list` command)
+* `cl` is a short form to list all configurations (alias to `config:list` command)
+* `halt` is a short form to shutdown Apache Karaf (alias to `system:shutdown -h -f` command)
+* `help` is a short form to display help (alias to `*:help` command)
+* `man` is the same as help (alias to `help` command)
+* `log:list` displays all loggers and level (alias to `log:get ALL` command)
+
+You can create your own aliases in the `etc/shell.init.script` file.
+
+==== Key binding
+
+Like on most Unix environment, Karaf console support some key bindings:
+
+* the arrows key to navigate in the commands history
+* CTRL-D to logout/shutdown Karaf
+* CTRL-R to search previously executed command
+* CTRL-U to remove the current line
+
+==== Pipe
+
+You can pipe the output of one command as input to another one. It's a pipe, using the | character:
+
+----
+karaf@root()> feature:list |grep -i war
+pax-war | 4.1.4 | | Uninstalled | org.ops4j.pax.web-4.1.4 | Provide support of a full WebContainer
+pax-war-tomcat | 4.1.4 | | Uninstalled | org.ops4j.pax.web-4.1.4 |
+war | 4.0.0 | | Uninstalled | standard-4.0.0 | Turn Karaf as a full WebContainer
+blueprint-web | 4.0.0 | | Uninstalled | standard-4.0.0 | Provides an OSGI-aware Servlet ContextListener fo
+----
+
+==== Grep, more, find, ...
+
+Karaf console provides some core commands similar to Unix environment:
+
+* `shell:alias` creates an alias to an existing command
+* `shell:cat` displays the content of a file or URL
+* `shell:clear` clears the current console display
+* `shell:completion` displays or change the current completion mode
+* `shell:date` displays the current date (optionally using a format)
+* `shell:each` executes a closure on a list of arguments
+* `shell:echo` echoes and prints arguments to stdout
+* `shell:edit` calls a text editor on the current file or URL
+* `shell:env` displays or sets the value of a shell session variable
+* `shell:exec` executes a system command
+* `shell:grep` prints lines matching the given pattern
+* `shell:head` displays the first line of the input
+* `shell:history` prints the commands history
+* `shell:if` allows you to use conditions (if, then, else blocks) in script
+* `shell:info` prints various information about the current Karaf instance
+* `shell:java` executes a Java application
+* `shell:less` file pager
+* `shell:logout` disconnects shell from current session
+* `shell:more` is a file pager
+* `shell:new` creates a new Java object
+* `shell:printf` formats and prints arguments
+* `shell:sleep` sleeps for a bit then wakes up
+* `shell:sort` writes sorted concatenation of all files to stdout
+* `shell:source` executes commands contained in a script
+* `shell:stack-traces-print` prints the full stack trace in the console when the execution of a command throws an exception
+* `shell:tac` captures the STDIN and returns it as a string
+* `shell:tail` displays the last lines of the input
+* `shell:threads` prints the current thread
+* `shell:watch` periodically executes a command and refresh the output
+* `shell:wc` prints newline, words, and byte counts for each file
+* `shell:while` loop while the condition is true
+
+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.
+So you can use 'head' instead of 'shell:head'
+
+Again, you can find details and all options of these commands using `help` command or `--help` option.
+
+==== Scripting
+
+The Apache Karaf Console supports a complete scripting language, similar to bash or csh on Unix.
+
+The `each` (`shell:each`) command can iterate in a list:
+
+----
+karaf@root()> list = [1 2 3]; each ($list) { echo $it }
+1
+2
+3
+----
+
+[NOTE]
+====
+The same loop could be written with the `shell:while` command:
+
+----
+karaf@root()> a = 0 ; while { %((a+=1) <= 3) } { echo $a }
+1
+2
+3
+----
+====
+
+You can create the list yourself (as in the previous example), or some commands can return a list too.
+
+We can note that the console created a "session" variable with the name `list` that you can access with `$list`.
+
+The `$it` variable is an implicit one corresponding to the current object (here the current iterated value from the
+list).
+
+When you create a list with `[]`, Apache Karaf console creates a Java ArrayList. It means that you can use methods
+available in the ArrayList objects (like get or size for instance):
+
+----
+karaf@root()> list = ["Hello" world]; echo ($list get 0) ($list get 1)
+Hello world
+----
+
+We can note here that calling a method on an object is directly using `(object method argument)`.
+Here `($list get 0)` means `$list.get(0)` where `$list` is the ArrayList.
+
+The `class` notation will display details about the object:
+
+----
+karaf@root()> $list class
+...
+ProtectionDomain ProtectionDomain null
+ null
+ <no principals>
+ java.security.Permissions@6521c24e (
+ ("java.security.AllPermission" "<all permissions>" "<all actions>")
+)
+
+
+Signers null
+SimpleName ArrayList
+TypeParameters [E]
+----
+
+You can "cast" a variable to a given type.
+
+----
+karaf@root()> ("hello world" toCharArray)
+[h, e, l, l, o, , w, o, r, l, d]
+----
+
+If it fails, you will see the casting exception:
+
+----
+karaf@root()> ("hello world" toCharArray)[0]
+Error executing command: [C cannot be cast to [Ljava.lang.Object;
+----
+
+You can "call" a script using the `shell:source` command:
+
+----
+karaf@root> shell:source script.txt
+True!
+----
+
+where `script.txt` contains:
+
+----
+foo = "foo"
+if { $foo equals "foo" } {
+ echo "True!"
+}
+----
+
+[NOTE]
+====
+The spaces are important when writing script.
+For instance, the following script is not correct:
+
+----
+if{ $foo equals "foo" } ...
+----
+
+and will fail with:
+
+----
+karaf@root> shell:source script.txt
+Error executing command: Cannot coerce echo "true!"() to any of []
+----
+
+because a space is missing after the `if` statement.
+====
+
+As for the aliases, you can create init scripts in the `etc/shell.init.script` file.
+You can also named you script with an alias. Actually, the aliases are just scripts.
+
+See the Scripting section of the developers guide for details.
+
+=== Security
+
+The Apache Karaf console supports a Role Based Access Control (RBAC) security mechanism. It means that depending of
+the user connected to the console, you can define, depending of the user's groups and roles, the permission to execute
+some commands, or limit the values allowed for the arguments.
+
+Console security is detailed in the link:security[Security section] of this user guide.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/deployers.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/deployers.adoc b/manual/src/main/asciidoc/user-guide/deployers.adoc
new file mode 100644
index 0000000..63bdd18
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/deployers.adoc
@@ -0,0 +1,235 @@
+//
+// Licensed 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.
+//
+
+== Deployers
+
+The following picture describes the architecture of the deployers.
+
+Apache Karaf polls the `deploy` folder for new files.
+
+You can configure the location of the `deploy` folder, and the polling behaviour in the `etc/org.apache.felix.fileinstall-deploy.cfg`
+configuration file:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+felix.fileinstall.dir = ${karaf.base}/deploy
+felix.fileinstall.tmpdir = ${karaf.data}/generated-bundles
+felix.fileinstall.poll = 1000
+felix.fileinstall.start.level = 80
+felix.fileinstall.active.level = 80
+felix.fileinstall.log.level = 3
+----
+
+* `felix.fileinstall.dir` defines the location of the `deploy` folder. Default value is `KARAF_BASE/deploy`.
+* `felix.fileinstall.tmpdir` defines a temporary folder where the deployers store their files. Default value is `KARAF_DATA/generated-bundles`.
+* `felix.fileinstall.poll` defines the polling interval (in milliseconds). Default value is 1 second.
+
+When Apache Karaf polls a file from the `deploy` folder, it "delegates" the file handling to a deployer.
+
+By default, Apache Karaf provides a set of deployers:
+
+* Blueprint deployer is able to handle Blueprint XML files.
+* Spring deployer is able to handle Spring XML files.
+* Features deployer is able to handle Apache Karaf features XML files (see [Provisioning section|provisioning] for details).
+* KAR deployer is able to handle KAR files (see [KAR section|kar] for details).
+* Wrap deployer is able to handle non-OSGi jar files and turns it as OSGi bundles "on the fly".
+* Optionally, WAR deployer (if you install the war feature) is able to handle WAR files.
+
+=== Blueprint deployer
+
+The Blueprint deployer is able to handle plain Blueprint XML configuration files.
+
+The Blueprint deployer is able to transform "on the fly" any Blueprint XML file into valid OSGi bundle.
+
+The generated OSGi MANIFEST will contain the following headers:
+
+----
+Manifest-Version: 2
+Bundle-SymbolicName: [name of the file]
+Bundle-Version: [version of the file]
+Import-Package: [required packages]
+DynamicImport-Package: *
+----
+
+The `name` and `version` of the file are extracted using a heuristic that will match common patterns.
+
+For example `my-config-1.0.1.xml` will lead to `name = my-config` and `version = 1.0.1`.
+
+The default imported packages are extracted from the spring file definition and includes all classes referenced directly.
+
+If you need to customize the generated manifest, you can do so by including an xml element in your blueprint configuration:
+
+----
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
+ Require-Bundle= my-bundle
+ </manifest>
+----
+
+=== Spring deployer
+
+The Spring deployer is similar to the Blueprint deployer.
+
+The Spring deployer is able to deploy Spring XML files.
+
+Like the Blueprint deployer, the generated OSGi MANIFEST will contain the following headers:
+
+----
+Manifest-Version: 2
+Bundle-SymbolicName: [name of the file]
+Bundle-Version: [version of the file]
+Spring-Context: *;publish-context:=false;create-asynchronously:=true
+Import-Package: [required packages]
+DynamicImport-Package: *
+----
+
+If you need to customize the generated manifest, you can do so by including a XML element in your Spring configuration:
+
+----
+<spring:beans ...>
+ <manifest xmlns="http://karaf.apache.org/xmlns/deployer/spring/v1.0.0">
+ Require-Bundle= my-bundle
+ </manifest>
+----
+
+=== Features deployer
+
+See the link:provisioning[Provisioning section] for details.
+
+=== KAR deployer
+
+See the link:kar[KAR section] for details.
+
+=== War deployer
+
+The installation of the WAR feature enables a WAR deployer.
+
+It means that with the war feature installed, Apache Karaf is a complete OSGi WebContainer (like Tomcat) where
+you can deploy WAB (WebApplication Bundle) or pure WAR (WebApplication aRchive).
+
+You can install the war feature with:
+
+----
+karaf@root()> feature:install war
+----
+
+The WAR deployer supports:
+
+* WAB files
+* WAR files
+* exploded WAR (as a directory named `*.war`).
+
+The only requirement of the WAR deployer is that the archive contains the `WEB-INF/web.xml` file.
+
+=== Wrap deployer
+
+The wrap deployer allows you to "hot deploy" non-OSGi jar files ("classical" jar files) from the deploy folder.
+
+The wrap deployer creates "on the fly" an OSGi bundle with a non-OSGi jar file.
+
+The wrap deployer looks for jar files in the deploy folder. A jar file is considered as non-OSGi if the MANIFEST doesn't
+contain the `Bundle-SymbolicName` and `Bundle-Version` attributes, or if there is no MANIFEST at all.
+
+The wrap deployer "transforms" non-OSGi jar file into an OSGi bundle.
+
+The wrap deployer tries to populate the Bundle-SymbolicName and Bundle-Version extracted from the jar file path.
+
+For example, if you simply copy commons-lang-2.3.jar (which is not an OSGi bundle) into the deploy folder, you
+will see:
+
+----
+karaf@root()> la|grep -i commons-lang
+80 | Active | 80 | 2.3 | commons-lang
+----
+
+If you take a look on the commons-lang headers, you can see that the bundle exports all packages with optional resolution
+and that `Bundle-SymbolicName` and `Bundle-Version` have been populated:
+
+----
+karaf@root()> bundle:headers 80
+
+commons-lang (80)
+-----------------
+Specification-Title = Commons Lang
+Tool = Bnd-2.1.0.20130426-122213
+Specification-Version = 2.3
+Specification-Vendor = Apache Software Foundation
+Implementation-Version = 2.3
+Generated-By-Ops4j-Pax-From = wrap:file:/opt/apache-karaf-4.0.0/deploy/commons-lang-2.3.jar$Bundle-SymbolicName=commons-lang&Bundle-Version=2.3
+Implementation-Vendor-Id = org.apache
+Created-By = 1.7.0_21 (Oracle Corporation)
+Implementation-Title = Commons Lang
+Manifest-Version = 1.0
+Bnd-LastModified = 1386339925753
+X-Compile-Target-JDK = 1.1
+Originally-Created-By = 1.3.1_09-85 ("Apple Computer, Inc.")
+Ant-Version = Apache Ant 1.6.5
+Package = org.apache.commons.lang
+X-Compile-Source-JDK = 1.3
+Extension-Name = commons-lang
+Implementation-Vendor = Apache Software Foundation
+
+Bundle-Name = commons-lang
+Bundle-SymbolicName = commons-lang
+Bundle-Version = 2.3
+Bundle-ManifestVersion = 2
+
+Export-Package =
+ org.apache.commons.lang;uses:=org.apache.commons.lang.exception,
+ org.apache.commons.lang.builder,
+ org.apache.commons.lang.enum,
+ org.apache.commons.lang.enums,
+ org.apache.commons.lang.exception,
+ org.apache.commons.lang.math,
+ org.apache.commons.lang.mutable,
+ org.apache.commons.lang.text,
+ org.apache.commons.lang.time,
+ org,
+ org.apache,
+ org.apache.commons
+
+----
+
+You can specify some MANIFEST headers by specifying the headers as URL parameters.
+
+In the URL parameters, you can specify the headers using the '$' character and '&' to separate the different headers.
+For instance:
+
+----
+karaf@root()> bundle:install -s 'wrap:mvn:jboss/jbossall-client/4.2.3.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.2.3.GA&Export-Package=org.jboss.remoting;version="4.2.3.GA",\!*'
+----
+
+When defined in a features.xml file, it's necessary to escape any ampersands and quotes, or use a CDATA tag:
+
+----
+<bundle>wrap:mvn:jboss/jbossall-client/4.3.2.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.3.2.GA&Export-Package=org.jboss.remoting;version="4.3.2.GA",!*</bundle>
+----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/directory-structure.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/directory-structure.adoc b/manual/src/main/asciidoc/user-guide/directory-structure.adoc
new file mode 100644
index 0000000..40da8ae
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/directory-structure.adoc
@@ -0,0 +1,41 @@
+//
+// Licensed 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.
+//
+
+== Directory structure
+
+The directory layout of a Karaf installation is as follows:
+
+* `/bin`: control scripts to start, stop, login, ...
+* `/demos`: contains some simple Karaf samples
+* `/etc`: configuration files
+* `/data`: working directory
+** `/data/cache`: OSGi framework bundle cache
+** `/data/generated-bundles`: temporary folder used by the deployers
+** `/data/log`: log files
+* `/deploy`: hot deploy directory
+* `/instances`: directory containing [instances|instances]
+* `/lib`: contains libraries
+** `/lib/boot`: contains the systeù libraries used at Karaf bootstrap
+** `/lib/endorsed`: directory for endorsed libraries
+** `/lib/ext`: directory for JRE extensions
+* `/system`: OSGi bundles repository, laid out as a Maven 2 repository
+
+[NOTE]
+====
+The `data` folder contains all the working and temporary files for Karaf.
+If you want to restart from a clean state, you can wipe out this directory, which has the same effect as
+using the clean option to the Karaf start.
+====
+
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/ejb.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/ejb.adoc b/manual/src/main/asciidoc/user-guide/ejb.adoc
new file mode 100644
index 0000000..2eebbd6
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/ejb.adoc
@@ -0,0 +1,91 @@
+//
+// Licensed 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.
+//
+
+=== EJB
+
+This section describes how to add support of EJB in Apache Karaf. It doesn't describe how to develop EJB applications.
+
+==== Apache OpenEJB
+
+Apache Karaf doesn't provide "native" support of EJB (Enterprise Java Beans).
+
+Apache OpenEJB provides EJB support for Apache Karaf by providing a set of features.
+
+You have to update some Karaf configuration to have full OpenEJB support.
+
+First, in the `etc/system.properties`, you have to append the following properties:
+
+----
+...
+#
+# OpenEJB scanner
+#
+openejb.deployments.classpath.exclude=bundle:*
+openejb.deployments.classpath.filter.descriptors=true
+----
+
+Due to some OpenEJB version constraint, you also have to update the `etc/jre.properties` by changing the version of
+the `javax.xml.namespace` package, and remove the version of the `javax.annotation` package (provided by Geronimo
+Annotation API spec bundle, used by OpenEJB):
+
+----
+...
+javax.annotation, \
+javax.annotation.processing, \
+...
+javax.xml.namespace;version="1.0.0", \
+...
+----
+
+It enables the OpenEJB bundles scanning, looking for EJBs.
+
+After starting/restart Karaf to take these changes, we can install the OpenEJB feature:
+
+----
+karaf@root()> feature:repo-add openejb
+----
+
+By default, the `feature:repo-add openejb` command will install the latest OpenEJB version available.
+
+You can specify a target version using the `version` argument:
+
+----
+karaf@root()> feature:repo-add openejb 4.5.2
+----
+
+Now, you have a set of new OpenEJB features available in your Apache Karaf container:
+
+----
+karaf@root()> la
+...
+openejb-core | 4.5.2 | | openejb-features |
+openejb-server | 4.5.2 | | openejb-features |
+openejb-cxf | 4.5.2 | | openejb-features |
+openejb-rest | 4.5.2 | | openejb-features |
+openejb-soap | 4.5.2 | | openejb-features |
+----
+
+You can add EJB support installing the `openejb-core` feature:
+
+----
+karaf@root()> feature:install openejb-core
+----
+
+==== Apache KarafEE
+
+A custom distribution of Apache Karaf embedding OpenEJB is available in the Apache TomEE project.
+
+The name of this custom distribution is KarafEE: https://svn.apache.org/repos/asf/tomee/karafee/
+
+However, this project is now "deprecated", and all resources from KarafEE will move directly in Apache Karaf soon.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/failover.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/failover.adoc b/manual/src/main/asciidoc/user-guide/failover.adoc
new file mode 100644
index 0000000..24a95dc
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/failover.adoc
@@ -0,0 +1,255 @@
+//
+// Licensed 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.
+//
+
+=== HA/failover and cluster
+
+Apache Karaf natively provides a failover mechanism. It uses a kind of master/slave topology where one instance is active
+and the others are in standby.
+
+If you are looking for cluster of Apache Karaf instances (active/active), [Apache Karaf Cellar|http://karaf.apache.org/index/subprojects/cellar.html] is a solution.
+
+Karaf provides failover capability using either a simple lock file or a JDBC locking mechanism.
+In both cases, a container-level lock system allows bundles to be preloaded into the slave Karaf instance in order to provide faster failover performance.
+
+==== HA/failover (active/passive)
+
+The Apache Karaf failover capability uses a lock system.
+
+This container-level lock system allows bundles installed on the master to be preloaded on the slave, in order to provide faster failover performance.
+
+Two types of lock are supported:
+
+* filesystem lock
+* database lock
+
+When a first instance starts, if the lock is available, it takes the lock and become the master.
+If a second instance starts, it tries to acquire the lock. As the lock is already hold by the master, the instance becomes
+a slave, in standby mode (not active). A slave periodically check if the lock has been released or not.
+
+===== Filesystem lock
+
+The Apache Karaf instances share a lock on the filesystem. It means that the filesystem storing the lock has to be accessible
+to the different instances (using SAN, NFS, ...).
+
+The configuration of the lock system has to be defined in the `etc/system.properties` file, on each instance (master/slave):
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.SimpleFileLock
+karaf.lock.dir=<PathToLockFileDirectory>
+karaf.lock.delay=10000
+----
+
+* `karaf.lock` property enables the the HA/failover mechanism
+* `karaf.lock.class` property contains the class name providing the lock implementation. Here, we use the filesystem lock.
+* `karaf.lock.dir` property contains the location where the lock will be written. All instances have to share the same lock.
+* `karaf.lock.delay` property is the interval period (in milliseconds) to check if the lock has been released or not.
+
+===== Database lock
+
+It's not always possible and easy to have a shared filesystem between multiple Apache Karaf instances.
+
+Instead of sharing a filesystem, Apache Karaf supports sharing a database.
+
+The master instance holds the lock by locking a table in the database. If the master loses the lock, a waiting slave
+gains access to the locking table, acquire the lock on the table and starts.
+
+The database lock uses JDBC (Java DataBase Connectivity). To use database locking, you have to:
+
+* copy the JDBC driver in the `lib/ext` folder on each instance. The JDBC driver to use is the one corresponding to the
+ database used for the locking system.
+* update `etc/system.properties` file on each instance:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.DefaultJDBCLock
+karaf.lock.level=50
+karaf.lock.delay=10000
+karaf.lock.jdbc.url=jdbc:derby://dbserver:1527/sample
+karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+----
+
+* `karaf.lock` property enabled the HA/failover mechanism
+* `karaf.lock.class` property contains the class name providing the lock implementation. The `org.apache.karaf.main.DefaultJDBCLock`
+ is the most generic database lock system implementation. Apache Karaf supports lock system for specific databases (see later for details).
+* `karaf.lock.level` property is the container-level locking (see later for details).
+* `karaf.lock.delay` property is the interval period (in milliseconds) to check if the lock has been released or not.
+* `karaf.lock.jdbc.url` property contains the JDBC URL to the database (derby in this example).
+* `karaf.lock.jdbc.driver` property contains the class name of the JDBC driver to use (derby in this example).
+* `karaf.lock.jdbc.user` property contains the username to use to connect to the database.
+* `karaf.lock.jdbc.password` property contains the password to use to connet to the database.
+* `karaf.lock.jdbc.table` property contains the database table to use for the lock. Karaf will first try to find the table as specified in this property,
+ and if not found, it will try the table name in lower and upper case.
+
+[NOTE]
+====
+Apache Karaf won't start if the JDBC driver is not present in the `lib/ext` folder.
+====
+
+[NOTE]
+====
+The `sample` database will be created automatically if it does not exist.
+====
+
+[NOTE]
+====
+If the connection to the database is lost, the master instance tries to gracefully shutdown, allowing a slave instance to
+become the master when the database is back. The former master instance will required a manual restart.
+====
+
+====== Lock on Oracle
+
+Apache Karaf supports Oracle database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.OracleJDBCLock`:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.OracleJDBCLock
+karaf.lock.jdbc.url=jdbc:oracle:thin:@hostname:1521:XE
+karaf.lock.jdbc.driver=oracle.jdbc.OracleDriver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+----
+
+The Oracle JDBC driver file (`ojdbc*.jar`) has to be copied in the `lib/ext` folder.
+
+[NOTE]
+====
+The `karaf.lock.jdbc.url` property contains a JDBC URL which requires an active SID. It means that you must manually create the Oracle
+database instance first before using the lock mechanism.
+====
+
+====== Lock on Derby
+
+Apache Karaf supports Apache Derby database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.DerbyJDBCLock`:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.DerbyJDBCLock
+karaf.lock.jdbc.url=jdbc:derby://127.0.0.1:1527/dbname
+karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+----
+
+The Derby JDBC driver file name has to be copied in the `lib/ext` folder.
+
+====== Lock on MySQL
+
+Apache Karaf supports MySQL database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.MySQLJDBCLock`:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.MySQLJDBCLock
+karaf.lock.jdbc.url=jdbc:mysql://127.0.0.1:3306/dbname
+karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+----
+
+The MySQL JDBC driver file name has to be copied in `lib/ext` folder.
+
+====== Lock on PostgreSQL
+
+Apache Karaf supports PostgreSQL database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.PostgreSQLJDBCLock`:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.PostgreSQLJDBCLock
+karaf.lock.jdbc.url=jdbc:postgresql://127.0.0.1:1527/dbname
+karaf.lock.jdbc.driver=org.postgresql.Driver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=0
+----
+
+The PostgreSQL JDBC driver file has to be copied in the `lib/ext` folder.
+
+====== Lock on Microsoft SQLServer
+
+Apache Karaf supports Microsoft SQLServer database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.SQLServerJDBCLock`:
+
+----
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.SQLServerJDBCLock
+karaf.lock.level=50
+karaf.lock.delay=10000
+karaf.lock.jdbc.url=jdbc:jtds:sqlserver://127.0.0.1;databaseName=sample
+karaf.lock.jdbc.driver=net.sourceforge.jtds.jdbc.Driver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+----
+
+The JTDS JDBC driver file has to be copied in the `lib/ext` folder.
+
+===== Container-level locking
+
+Apache Karaf supports container-level locking. It allows bundles to be preloaded into the slave instance.
+Thanks to that, switching to a slave instance is very fast as the slave instance already contains all required bundles.
+
+The container-level locking is supported in both filesystem and database lock mechanisms.
+
+The container-level locking uses the `karaf.lock.level` property:
+
+----
+karaf.lock.level=50
+----
+
+The `karaf.lock.level` property tells the Karaf instance how far up the boot process to bring the OSGi container.
+All bundles with an ID equals or lower to this start level will be started in that Karaf instance.
+
+As reminder, the bundles start levels are specified in `etc/startup.properties`, in the `url=level` format.
+
+|===
+|Level |Behavior
+
+|1
+|A 'cold' standby instance. Core bundles are not loaded into container. Slaves will wait until lock acquired to start server.
+
+|<50
+|A 'hot' standby instance. Core bundles are loaded into the container. Slaves will wait until lock acquired to start user level bundles. The console will be accessible for each slave instance at this level.
+
+|>50
+|This setting is not recommended as user bundles will end up being started.
+|===
+
+[NOTE]
+====
+Using 'hot' standby means that the slave instances are running and bind some ports. So, if you use master and slave instances on the same machine, you have
+to update the slave configuration to bind the services (ssh, JMX, etc) on different port numbers.
+====
+
+==== Cluster (active/active)
+
+Apache Karaf doesn't natively support cluster. By cluster, we mean several active instances, synchronized with each other.
+
+However, http://karaf.apache.org/index/subprojects/cellar.html[Apache Karaf Cellar] can be installed to provide cluster support.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/http.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/http.adoc b/manual/src/main/asciidoc/user-guide/http.adoc
new file mode 100644
index 0000000..f145675
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/http.adoc
@@ -0,0 +1,74 @@
+//
+// Licensed 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.
+//
+
+=== Http Service
+
+The Karaf http feature enables the Pax Web implementation of the OSGi HTTPService.
+
+==== Installing the HTTP feature
+
+----
+root@karaf()> feature:install http
+----
+
+Test the HTTP service is up by pointing your browser to [http://localhost:8181/].
+
+==== Configuring the HTTPService
+
+By default the HTTPService listens on port 8181 you can change the port by creating a file `etc/org.ops4j.pax.web.cfg` with the following content:
+
+----
+org.osgi.service.http.port=8181
+----
+
+or by typing:
+----
+root@karaf> config:property-set -p org.ops4j.pax.web org.osgi.service.http.port 8181
+----
+
+If the http feature is already installed the change will take effect immediately.
+
+==== Registering a servlet with the HttpService manually
+
+See http://felix.apache.org/site/apache-felix-http-service.html.
+
+==== Using the Pax Web whiteboard extender
+
+The Pax Web whiteboard extender is an enhancement of the http feature. So use the following command to install:
+
+----
+root@karaf> feature:install http-whiteboard
+----
+
+The http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard[Pax Web whiteboard] extender listens to services
+of interface type HttpServlet and Filter.
+It will register each of these interfaces with the HttpService and remove them as soon as the service goes down.
+So it is much more convenient than registering with the HttpService directly.
+
+----
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service interface="javax.servlet.http.HttpServlet">
+ <service-properties>
+ <entry key="alias" value="/myservlet"/>
+ </service-properties>
+ <bean id="myServlet" class="com.example.MyServlet"/>
+ </service>
+</blueprint>
+----
+
+The above snippet publishes the Servlet MyServlet on http://localhost:8181/myServlet.
+
+Please keep in mind that the Whiteboard pattern for Servlets is not standardized and only works with Pax Web.
+
+For commands take a look at the command section in the link:webcontainer[webcontainer] chapter.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/installation.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/installation.adoc b/manual/src/main/asciidoc/user-guide/installation.adoc
new file mode 100644
index 0000000..de89d5f
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/installation.adoc
@@ -0,0 +1,167 @@
+//
+// Licensed 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.
+//
+
+== Installation
+
+Apache Karaf is a lightweight container, very easy to install and administrate, on both Unix and Windows platforms.
+
+=== Requirements
+
+*Hardware:*
+
+* 50 MB of free disk space for the Apache Karaf binary distribution.
+
+*Operating Systems:*
+
+* Windows: Windows 8, Windows 7, Windows 2003, Windows Vista, Windows XP SP2, Windows 2000.
+* Unix: RedHat Enterprise Linux, Debian, SuSE/OpenSuSE, CentOS, Fedora, Ubuntu, MacOS, AIX, HP-UX, Solaris, any Unix platform that supports Java.
+
+*Environment:*
+
+* Java SE 1.7.x or greater (http://www.oracle.com/technetwork/java/javase/).
+* The JAVA_HOME environment variable must be set to the directory where the Java runtime is installed,
+
+=== Using Apache Karaf binary distributions
+
+Apache Karaf is available in two distributions, both as a tar.gz and zip archives.
+
+The "default" distribution is a "ready to use" distribution, with pre-installed features.
+
+The "minimal" distribution is like the minimal distributions that you can find for most of Unix distributions.
+Only the core layer is packaged, most of the features and bundles are downloaded from Internet at bootstrap.
+It means that Apache Karaf minimal distribution requires an Internet connection to start correctly.
+The features provided by the "minimal" distribution are exactly the same as in the "default" distribution, the difference
+is that the minimal distribution will download the features from Internet.
+
+==== Installation on Windows platform
+
+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".
+
+. From a browser, navigate to http://karaf.apache.org/index/community/download.html.
+. Download Apache Karaf binary distribution in the zip format: `apache-karaf-4.0.0.zip`.
+. Extract the files from the zip file into a directory of your choice (it's the `KARAF_HOME`.
+
+NB: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
+
+[NOTE]
+====
+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 _start \-> startup_ that executes
+
+----
+subst S: "C:\your very % problematic path!\KARAF"
+----
+
+so your Karaf root directory is S: --- which works for sure and is short to type.
+====
+
+==== Installation on Unix platforms
+
+NB: the JAVA_HOME environment variable has to be correctly defined. Check the current value using
+
+----
+echo $JAVA_HOME
+----
+
+If it's not correct, fix it using:
+
+----
+export JAVA_HOME=....
+----
+
+. From a browser, navigate to http://karaf.apache.org/index/community/download.html.
+. Download Apache Karaf binary distribution in the tar.gz format: `apache-karaf-4.0.0.tar.gz`.
+. Extract the files from the tar.gz file into a directory of your choice (it's the `KARAF_HOME`). For example:
+
+----
+gunzip apache-karaf-4.0.0.tar.gz
+tar xvf apache-karaf-4.0.0.tar
+----
+
+NB: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
+
+=== Post-Installation steps
+
+Thought it is not always required, it is strongly advised to set up the `JAVA_HOME` environment property to point to the JDK you want Apache Karaf to use before starting it.
+This property is used to locate the `java` executable and should be configured to point to the home directory of the Java SE 7 installation.
+
+By default, all Apache Karaf files are "gather" in one directory: the `KARAF_HOME`.
+
+You can define your own directory layout, by using some Karaf environment variables:
+
+* `KARAF_DATA` is the location of the data folder, where Karaf stores temporary files.
+* `KARAF_ETC` is the location of the etc folder, where Karaf stores configuration files.
+* `KARAF_BASE` is the Karaf base folder. By default `KARAF_BASE` is the same as `KARAF_HOME`.
+
+=== Building from Sources
+
+If you intend to build Apache Karaf from the sources, the requirements are a bit different:
+
+*Hardware:*
+
+* 500 MB of free disk space for the Apache Karaf source distributions or SVN checkout, the Maven build and the dependencies Maven downloads.
+
+*Environment:*
+
+* Java SE Development Kit 1.7.x or greater (http://www.oracle.com/technetwork/java/javase/).
+* Apache Maven 3.0.4 or greater (http://maven.apache.org/download.html).
+
+==== Building on Windows platform
+
+You can get the Apache Karaf sources from:
+
+* the sources distribution `apache-karaf-4.0.0-src.zip` available at http://karaf.apache.org/index/community/download.html. Extract the files in the directory of your choice.
+* by checkout of the git repository:
+
+----
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+----
+
+Use Apache Maven to build Apache Karaf:
+
+----
+mvn clean install
+----
+
+NB: you can speed up the build by bypassing the unit tests:
+
+----
+mvn clean install -DskipTests
+----
+
+Now, you can find the built binary distribution in `assemblies\apache-karaf\target\apache-karaf-4.0.0.zip`.
+
+==== Building on Unix platforms
+
+You can get the Apache Karaf sources from:
+
+* the sources distribution `apache-karaf-4.0.0-src.tar.gz` available at http://karaf.apache.org/index/community/download.html. Extract the files in the directory of your choice.
+* by checkout of the git repository:
+
+----
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+----
+
+Use Apache Maven to build Apache Karaf:
+
+----
+mvn clean install
+----
+
+NB: you can speed up the build by bypassing the unit tests:
+
+----
+mvn clean install -DskipTests
+----
+
+Now, you can find the built binary distribution in `assemblies/apache-karaf/target/apache-karaf-4.0.0.tar.gz`.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/instances.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/instances.adoc b/manual/src/main/asciidoc/user-guide/instances.adoc
new file mode 100644
index 0000000..bdcec2b
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/instances.adoc
@@ -0,0 +1,390 @@
+//
+// Licensed 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.
+//
+
+== Instances
+
+A instance is a complete new Apache Karaf runtime, isolated from the other ones.
+
+The purpose is to easily create and manage a new Apache Karaf runtime without installing a complete distribution.
+
+A instance is a new instance that you can launch separately from the root one, and deploy applications into. It means that each instance is run on a different JVM.
+
+A instance does not contain a full copy of the Apache Karaf distribution, but only a set of the configuration files and data folder which contains all the runtime information, logs and temporary files.
+
+=== Using the instance commands
+
+The *instance* commands allow you to create and manage instances.
+
+==== Creating instances
+
+You create a new runtime instance by typing [`instance:create`|/commands/instance-create] in the Karaf console.
+
+As shown in the following example, `instance:create` causes the runtime to create a new runtime installation in the active runtime's `instances/[name]} directory. The new instance is a new Karaf instance and is assigned an SSH port number based on an incremental count starting at 8101 and a RMI registry port number based on an incremental count starting at 1099.
+
+----
+karaf@root()> instance:create test
+----
+
+The new instance is fresh Apache Karaf instance. It uses default configuration files set, as you install a fresh Karaf distribution.
+
+You can enable the verbose mode for the `instance:create` command using the `-v` option:
+
+----
+karaf@root()> instance:create -v test
+Creating new instance on SSH port 8103 and registry port 1101 / RMI server port 44446 at: /opt/karaf/instances/test
+Creating dir: /opt/karaf/instances/test/bin
+Creating dir: /opt/karaf/instances/test/etc
+Creating dir: /opt/karaf/instances/test/system
+Creating dir: /opt/karaf/instances/test/deploy
+Creating dir: /opt/karaf/instances/test/data
+Creating file: /opt/karaf/instances/test/etc/config.properties
+Creating file: /opt/karaf/instances/test/etc/jre.properties
+Creating file: /opt/karaf/instances/test/etc/custom.properties
+Creating file: /opt/karaf/instances/test/etc/java.util.logging.properties
+Creating file: /opt/karaf/instances/test/etc/org.apache.felix.fileinstall-deploy.cfg
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.obr.cfg
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.repos.cfg
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.log.cfg
+Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.logging.cfg
+Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.url.mvn.cfg
+Creating file: /opt/karaf/instances/test/etc/users.properties
+Creating file: /opt/karaf/instances/test/etc/keys.properties
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.cfg
+Creating file: /opt/karaf/instances/test/etc/system.properties
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.shell.cfg
+Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.management.cfg
+Creating file: /opt/karaf/instances/test/bin/karaf
+Creating file: /opt/karaf/instances/test/bin/start
+Creating file: /opt/karaf/instances/test/bin/stop
+----
+
+You can manually configure the different ports, the location of the instance, the Apache Karaf features URLs using different options of the `instance:create` command.
+You can have details about these options using the `--help` option.
+
+==== Cloning an instance
+
+Instead of creating a fresh instance, you can clone an existing instance using `instance:clone`.
+
+The `instance:clone` command reuse the files from the source instance:
+
+----
+karaf@root()> instance:clone root test
+----
+
+You can have details about the cloning options using the `--help` option.
+
+==== Changing the instance location
+
+By default, the new instances storage is in the `KARAF_HOME/instance` directory.
+You find a directory with the name of the instance storing the different instance files.
+
+You can change the location of the instance using the `-l` option to the `instance:create` and `instance:clone` commands:
+
+----
+karaf@root()> instance:create -v -l /tmp/test test
+Creating new instance on SSH port 8102 and registry port 1100 / RMI server port 44445 at: /tmp/test
+Creating dir: /tmp/test/bin
+Creating dir: /tmp/test/etc
+Creating dir: /tmp/test/system
+Creating dir: /tmp/test/deploy
+Creating dir: /tmp/test/data
+Creating file: /tmp/test/etc/config.properties
+Creating file: /tmp/test/etc/jre.properties
+Creating file: /tmp/test/etc/custom.properties
+Creating file: /tmp/test/etc/java.util.logging.properties
+Creating file: /tmp/test/etc/org.apache.felix.fileinstall-deploy.cfg
+Creating file: /tmp/test/etc/org.apache.karaf.features.obr.cfg
+Creating file: /tmp/test/etc/org.apache.karaf.features.repos.cfg
+Creating file: /tmp/test/etc/org.apache.karaf.log.cfg
+Creating file: /tmp/test/etc/org.ops4j.pax.logging.cfg
+Creating file: /tmp/test/etc/org.ops4j.pax.url.mvn.cfg
+Creating file: /tmp/test/etc/users.properties
+Creating file: /tmp/test/etc/keys.properties
+Creating file: /tmp/test/etc/org.apache.karaf.features.cfg
+Creating file: /tmp/test/etc/system.properties
+Creating file: /tmp/test/etc/org.apache.karaf.shell.cfg
+Creating file: /tmp/test/etc/org.apache.karaf.management.cfg
+Creating file: /tmp/test/bin/karaf
+Creating file: /tmp/test/bin/start
+Creating file: /tmp/test/bin/stop
+----
+
+Careful, it's not possible to change the location of an instance once it has been created.
+
+[NOTE]
+====
+`instance:destroy` will remove the instance location for you. You don't have to remove the instance location "by hand".
+====
+
+==== Changing instance ports
+
+You can change the SSH port number assigned to an instance using the `instance:ssh-port-change` command:
+
+----
+karaf@root()> instance:ssh-port-change test 8104
+----
+
+where test is the instance name and 8104 is the new SSH port number to use for the test instance.
+
+You can change the RMI Registry port number (used by JMX) of an instance using the `instance:rmi-registry-port-change` command:
+
+----
+karaf@root()> instance:rmi-registry-port-change test 1102
+----
+
+where test is the instance name and 1102 is the new RMI Registry port number to use for the test instance.
+
+You can also change the RMI Server port number (used by JMX too) of an instance using the `instance:rmi-server-port-change` command:
+
+----
+karaf@root()> instance:rmi-server-port-change test 44447
+----
+
+where test is the instance name and 44447 is the new RMI Server port number to use for the test instance.
+
+[NOTE]
+====
+The instance has to be stopped to be able to change the port numbers.
+====
+
+==== Starting instances
+
+New instances are created in a stopped state.
+
+To start an instance, you can use the `instance:start` command:
+
+----
+karaf@root()> instance:start test
+----
+
+where test is the instance name.
+
+==== Listing instances
+
+To list the instances and their current status, you can use the `instance:list` command:
+
+----
+karaf@root()> instance:list
+SSH Port | RMI Registry | RMI Server | State | PID | Name
+-------------------------------------------------------------
+ 8101 | 1099 | 44444 | Started | 19652 | root
+ 8104 | 1101 | 44446 | Stopped | 0 | test
+----
+
+An instance can be in the following status:
+
+- Stopped: the instance is stopped.
+- Starting: the instance is starting.
+- Started: the instance is up and running. You can connect and use it.
+
+==== Status of an instance
+
+You can get directly the status of a given instance using the `instance:status` command:
+
+----
+karaf@root()> instance:status test
+Started
+----
+
+where test is the instance name.
+
+==== Connecting to an instance
+
+You can connect to a running instance directly from the root one using the `instance:connect` command:
+
+----
+karaf@root()> instance:connect test
+----
+
+where 'test' is the instance name where to connect to.
+
+By default, this command will use the same username used on the root instance, and the password will be prompted.
+
+You can use a different username using the `-u` or `--username` option. You can also provide the password using the
+`-p` or `--password` option.
+
+If you don't provide any argument, you will logon on the instance:
+
+----
+karaf@test()>
+----
+
+Note the name of instance in the shell prompt (@test).
+
+You can logoff from the instance and return back to the root instance using the `logout` command or CTRL-D key binding:
+
+----
+karaf@test()> logout
+karaf@root()>
+----
+
+The `instance:connect` command accepts shell commands as argument. It allows you to directly execute commands or scripts on the instance:
+
+----
+karaf@root()> instance:connect test feature:list
+Name | Version | Installed | Repository | Description
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+standard | 4.0.0 | x | standard-4.0.0 | Karaf standard feature
+aries-annotation | 4.0.0 | | standard-4.0.0 | Aries Annotations
+wrapper | 4.0.0 | | standard-4.0.0 | Provide OS integration
+service-wrapper | 4.0.0 | | standard-4.0.0 | Provide OS integration (alias to wrapper feature)
+obr | 4.0.0 | | standard-4.0.0 | Provide OSGi Bundle Repository (OBR) support
+config | 4.0.0 | x | standard-4.0.0 | Provide OSGi ConfigAdmin support
+region | 4.0.0 | x | standard-4.0.0 | Provide Region Support
+...
+----
+
+==== Stop an instance
+
+To stop an instance, you can connect to the instance (using `instance:connect`) and execute the `system:shutdown`
+command.
+
+You can also use the `instance:stop` command:
+
+----
+karaf@root()> instance:stop test
+----
+
+where test is the instance name.
+
+The instance will go to the "Stopped" state.
+
+==== Destroy an instance
+
+You can completely delete a stopped instance using the `instance:destroy` command:
+
+----
+karaf@root()> instance:destroy test
+----
+
+where test is the instance name.
+
+[NOTE]
+====
+The `instance:destroy` deletes the instance store (the location where the instance files are stored).
+====
+
+==== Rename an instance
+
+You can change the name of a stopped instance using the `instance:rename` command:
+
+----
+karaf@root()> instance:rename test newTest
+----
+
+where test is the current instance name, and newTest the new instance name.
+
+=== Instance script
+
+The `instance:*` commands require the root instance running.
+
+But, you can also administrate directly instances without the root instance, using the `bin/instance` Unix script
+(or `bin/instance.bat` script on Windows).
+
+You find the same actions that you can do with the `instance:*` commands in the `instance[.bat]` script:
+
+----
+bin/instance
+Available commands:
+ clone - Clones an existing container instance.
+ create - Creates a new container instance.
+ destroy - Destroys an existing container instance.
+ list - Lists all existing container instances.
+ opts-change - Changes the Java options of an existing container instance.
+ rename - Rename an existing container instance.
+ rmi-registry-port-change - Changes the RMI registry port (used by management layer) of an existing container instance.
+ rmi-server-port-change - Changes the RMI server port (used by management layer) of an existing instance.
+ ssh-port-change - Changes the secure shell port of an existing container instance.
+ start - Start an existing container instance.
+ status - Check the current status of an instance.
+ stop - Stop an existing container instance.
+Type 'command --help' for more help on the specified command.
+----
+
+For instance, to list all the instances, you can use the `instance` script with the `list` command:
+
+----
+bin/instance list
+SSH Port | RMI Registry | RMI Server | State | PID | Name
+-----------------------------------------------------------
+ 8101 | 1099 | 44444 | Stopped | 0 | root
+ 8102 | 1100 | 44445 | Stopped | 0 | test
+----
+
+It's exactly the same as executing `instance:list` in the root instance.
+
+You can obtain details about commands options and arguments using the `--help` option. For instance:
+
+----
+bin/instance rename --help
+DESCRIPTION
+ instance:rename
+
+ Rename an existing container instance.
+
+SYNTAX
+ instance:rename [options] name new-name
+
+ARGUMENTS
+ name
+ The name of the container instance to rename
+ new-name
+ The new name of the container instance
+
+OPTIONS
+ --help
+ Display this help message
+ -v, --verbose
+ Display actions performed by the command (disabled by default)
+
+----
+
+=== JMX InstanceMBean
+
+On the JMX layer, you have a MBean dedicated to the management of the instances: the InstanceMBean.
+
+The ObjectName to use is `org.apache.karaf:type=instance,name=*`.
+
+==== Attributes
+
+The `Instances` attribute is a tabular data attribute providing details about the instances:
+
+* `Is Root` (boolean): if true, the instance is the root instance, false else.
+* `JavaOpts` (string): it contains the JVM arguments used by the instance.
+* `Location` (string): it's the path to the instance storage.
+* `Name` (string): it's the name of the instance.
+* `Pid` (long): it's the current system process ID (PID) of the instance process.
+* `RMI Registry Port` (int): it's the port number of the instance RMI Registry (JMX).
+* `RMI Server Port` (int): it's the port number of the instance RMI Server (JMX).
+* `SSH Port` (int): it's the port number of the instance SSH Server.
+* `State` (string): it's the current status of the instance (Stopped, Starting, Started).
+
+==== Operations
+
+The InstanceMBean provides the following operations, corresponding to the previous `instance:*` commands:
+
+* `createInstance(instanceName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts, features, featuresUrls)`: create a new instance.
+* `changeSshPort(instanceName, port)`: change the SSH port of an instance.
+* `changeRmiServerPort(instanceName, port)`: change the RMI server port of an instance.
+* `changeRmiRegistry(instanceName, port)`: change the RMI registry port of an instance.
+* `changeJavaOpts(instanceName, javaOpts)`: change the Java options of an instance.
+* `destroyInstance(instanceName)`: destroy an instance.
+* `startInstance(instanceName)`: start an instance.
+* `startInstance(instanceName, options)`: start an instance with the given Java options.
+* `startInstance(instanceName, options, wait, debug)`: start an instance with the given Java options.
+ If wait is true, this operation is waiting for the instance is in "Started" state. If debug is true, the instance is started in debug mode.
+* `stopInstance(instanceName)`: stop an instance.
+* `renameInstance(instanceName, newInstanceName)`: rename an instance.
+* `renameInstance(instanceName, newInstanceName, verbose)`: rename an instance. If verbose is true, this operation provides details in the log.
+* `cloneInstance(instanceName, cloneName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts)`: clone an existing instance.
[06/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-validate-descriptor.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-validate-descriptor.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-validate-descriptor.conf
deleted file mode 100644
index e08c7bc..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-validate-descriptor.conf
+++ /dev/null
@@ -1,50 +0,0 @@
-h2. Goal {{karaf:features-validate-descriptor}}
-
-The {{karaf:features-validate-descriptor}} goal validates a features XML descriptor by checking if all the required imports for the bundles defined in the features can be matched to a provided export.
-
-By default, the plugin tries to add the Karaf core features (standard and enterprise) in the repositories set.
-It means that it's not required to explicitly define the Karaf features descriptor in the repository section of your features descriptor.
-
-h3. Example
-The example below validates the features defined in the {{target/features.xml}} by checking all the imports and exports. It reads the definition for the packages that are exported by the system bundle from the {{src/main/resources/config.properties}} file.
-{pygmentize:xml}
-<project>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
- <executions>
- <execution>
- <id>validate</id>
- <phase>process-resources</phase>
- <goals>
- <goal>features-validate-descriptor</goal>
- </goals>
- <configuration>
- <file>target/features.xml</file>
- <karafConfig>src/main/resources/config.properties</karafConfig>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.4.3</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
-h3. Parameters
-|| Name || Type || Description ||
-| {{file}} | {{File}} | The features XML descriptor file to validate. \\ Default value: {{${project.build.directory}/classes/features.xml}} |
-| {{karafConfig}} | {{String}} | The Karaf {{config.properties}} file to use during the validation process \\ Default value: {{config.properties}} |
-| {{jreVersion}} | {{String}} | The JRE version that is used during the validation process \\ Default value: {{jre-1.5}) |
-| {{karafVersion}} | {{String}} | The target Karaf version used to get the Karaf core features (standard and enterprise) \\ Default is the version of the plugin |
-| {{repositories}} | {{String[]}} | Additional features XML descriptors that will be used during the validation process |
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-instance-create-archive.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-instance-create-archive.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-instance-create-archive.conf
deleted file mode 100644
index 4b3a8a3..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-instance-create-archive.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-h2. Goal {{karaf:archive}}
-
-Normally this is run as part of the karaf-assembly packaging.
-
-The {{karaf:archive}} goal packages a Karaf instance archive from a given assembled instance.
-
-Both tar.gz and zip formats are generated in the destination folder.
-
-h3. Example
-The example below create archives for the given Karaf instance:
-{pygmentize:xml}
-<project>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
- <executions>
- <execution>
- <id>generate</id>
- <phase>package</phase>
- <goals>
- <goal>archive</goal>
- </goals>
- <configuration>
- <destDir>${project.build.directory}</destDir>
- <targetServerDirectory>${project.build.directory}/assembly</targetServerDirectory>
- <targetFile>${project.file}</targetFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
-h3. Parameters
-|| Name || Type || Description ||
-| {{destDir}} | {{File}} | The target directory of the project. \\ Default value: ${project.build.directory} |
-| {{targetServerDirectory}} | {{File}} | The location of the server repository. \\ Default value: ${project.build.directory}/assembly |
-| {{targetFile}} | {{File}} | The target file to set as the project's artifact. \\ Default value: ${project.file} |
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin.conf
deleted file mode 100644
index c00516b..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin.conf
+++ /dev/null
@@ -1,70 +0,0 @@
-h1. Using the karaf-maven-plugin
-
-The Karaf Maven plugin allows you:
-
- * to work with Karaf features: validate a features descriptor, add features bundle into a repository, create a KAR archive from a features descriptor, etc.
- * to create Karaf commands help: it generates help from Karaf commands
- * to modify Karaf instances and create distributions
-
-h2. Packagings
-The most generally useful features of the karaf-maven-plugin are exposed as packagings. To use the packagings the pom or an ancestor must configure the karaf-maven-plugin with extensions:
-
-{code}
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-{code}
-
-Then specify the packaging in your project as usual, e.g.
-
-{code}
- <packaging>kar</packaging>
-{code}
-
-|| Packaging || Description ||
-| feature | The feature packaging generates a features.xml descriptor using the {{[karaf:features-generate-descriptor|karaf-maven-plugin-features-generate-descriptor]}} |
-| kar | The kar packaging generates a features.xml descriptor using the {{[karaf:features-generate-descriptor|karaf-maven-plugin-features-generate-descriptor]}} and then packages a kar using the {{[karaf:features-create-kar|karaf-maven-plugin-features-create-kar]}} |
-| {{[karaf-assembly|custom-distribution]}} | Assembles a Karaf server based on the features descriptors and kar files listed as Maven dependencies. |
-
-h2. Commands goals
-
-The {{karaf-maven-plugin}} is able to generate documentation for Karaf commands:
-
-|| Goal || Description ||
-| {{[karaf:commands-generate-help|karaf-maven-plugin-commands-generate-help]}} | Generates help for Karaf commands. |
-
-h2. Features goals
-
-Normally you should use the features or kar packagings instead of these individual goals.
-The {{karaf-maven-plugin}} provides several goals to help you create and validate features XML descriptors as well as leverage your features to create a custom Karaf distribution.
-
-|| Goal || Description ||
-| {{[karaf:features-generate-descriptor|karaf-maven-plugin-features-generate-descriptor]}} | Generates a features XML descriptor for a set of bundles. Used in feature and kar packagings. |
-| {{[karaf:features-validate-descriptor|karaf-maven-plugin-features-validate-descriptor]}} | Validate a features XML descriptor by checking if all the required imports can be matched to exports |
-| {{[karaf:kar|karaf-maven-plugin-features-create-kar]}} | Assemble a KAR archive from a features XML descriptor. Used in kar packaging.|
-
-
-h2. Instances and distributions goals
-
-Normally you should use the karaf-assembly packaging instead of this individual goal.
-The {{karaf-maven-plugin}} helps you to build custom Karaf distributions or archives existing Karaf instances:
-
-|| Goal || Description ||
-| {{karaf:assembly}} | Assemble a server from Maven feature-repo and kar dependencies. Used in karaf-assembly packaging. See {{[karaf-assembly|custom-distribution]}}. |
-| {{[karaf:archive|karaf-maven-plugin-instance-create-archive]}} | Package a server archive from an assembled server. . Used in karaf-assembly packaging. See also {{[karaf-assembly|custom-distribution]}}.|
-| {{[karaf:features-add-to-repository|karaf-maven-plugin-features-add-to-repository]}} | (old style manual assemblies) Copies all the bundles required for a given set of features into a directory \\ (e.g. for creating your own Karaf-based distribution) |
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/scripting.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/scripting.conf b/manual/src/main/webapp/developers-guide/scripting.conf
deleted file mode 100644
index 9fce440..0000000
--- a/manual/src/main/webapp/developers-guide/scripting.conf
+++ /dev/null
@@ -1,305 +0,0 @@
-h1. Scripting
-
-In the console section of the users guide, we introduced the scripting support.
-
-h2. Assignation
-
-You already know the first usage of scripting: execution of command.
-
-{code}
-karaf@root()> echo hello world
-hello world
-{code}
-
-You can also assign value to session variables:
-
-{code}
-karaf@root()> msg = "hello world"
-hello world
-{code}
-
-Once you have assigned a value to a variable, you can display this value using the "resolved" variable name:
-
-{code}
-karaf@root()> echo $msg
-hello world
-{code}
-
-The () are execution quotes (like the backquotes when you use bash on Unix).
-
-{code}
-karaf@root()> ($.context bundle 1) location
-mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/3.0.1-SNAPSHOT
-{code}
-
-The {{$.context}} access the context variables in the current session.
-We access to the {{bundle}} variable (an array containing all bundles), and we want to display the bundle location for
-the bundle at the index 1 in the bundle array.
-
-h2. Expressions
-
-The shell has a built-in expression parser. Expressions must be enclosed with the {{%(...)}} syntax.
-
-Examples:
-{code}
-karaf@root()> %(1+2)
-3
-karaf@root()> a = 0
-0
-karaf@root()> %(a+=1)
-1
-karaf@root()> %(a+=1)
-2
-karaf@root()> b=1
-1
-karaf@root()> %(SQRT(a^2 + b^2))
-1.7320508
-{code}
-
-h3. Mathematical Operators
-|| Operator || Description ||
-| + | Additive operator |
-| - | Subtraction operator |
-| * | Multiplication operator |
-| / | Division operator |
-| % | Remainder operator (Modulo) |
-| ^ | Power operator |
-
-h3. Boolean Operators
-|| Operator || Description ||
-| = | Equals |
-| == | Equals |
-| != | Not equals |
-| <> | Not equals |
-| < | Less than |
-| <= | Less than or equal to |
-| > | Greater than |
-| >= | Greater than or equal to |
-| && | Boolean and |
-| \|\| | Boolean or |
-
-h3. Supported Functions
-|| Function || Description ||
-| NOT(_expression_) | Boolean negation, 1 (means true) if the expression is not zero |
-| IF(_condition_,_value_if_true_,_value_if_false_) | Returns one value if the condition evaluates to true or the other if it evaluates to false |
-| RANDOM() | Produces a random number between 0 and 1 |
-| MIN(_e1_,_e2_) | Returns the smaller of both expressions |
-| MAX(_e1_,_e2_) | Returns the bigger of both expressions |
-| ABS(_expression_) | Returns the absolute (non-negative) value of the expression |
-| ROUND(_expression_,precision) | Rounds a value to a certain number of digits, uses the current rounding mode |
-| FLOOR(_expression_) | Rounds the value down to the nearest integer |
-| CEILING(_expression_) | Rounds the value up to the nearest integer |
-| LOG(_expression_) | Returns the natural logarithm (base e) of an expression |
-| SQRT(_expression_) | Returns the square root of an expression |
-| SIN(_expression_) | Returns the trigonometric sine of an angle (in degrees) |
-| COS(_expression_) | Returns the trigonometric cosine of an angle (in degrees) |
-| TAN(_expression_) | Returns the trigonometric tangens of an angle (in degrees) |
-| SINH(_expression_) | Returns the hyperbolic sine of a value |
-| COSH(_expression_) | Returns the hyperbolic cosine of a value |
-| TANH(_expression_) | Returns the hyperbolic tangens of a value |
-| RAD(_expression_) | Converts an angle measured in degrees to an approximately equivalent angle measured in radians |
-| DEG(_expression_) | Converts an angle measured in radians to an approximately equivalent angle measured in degrees |
-
-Functions names are case insensitive.
-
-h3. Supported Constants
-
-|| Constant || Description ||
-| PI | The value of _PI_, exact to 100 digits |
-| TRUE | The value one |
-| FALSE | The value zero |
-
-h2. List, maps, pipes and closures
-
-Using [], you can define array variable:
-
-{code}
-karaf@root()> list = [1 2 a b]
-1
-2
-a
-b
-
-{code}
-
-You can also create a map if you put variables assignation in the array:
-
-{code}
-karaf@root()> map = [Jan=1 Feb=2 Mar=3]
-Jan 1
-Feb 2
-Mar 3
-{code}
-
-Using the | character, you can pipe output from a command as an input to another one.
-
-For instance, you can access to the bundles context variables and send it as input to the grep command:
-
-{code}
-karaf@root()> ($.context bundles) | grep -i felix
- 0|Active | 0|org.apache.felix.framework (4.2.1)
- 21|Active | 11|org.apache.felix.fileinstall (3.2.6)
- 43|Active | 10|org.apache.felix.configadmin (1.6.0)
- 51|Active | 30|org.apache.felix.gogo.runtime (0.10.0)
-{code}
-
-You can assign name to script execution. It's what we use for alias:
-
-{code}
-karaf@root()> echo2 = { echo xxx $args yyy }
-echo xxx $args yyy
-karaf@root()> echo2 hello world
-xxx hello world yyy
-{code}
-
-h2. Startup
-
-The {{etc/shell.init.script}} file is executed at startup in each shell session, allowing the definition of additional
-variables or aliases or even complex functions. It's like the bashrc or profile on Unix.
-
-h2. Constants and variables
-
-Apache Karaf console provides a set of implicit constants and variables that you can use in your script.
-
-* {{$.context}} to access a bundle context
-* {{$.variables}} to access the list of defined variables
-* {{$.commands}} to access the list of defined commands
-
-The variables starting with a # that are defined as Function (such as closures) will be executed automatically:
-
-{code}
-karaf@root> \#inc = { var = "${var}i" ; $var }
-var = "${var}i" ; $var
-karaf@root> echo $inc
-i
-karaf@root> echo $inc
-ii
-karaf@root>
-{code}
-
-h2. Built-in variables and commands
-
-Apache Karaf console provides built-in variable very useful for scripting:
-
-* {{$args}} retrieves the list of script parameters, given to the closure being executed
-* {{$1 .. $999}} retrieves the nth argument of the closure
-* {{$it}} (same as {{$1}}) is used in a loop to access the current iterator value
-
-Apache Karaf console provides commands for scripting:
-
-* {{shell:if}}
-* {{shell:new}}
-* {{shell:each}}
-* ...
-
-See the [full list of {{shell}} commands|/commands/commands].
-
-h2. Leveraging existing Java capabilities (via reflection)
-
-Apache Karaf console supports loading and execution of Java classes.
-
-The {{$karaf.lastException}} implicit variable contains the latest Exception thrown.
-
-
-{code}
-karaf@root()> ($.context bundle) loadClass foo
-Error executing command: foo not found by org.apache.karaf.shell.console [17]
-karaf@root()> $karaf.lastException printStackTrace
-java.lang.ClassNotFoundException: foo not found by org.apache.karaf.shell.console [17]
- at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
- at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
- at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
- at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1723)
- at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:926)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:597)
- at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
- at org.apache.felix.gogo.runtime.Closure.executeMethod(Closure.java:527)
- at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
- at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
- at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
- at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
- at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
- at org.apache.karaf.shell.console.jline.Console.run(Console.java:166)
- at java.lang.Thread.run(Thread.java:680)
-{code}
-
-It's possible to create objects to create commands "on the fly":
-
-{code}
-karaf@root()> addcommand system (($.context bundle) loadClass java.lang.System)
-karaf@root()> system:getproperty karaf.name
-root
-{code}
-
-It means that you can create object using the {{new}} directive, and call methods on the objects:
-
-{code}
-karaf@root> map = (new java.util.HashMap)
-karaf@root> $map put 0 0
-karaf@root> $map
-0 0
-{code}
-
-h2. Examples
-
-The following examples show some scripts defined in {{etc/shell.init.script}}.
-
-The first example show a script to add a value into a configuration list:
-
-{code}
-#
-# Add a value at the end of a property in the given OSGi configuration
-#
-# For example:
-# > config-add-to-list org.ops4j.pax.url.mvn org.ops4j.pax.url.mvn.repositories http://scala-tools.org/repo-releases
-#
-config-add-to-list = {
- config:edit $1 ;
- a = (config:property-list | grep --color never $2 | tac) ;
- b = (echo $a | grep --color never "\b$3\b" | tac) ;
- if { ($b trim) isEmpty } {
- if { $a isEmpty } {
- config:property-set $2 $3
- } {
- config:property-append $2 ", $3"
- } ;
- config:update
- } {
- config:cancel
- }
-}
-{code}
-
-This second example shows a script to wait for an OSGi service, up to a given timeout, and combine this script in
-other scripts:
-
-{code}
-#
-# Wait for the given OSGi service to be available
-#
-wait-for-service-timeout = {
- _filter = $.context createFilter $1 ;
- _tracker = shell:new org.osgi.util.tracker.ServiceTracker $.context $_filter null ;
- $_tracker open ;
- _service = $_tracker waitForService $2 ;
- $_tracker close
-}
-#
-# Wait for the given OSGi service to be available with a timeout of 10 seconds
-#
-wait-for-service = {
- wait-for-service-timeout $1 10000
-}
-#
-# Wait for the given command to be available with a timeout of 10 seconds
-# For example:
-# > wait-for-command dev watch
-#
-wait-for-command = {
- wait-for-service "(&(objectClass=org.apache.felix.service.command.Function)(osgi.command.scope=$1)(osgi.command.function=$2))"
-}
-{code}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/security-framework.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/security-framework.conf b/manual/src/main/webapp/developers-guide/security-framework.conf
deleted file mode 100644
index d5da72b..0000000
--- a/manual/src/main/webapp/developers-guide/security-framework.conf
+++ /dev/null
@@ -1,695 +0,0 @@
-
-
-h1. Security framework
-
-Karaf supports [JAAS|http://download.oracle.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html] with some enhancements to allow JAAS to work nicely in an OSGi environment. This framework also features an OSGi keystore manager with the ability to deploy new keystores or truststores at runtime.
-
-h2. Overview
-
-This feature allows runtime deployment of JAAS based configuration for use in various parts of the application. This
-includes the remote console login, which uses the {{karaf}} realm, but which is configured with a dummy login module
-by default. These realms can also be used by the NMR, JBI components or the JMX server to authenticate users logging in
-or sending messages into the bus.
-
-In addition to JAAS realms, you can also deploy keystores and truststores to secure the remote shell console, setting up HTTPS connectors or using certificates for WS-Security.
-
-A very simple XML schema for spring has been defined, allowing the deployment of a new realm or a new keystore very easily.
-
-h2. Schema
-
-To override or deploy a new realm, you can use the following XSD which is supported by a Spring namespace handler and can thus be defined in a Spring xml configuration file.
-
-Following is the XML Schema to use when defining Karaf realms:
-{snippet:url=../jaas/blueprint/config/src/main/resources/org/apache/karaf/jaas/blueprint/config/karaf-jaas-1.1.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-You can find the schema at the following [location|http://karaf.apache.org/xmlns/jaas/v1.1.0].
-
-Here are two examples using this schema:
-{pygmentize:xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
- xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
-
- <!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
- <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
-
- <jaas:config name="myrealm">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- </jaas:module>
- </jaas:config>
-
-</blueprint>
-{pygmentize}
-
-{pygmentize:xml}
-<jaas:keystore xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
- name="ks"
- rank="1"
- path="classpath:privatestore.jks"
- keystorePassword="keyStorePassword"
- keyPasswords="myalias=myAliasPassword">
-</jaas:keystore>
-{pygmentize}
-
-The {{id}} attribute is the blueprint id of the bean, but it will be used by default as the name of the realm if no
-{{name}} attribute is specified. Additional attributes on the {{config}} elements are a {{rank}}, which is an integer.
-When the LoginContext looks for a realm for authenticating a given user, the realms registered in the OSGi registry are
-matched against the required name. If more than one realm is found, the one with the highest rank will be used, thus
-allowing the override of some realms with new values. The last attribute is {{publish}} which can be set to false to
-not publish the realm in the OSGi registry, thereby disabling the use of this realm.
-
-Each realm can contain one or more module definitions. Each module identifies a LoginModule and the {{className}}
-attribute must be set to the class name of the login module to use. Note that this login module must be available from
-the bundle classloader, so either it has to be defined in the bundle itself, or the needed package needs to be correctly
-imported. The {{flags}} attribute can take one of four values that are explained on the [JAAS documentation|http://svn.apache.org/repos/asf/karaf/tags/karaf-2.0.0/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/ProxyLoginModule.java].
-The content of the {{module}} element is parsed as a properties file and will be used to further configure the login module.
-
-Deploying such a code will lead to a [JaasRealm|http://svn.apache.org/repos/asf/karaf/tags/karaf-2.0.0/jaas/config/src/main/java/org/apache/karaf/jaas/config/JaasRealm.java] object in the OSGi registry, which will then be used when using the JAAS login module.
-
-h3. Configuration override and use of the {{rank}} attribute
-
-The {{rank}} attribute on the {{config}} element is tied to the ranking of the underlying OSGi service. When the JAAS
-framework performs an authentication, it will use the realm name to find a matching JAAS configuration. If multiple
-configurations are used, the one with the highest {{rank}} attribute will be used.
-So if you want to override the default security configuration in Karaf (which is used by the ssh shell, web console and
-JMX layer), you need to deploy a JAAS configuration with the name {{name="karaf"}} and {{rank="1"}}.
-
-{pygmentize:xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
- xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
-
- <!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
- <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
-
- <jaas:config name="karaf" rank="1">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- ...
- </jaas:module>
- </jaas:config>
-
-</blueprint>
-{pygmentize}
-
-
-h2. Architecture
-
-Due to constraints in the JAAS specification, one class has to be available for all bundles.
-This class is called [ProxyLoginModule|http://svn.apache.org/repos/asf/karaf/tags/karaf-2.0.0/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/ProxyLoginModule.java] and is a LoginModule that acts as a proxy for an OSGi defines LoginModule. If you plan to integrate this feature into another OSGi runtime, this class must be made available from the system classloader and the related package be part of the boot delegation classpath (or be deployed as a fragment attached to the system bundle).
-
-The xml schema defined above allows the use of a simple xml (leveraging spring xml extensibility) to configure and
-register a JAAS configuration for a given realm. This configuration will be made available into the OSGi registry as a
-[JaasRealm|http://svn.apache.org/repos/asf/karaf/tags/karaf-2.0.0/jaas/config/src/main/java/org/apache/karaf/jaas/config/JaasRealm.java] and the OSGi specific Configuration will look for such services.
-Then the proxy login module will be able to use the information provided by the realm to actually load the class from
-the bundle containing the real login module.
-
-Karaf itself provides a set of login modules ready to use, depending of the authentication backend that you need.
-
-In addition of the login modules, Karaf also support backend engine. The backend engine is coupled to a login module and
-allows you to manipulate users and roles directly from Karaf (adding a new user, delete an existing user, etc).
-The backend engine is constructed by a backend engine factory, registered as an OSGi service.
-Some login modules (for security reason for instance) don't provide backend engine.
-
-h2. Available realm and login modules
-
-Karaf comes with a default realm named "karaf" using login modules.
-
-Karaf also provides a set of login modules and backend engines to handle authentication needs for your environment.
-
-h3. PropertiesLoginModule
-
-| LoginModule | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule |
-| BackendEngineFactory | org.apache.karaf.jaas.modules.properties.PropertiesBackendEngineFactory |
-
-This login module is the one configured by default. It uses a properties text file to load the users, passwords and roles.
-
-|| Name || Description |
-| {{users}} | location of the properties file |
-
-This file uses the [properties file format|http://download.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)].
-The format of the properties is as follows, with each line defining a user, its password and associated roles:
-{code}
-user=password[,role][,role]...
-{code}
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = ${karaf.etc}/users.properties
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-The PropertiesLoginModule provides a backend engine allowing:
-* add a new user
-* delete an existing user
-* list the users, groups, and roles
-* add a new role to an user
-* delete a role from an user
-* add an user into a group
-* remove an user from a group
-* add a role to a group
-* delete a role from a group
-
-To enable the backend engine, you have to register the corresponding OSGi service. For instance, the following blueprint
-shows how to register the PropertiesLoginModule and the corresponding backend engine:
-
-{pygmentize:xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
- xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
-
- <jaas:config name="karaf" rank="-1">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = ${karaf.etc}/users.properties
- </jaas:module>
- </jaas:config>
-
- <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
- <bean class="org.apache.karaf.jaas.modules.properties.PropertiesBackingEngineFactory"/>
- </service>
-
-</blueprint>
-{pygmentize}
-
-h3. OsgiConfigLoginModule
-
-| LoginModule | org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule |
-| BackendEngineFactory | N/A |
-
-The OsgiConfigLoginModule uses the OSGi ConfigurationAdmin service to provide the users, passwords and roles.
-
-|| Name || Description |
-| {{pid}} | the PID of the configuration containing user definitions |
-
-The format of the configuration is the same than for the {{PropertiesLoginModule}} with properties prefixed with {{user.}}.
-
-For instance, in the Karaf etc folder, we create a file {{org.apache.karaf.authentication.cfg}} containing:
-
-{code}
-user.karaf=karaf,admin
-user.user=password,role
-{code}
-
-The following blueprint shows how to use this configuration:
-
-{pygmentize:xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
-
- <jaas:config name="karaf" rank="-1">
- <jaas:module className="org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule"
- flags="required">
- pid = org.apache.karaf.authentication
- </jaas:module>
- </jaas:config>
-
-</blueprint>
-{pygmentize}
-
-NB: the OsgiConfigLoginModule doesn't provide a backend engine.
-
-h3. JDBCLoginModule
-
-| LoginModule | org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule |
-| BackendEngineFactory | org.apache.karaf.jaas.modules.jdbc.JDBCBackendEngineFactory |
-
-The JDBCLoginModule uses a database to load the users, passwords and roles from a provided data source _(normal or XA)_.
-The data source and the queries for password and role retrieval are configurable using the following parameters.
-
-|| Name || Description ||
-| {{datasource}} | The datasource as on OSGi ldap filter or as JDNI name|
-| {{query.password}} | The SQL query that retries the password of the user |
-| {{query.role}} | The SQL query that retries the roles of the user |
-
-+Passing a data source as an OSGi ldap filter+
-
-To use an OSGi ldap filter, the prefix osgi: needs to be provided, as shown below:
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
- flags="required">
- datasource = osgi:javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
- query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
- query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-+Passing a data source as a JNDI name+
-
-To use an JNDI name, the prefix jndi: needs to be provided. The example below assumes the use of Aries jndi to expose
-services via JNDI.
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
- flags="required">
- datasource = jndi:aries:services/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
- query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
- query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-The JDBCLoginModule provides a backend engine allowing:
-* add a new user
-* delete an user
-* list users, roles
-* add a new role to an user
-* remove a role from an user
-
-NB: the groups are not fully supported by the JDBCBackingEngine.
-
-The following blueprint shows how to define the JDBCLoginModule with the corresponding backend engine:
-
-{pygmentize:xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
-
- <jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
- flags="required">
- datasource = jndi:aries:services/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
- query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
- query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
- insert.user = INSERT INTO USERS(USERNAME,PASSWORD) VALUES(?,?)
- insert.role = INSERT INTO ROLES(ROLE,USERNAME) VALUES(?,?)
- delete.user = DELETE FROM USERS WHERE USERNAME=?
- </jaas:module>
- </jaas:config>
-
- <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
- <bean class="org.apache.karaf.jaas.modules.jdbc.JDBCBackingEngineFactory"/>
- </service>
-
-</blueprint>
-{pygmentize}
-
-h3. LDAPLoginModule
-
-| LoginModule | org.apache.karaf.jaas.modules.ldap.LDAPLoginModule |
-| BackendEngineFactory | N/A |
-
-The LDAPLoginModule uses LDAP to load the users and roles and bind the users on the LDAP to check passwords.
-
-The LDAPLoginModule supports the following parameters:
-
-|| Name || Description ||
-| {{connection.url}} | The LDAP connection URL, e.g. ldap://hostname |
-| {{connection.username}} | Admin username to connect to the LDAP. This parameter is optional, if it's not provided, the LDAP connection will be anonymous. |
-| {{connection.password}} | Admin password to connect to the LDAP. Only used if the {{connection.username}} is specified. |
-| {{user.base.dn}} | The LDAP base DN used to looking for user, e.g. ou=user,dc=apache,dc=org |
-| {{user.filter}} | The LDAP filter used to looking for user, e.g. (uid=%u) where %u will be replaced by the username. |
-| {{user.search.subtree}} | If "true", the user lookup will be recursive (SUBTREE). If "false", the user lookup will be performed only at the first level (ONELEVEL). |
-| {{role.base.dn}} | The LDAP base DN used to looking for roles, e.g. ou=role,dc=apache,dc=org |
-| {{role.filter}} | The LDAP filter used to looking for user's role, e.g. (member:=uid=%u) |
-| {{role.name.attribute}} | The LDAP role attribute containing the role string used by Karaf, e.g. cn |
-| {{role.search.subtree}} | If "true", the role lookup will be recursive (SUBTREE). If "false", the role lookup will be performed only at the first level (ONELEVEL). |
-| {{role.mapping}} | Define a mapping between roles defined in the LDAP directory for the user, and corresponding roles in Karaf. The format is ldapRole1=karafRole1,karafRole2;ldapRole2=karafRole3,karafRole4. |
-| {{authentication}} | Define the authentication backend used on the LDAP server. The default is simple. |
-| {{initial.context.factory}} | Define the initial context factory used to connect to the LDAP server. The default is com.sun.jndi.ldap.LdapCtxFactory |
-| {{ssl}} | If "true" or if the protocol on the {{connection.url}} is {{ldaps}}, an SSL connection will be used |
-| {{ssl.provider}} | The provider name to use for SSL |
-| {{ssl.protocol}} | The protocol name to use for SSL (SSL for example)|
-| {{ssl.algorithm}} | The algorithm to use for the KeyManagerFactory and TrustManagerFactory (PKIX for example) |
-| {{ssl.keystore}} | The key store name to use for SSL. The key store must be deployed using a {{jaas:keystore}} configuration. |
-| {{ssl.keyalias}} | The key alias to use for SSL |
-| {{ssl.truststore}} | The trust store name to use for SSL. The trust store must be deployed using a {{jaas:keystore}} configuration. |
-
-A example of LDAPLoginModule usage follows:
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
- connection.url = ldap://localhost:389
- user.base.dn = ou=user,dc=apache,dc=org
- user.filter = (cn=%u)
- user.search.subtree = true
- role.base.dn = ou=group,dc=apache,dc=org
- role.filter = (member:=uid=%u)
- role.name.attribute = cn
- role.search.subtree = true
- authentication = simple
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-If you wish to use an SSL connection, the following configuration can be used as an example:
-{pygmentize:xml}
-<ext:property-placeholder />
-
-<jaas:config name="karaf" rank="1">
- <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
- connection.url = ldaps://localhost:10636
- user.base.dn = ou=users,ou=system
- user.filter = (uid=%u)
- user.search.subtree = true
- role.base.dn = ou=groups,ou=system
- role.filter = (uniqueMember=uid=%u)
- role.name.attribute = cn
- role.search.subtree = true
- authentication = simple
- ssl.protocol=SSL
- ssl.truststore=ks
- ssl.algorithm=PKIX
- </jaas:module>
-</jaas:config>
-
-<jaas:keystore name="ks"
- path="file:///${karaf.home}/etc/trusted.ks"
- keystorePassword="secret" />
-{pygmentize}
-
-The LDAPLoginModule supports the following patterns that you can use in the filter (user and role filters):
-
-* {{%u}} is replaced by the user
-* {{%dn}} is replaced by the user DN
-* {{%fqdn}} is replaced by the user full qualified DN ({{userDNNamespace}}).
-
-For instance, the following configuration will work properly with ActiveDirectory (adding the ActiveDirectory to the
-default {{karaf}} realm):
-
-{code}
-<jaas:config name="karaf" rank="2">
- <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
- initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
- connection.username=admin
- connection.password=xxxxxxx
- connection.protocol=
- connection.url=ldap://activedirectory_host:389
- user.base.dn=ou=Users,ou=there,DC=local
- user.filter=(sAMAccountName=%u)
- user.search.subtree=true
- role.base.dn=ou=Groups,ou=there,DC=local
- role.name.attribute=cn
- role.filter=(member=%fqdn)
- role.search.subtree=true
- authentication=simple
- </jaas:module>
-</jaas:config>
-{code}
-
-NB: the LDAPLoginModule doesn't provide backend engine. It means that the administration of the users and roles should be
-performed directly on the LDAP backend.
-
-h3. SyncopeLoginModule
-
-| LoginModule | org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule |
-| BackendEngineFactory | org.apache.karaf.jaas.modules.syncope.SyncopeBackendEngineFactory |
-
-The Syncope login module uses the Syncope REST API to authenticate users and retrieve the roles.
-
-The Syncope login module just requires one parameter:
-
-|| Name || Description ||
-| {{address}} | Location of the Syncope REST API |
-| {{admin.user}} | Admin username to administrate Syncope (only required by the backend engine) |
-| {{admin.password}} | Admin password to administrate Syncope (only required by the backend engine) |
-
-The following snippet shows how to use Syncope with the karaf realm:
-
-{code}
-<jaas:config name="karaf" rank="2">
- <jaas:module className="org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule" flags="required">
- address=http://localhost:9080/syncope/cxf
- admin.user=admin
- admin.password=password
- </jaas:module>
-</jaas:config>
-{code}
-
-SyncopeLoginModule comes with a backend engine allowing to manipulate users and roles. You have to register the
-SyncopeBackendEngineFactory service.
-
-For security reason, the SyncopeLoginModule backend engine allows only to list users and roles. You can't create or delete
-users and roles directly from Karaf. To do it, you have to use the Syncope web console.
-
-For instance, the following blueprint descriptor enables the SyncopeLoginModule and the backend engine factory:
-
-{code}
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
- xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
-
- <jaas:config name="karaf" rank="2">
- <jaas:module className="org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule"
- flags="required">
- address=http://localhost:9080/syncope/cxf
- admin.user=admin
- admin.password=password
- </jaas:module>
- </jaas:config>
-
- <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
- <bean class="org.apache.karaf.jaas.modules.syncope.SyncopeBackingEngineFactory"/>
- </service>
-
-</blueprint>
-{code}
-
-h2. Encryption service
-
-The [EncryptionService|http://svn.apache.org/repos/asf/karaf/trunk/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java] is a service registered in the OSGi registry providing means to encrypt and check encrypted passwords. This service acts as a factory for [Encryption|http://svn.apache.org/repos/asf/karaf/trunk/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/Encryption.java] objects actually performing the encryption.
-
-This service is used in all Karaf login modules to support encrypted passwords.
-
-h3. Configuring properties
-
-Each login module supports the following additional set of properties:
-|| Name || Description ||
-| {{encryption.name}} | Name of the encryption service registered in OSGi (cf. paragraph [below|#Jasypt]) |
-| {{encryption.enabled}} | Boolean used to turn on encryption |
-| {{encryption.prefix}} | Prefix for encrypted passwords |
-| {{encryption.suffix}} | Suffix for encrypted passwords |
-| {{encryption.algorithm}} | Name of an algorithm to be used for hashing, like "MD5" or "SHA-1" |
-| {{encryption.encoding}} | Encrypted passwords encoding (can be {{hexadecimal}} or {{base64}}) |
-| {{role.policy}} | A policy for identifying roles (can be {{prefix}} or {{group}}) [below|#Role discovery policies]) |
-| {{role.discriminator}} | A discriminator value to be used by the role policy |
-
-A simple example follows:
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- encryption.enabled = true
- encryption.algorithm = MD5
- encryption.encoding = hexadecimal
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-h3. Prefix and suffix
-
-The login modules have the ability to support both encrypted and plain passwords at the same time. In some cases, some login modules may be able to encrypt the passwords on the fly and save them back in an encrypted form.
-
-h3. Jasypt
-
-Karaf default installation comes with a simple encryption service which usually fullfill simple needs. However, in some
-cases, you may want to install the [Jasypt|http://www.jasypt.org/] library which provides stronger encryption algorithms
-and more control over them.
-
-To install the Jasypt library, the easiest way is to install the available feature:
-{code}
-karaf@root> features:install jasypt-encryption
-{code}
-
-It will download and install the required bundles and also register an {{EncryptionService}} for Jasypt in the OSGi registry.
-
-When configuring a login module to use Jasypt, you need to specify the {{encryption.name}} property and set it to a value of {{jasypt}} to make sure the Jasypt encryption service will be used.
-
-In addition to the standard properties above, the Jasypt service provides the following parameters:
-
-|| Name || Description ||
-| {{providerName}} | Name of the {{java.security.Provider}} name to use for obtaining the digest algorithm |
-| {{providerClassName}} | Class name for the security provider to be used for obtaining the digest algorithm |
-| {{iterations}} | Number of times the hash function will be applied recursively |
-| {{saltSizeBytes}} | Size of the salt to be used to compute the digest |
-| {{saltGeneratorClassName}} | Class name of the salt generator |
-
-A typical realm definition using Jasypt encryption service would look like:
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- encryption.enabled = true
- encryption.name = jasypt
- encryption.algorithm = SHA-256
- encryption.encoding = base64
- encryption.iterations = 100000
- encryption.saltSizeBytes = 16
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-h3. Using encrypted property placeholders
-
-When using blueprint framework for OSGi for configuring devices that requires passwords like JDBC datasources,
-it is undesirable to use plain text passwords in configuration files. To avoid this problem it is good to store database
-passwords in encrypted format and use encrypted property placeholders when ever possible.
-
-Encrypted properties can be stored in plain properties files. The encrypted content is wrapped by an ENC() function.
-
-{code}
-#db.cfg / db.properties
-db.url=localhost:9999
-db.username=admin
-db.password=ENC(zRM7Pb/NiKyCalroBz8CKw==)
-{code}
-
-The encrypted property placeholders can be used either by defining Apache Aries ConfigAdmin {{property-placeholder}}
-or by directly using the Apache Karaf {{property-placeholder}}. It has one child element {{encryptor}} that contains
-the actual Jasypt configuration. For detailed information on how to configure the different Jasypt encryptors, see the
-[Jasypt documentation|http://www.jasypt.org/general-usage.html].
-
-A typical definition using Jasypt encryption would look like:
-
-{pygmentize:xml}
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
- xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
- xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0">
-
- <!-- Configuration via ConfigAdmin property-placeholder -->
- <!-- the etc/*.cfg can contain encrypted values with ENC() function -->
- <cm:property-placeholder persistent-id="db" update-strategy="reload">
- <cm:default-properties>
- <cm:property name="encoded" value="ENC(${foo})"/>
- </cm:default-properties>
- </cm:property-placeholder>
-
- <!-- Configuration via properties file -->
- <!-- Instead of ConfigAdmin, we can load "regular" properties file from a location -->
- <!-- Again, the db.properties file can contain encrypted values with ENC() function -->
- <ext:property-placeholder>
- <ext:location>file:etc/db.properties</ext:location>
- </ext:property-placeholder>
-
- <enc:property-placeholder>
- <enc:encryptor class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
- <property name="config">
- <bean class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
- <property name="algorithm" value="PBEWithMD5AndDES"/>
- <property name="passwordEnvName" value="ENCRYPTION_PASSWORD"/>
- </bean>
- </property>
- </enc:encryptor>
- </enc:property-placeholder>
-
- <!-- ... -->
-
-</blueprint>
-{pygmentize}
-
-Don't forget to install the jasypt feature to add the support of the enc namespace:
-
-{code}
-karaf@root()> feature:install jasypt-encryption
-{code}
-
-h2. Role discovery policies
-
-The JAAS specification does not provide means to distinguish between User and Role Principals without referring to the
-specification classes. In order to provide means to the application developer to decouple the application from Karaf
-JAAS implementation role policies have been created.
-
-A role policy is a convention that can be adopted by the application in order to identify Roles, without depending from the implementation. Each role policy can be cofigured by setting a "role.policy" and "role.discriminator" property to the login module configuration. Currently, Karaf provides two policies that can be applied to all Karaf Login Modules.
-
-# Prefixed Roles
-# Grouped Roles
-
-+Prefixed Roles+
-When the prefixed role policy is used the login module applies a configurable prefix _(property role.discriminator)_ to
-the role, so that the application can identify the role's principals by its prefix. Example:
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- role.policy = prefix
- role.discriminator = ROLE_
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-The application can identify the role principals using a snippet like this:
-
-{pygmentize:java}
-LoginContext ctx = new LoginContext("karaf", handler);
-ctx.login();
-authenticated = true;
-subject = ctx.getSubject();
-for (Principal p : subject.getPrincipals()) {
- if (p.getName().startsWith("ROLE_")) {
- roles.add((p.getName().substring("ROLE_".length())));
- }
-}
-{pygmentize}
-
-+Grouped Roles+
-When the group role policy is used the login module provides all roles as members of a group with a configurable name _(property role.discriminator)_. Example:
-
-{pygmentize:xml}
-<jaas:config name="karaf">
- <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
- flags="required">
- users = $[karaf.base]/etc/users.properties
- role.policy = group
- role.discriminator = ROLES
- </jaas:module>
-</jaas:config>
-{pygmentize}
-
-{pygmentize:java}
-LoginContext ctx = new LoginContext("karaf", handler);
-ctx.login();
-authenticated = true;
-subject = ctx.getSubject();
-for (Principal p : subject.getPrincipals()) {
- if ((p instanceof Group) && ("ROLES".equalsIgnoreCase(p.getName()))) {
- Group g = (Group) p;
- Enumeration<? extends Principal> members = g.members();
- while (members.hasMoreElements()) {
- Principal member = members.nextElement();
- roles.add(member.getName());
- }
- }
-}
-{pygmentize}
-
-h2. Default role policies
-
-The previous section describes how to leverage role policies. However, Karaf provides a default role policy, based on the following class names:
-
-* org.apache.karaf.jaas.modules.UserPrincipal
-* org.apache.karaf.jaas.modules.RolePrincipal
-* org.apache.karaf.jaas.modules.GroupPrincipal
-
-It allows you to directly handling the role class:
-
-{pygmentize:java}
-String rolePrincipalClass = "org.apache.karaf.jaas.modules.RolePrincipal";
-
-for (Principal p : subject.getPrincipals()) {
- if (p.getClass().getName().equals(rolePrincipalClass)) {
- roles.add(p.getName());
- }
-}
-{pygmentize}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/services.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/services.conf b/manual/src/main/webapp/developers-guide/services.conf
deleted file mode 100644
index ab4e00e..0000000
--- a/manual/src/main/webapp/developers-guide/services.conf
+++ /dev/null
@@ -1 +0,0 @@
-h1. OSGi services
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/writing-tests.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/writing-tests.conf b/manual/src/main/webapp/developers-guide/writing-tests.conf
deleted file mode 100644
index e4c8f5a..0000000
--- a/manual/src/main/webapp/developers-guide/writing-tests.conf
+++ /dev/null
@@ -1,328 +0,0 @@
-h1. Writing integration tests
-
-We recommend using [PAX Exam|http://team.ops4j.org/wiki/display/paxexam/Pax+Exam] to write integration tests when developing applications using Karaf.
-
-Starting with Karaf 3.0 we've also included a component briding between Karaf and Pax Exam making it easier to write integration tests for Karaf or Karaf based Distributions such as [Servicemix|http://servicemix.apache.org] or [Geronimo|http://geronimo.apache.org].
-
-h2. Introduction
-
-To make use of this new framework simply add the following dependencies into your integration tests pom.xml:
-
-{pygmentize:xml}
-<!-- Karaf Test Framework Version -->
-<dependency>
- <groupId>org.apache.karaf.tooling.exam</groupId>
- <artifactId>org.apache.karaf.tooling.exam.container</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
-</dependency>
-<!-- Pax Exam version you would like to use. At least 2.2.x is required. -->
-<dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit4</artifactId>
- <version>${pax.exam.version}</version>
- <scope>test</scope>
-</dependency>
-{pygmentize}
-
-As a next step you need to reference the distribution you want to run your tests on. For example, if you want to run your tests on Karaf the following section would be required in the integration tests pom.xml:
-
-{pygmentize:xml}
-<dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <version>${project.version}</version>
- <type>zip</type>
- <scope>test</scope>
-</dependency>
-{pygmentize}
-
-If you want to make use of Exams "versionAsInProject" feature you also need to add the following section:
-
-{pygmentize:xml}
-<build>
- <plugins>
- <plugin>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <version>${plugin.depends.version}</version>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
-</build>
-{pygmentize}
-
-With this done we can start writing our first test case:
-
-{pygmentize:java}
-import static junit.framework.Assert.assertTrue;
-import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.CoreOptions.maven;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.ExamReactorStrategy;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
-
-@RunWith(JUnit4TestRunner.class)
-@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
-public class VersionAsInProjectKarafTest {
-
- @Configuration
- public Option[] config() {
- return new Option[]{ karafDistributionConfiguration().frameworkUrl(
- maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip").versionAsInProject())
- .karafVersion("2.2.4").name("Apache Karaf")};
- }
-
- @Test
- public void test() throws Exception {
- assertTrue(true);
- }
-}
-{pygmentize}
-
-h2. Commands
-
-Basically the Pax Exam - Karaf bridge introduced with 3.0 should support all commands you know from Pax Exam 2.x. In addition we've added various additional commands to make your life easier. Those commands are listed and explained in this sub section.
-
-As a small remark: All of the Options explained here are also accessible via the static methods in the KarafDistributionOption class in the options package automatically on your classpath when you reference the container package.
-
-h3. KarafDistributionConfigurationOption
-
-The framework itself is non of the typical runtimes you define normally in PAXEXAM. Instead you define a packed distribution as zip or tar.gz. Those distributions have to follow the Karaf packaging style. Therefore instead of Karaf you can also enter Servicemix or Geronimo.
-
-{pygmentize:java}
-new KarafDistributionConfigurationOption(
- "mvn:org.apache.karaf/apache-karaf/2.2.4/zip", // artifact to unpack and use
- "karaf", // name; display only
- "2.2.4") // the karaf version; this one is relevant since the startup script differs between versions
-{pygmentize}
-
-or for Servicemix e.g.
-
-{pygmentize:java}
-new KarafDistributionConfigurationOption(
- "mvn:org.apache.servicemix/apache-servicemix/4.4.0/zip", // artifact to unpack and use
- "servicemix", // name; display only
- "2.2.4") // the karaf version; this one is relevant since the startup script differs between versions
-{pygmentize}
-
-As an alternative you can also use the maven url resolvers. Please keep in mind that this only works starting with karaf-3.0.0 since there will be problems with the pax-url version. In addition, if you want to make use of the versionAsInProject part you also need to define the following maven-plugin in the pom file of your integration tests:
-
-{pygmentize:xml}
-...
-<dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <type>zip</type>
- <classifier>bin</classifier>
- <scope>test</scope>
-</dependency>
-...
-<plugin>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
-</plugin>
-{pygmentize}
-
-{pygmentize:java}
-@Configuration
- public Option[] config() {
- return new Option[]{ karafDistributionConfiguration().frameworkUrl(
- maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip")
- .classifier("bin").versionAsInProject()) };
- }
-{pygmentize}
-
-In addition to the framework specification options this option also includes various additional configuration options. Those options are used to configure the internal properties of the runtime environment.
-
-h4. Unpack Directory
-Paxexam-Karaf Testframework extracts the distribution you specify by default into the paxexam config directory. If you would like to unpack them into your target directory simply extend the KarafDistributionConfigurationOption with the unpackDirectoryFile like shown in the next example:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip")
- .unpackDirectory(new File("target/paxexam/unpack/")) };
-}
-{pygmentize}
-
-h4. Use Deploy Folder
-
-Karaf distributions come by default with a deploy folder where you can simply drop artifacts to be deployed. In some distributions this folder might have been removed. To still be able to deploy your additional artifacts using default Pax Exam ProvisionOptions you can configure PaxExam Karaf to use a features.xml (which is directly added to your etc/org.apache.karaf.features.cfg) for those deploys. To use it instead of the deploy folder simply do the following:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip")
- .useDeployFolder(false)) };
-}
-{pygmentize}
-
-h3. KarafDistributionKitConfigurationOption
-
-The KarafDistributionKitConfigurationOption is almost equal to all variations of the KarafDistributionConfigurationOption with the exception that it requires to have set a platform and optionally the executable and the files which should be made executable additionally. By default it is bin/karaf for nix platforms and bin\karaf.bat for windows platforms. The executable option comes in handy if you like to e.g. embed an own java runtime. You should add a windows AND a linux Kit definition. The framework automatically takes the correct one then. The following shows a simple example for karaf:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{
- new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/${project.version}/zip",
- Platform.WINDOWS).executable("bin\\karaf.bat").filesToMakeExecutable("bin\\admin.bat"),
- new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/${project.version}/tar.gz", "karaf",
- Platform.NIX).executable("bin/karaf").filesToMakeExecutable("bin/admin") };
-}
-{pygmentize}
-
-h3. KarafDistributionConfigurationFilePutOption
-
-The option replaces or adds an option to one of Karaf's configuration files:
-
-{pygmentize:java}
-new KarafDistributionConfigurationFilePutOption(
- "etc/config.properties", // config file to modify based on karaf.base
- "karaf.framework", // key to add or change
- "equinox") // value to add or change
-{pygmentize}
-
-This option could also be used in "batch-mode" via a property file. Therefore use the KarafDistributionOption#editConfigurationFilePut(final String configurationFilePath, File source, String... keysToUseFromSource) method. This option allows you to add all properties found in the file as KarafDistributionConfigurationFilePutOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily put an entire range of properties.
-
-h3. KarafDistributionConfigurationFileExtendOption
-
-This one does the same as the KarafDistributionConfigurationFilePutOption option with the one difference that it either adds or appends a specific property. This is especially useful if you do not want to store the entire configuration in the line in your code.
-
-This option could also be extended in "batch-mode" via a property file. Therefore use the KarafDistributionOption#editConfigurationFileExtend(final String configurationFilePath, File source, String... keysToUseFromSource) method. This option allows you to extend all properties found in the file as KarafDistributionConfigurationFileExtendOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily extend an entire range of properties.
-
-h3. KarafDistributionConfigurationFileReplacementOption
-
-The file replacement option allows you to simply replace a file in you Karaf distribution with a different file:
-
-{pygmentize:java}
-new KarafDistributionConfigurationFileReplacementOption("etc/tests.cfg", new File(
- "src/test/resources/BaseKarafDefaultFrameworkDuplicatedPropertyEntryTestSecondKey"));
-{pygmentize}
-
-h3. ProvisionOption
-
-The new test container fully supports the provision option. Feel free to use any option provided here by paxexam itself (e.g. Maven resolver). All those artifacts are copied into the deploy folder of your Karaf distribution before it is started. Therefore they all will be available after startup.
-
-h3. KarafDistributionConfigurationConsoleOption
-
-The test container supports options to configure if the localConsole and/or the remote shell should be started. Possible options to do so are shown in the following two examples:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- configureConsole().ignoreLocalConsole().startRemoteShell() };
-}
-{pygmentize}
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- configureConsole().startLocalConsole(), configureConsole().ignoreRemoteShell() };
-}
-{pygmentize}
-
-h3. VMOption
-
-The Karaf container passes the vmOptions now through to the Karaf environment. They are directly passed to the startup of the container. In addition the KarafDistributionOption helper has two methods (debugConfiguration() and debugConfiguration(String port, boolean hold)) to activate debugging quickly.
-
-h3. LogLevelOption
-
-The Paxexam-Karaf specific log-level option allows an easy way to set a specific log-level for the Karaf based distribution. For example simply add the following to your Option[] array to get TRACE logging:
-
-{pygmentize:java}
-import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
-...
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- logLevel(LogLevel.TRACE) };
-}
-{pygmentize}
-
-h3. DoNotModifyLogOption
-
-The option to modify the logging behavior requires that the container automatically modifies the logging configuration file. If you would like to suppress this behavior simply set the doNotModifyLogConfiguration option as shown in the next example:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- doNotModifyLogConfiguration() };
-}
-{pygmentize}
-
-h3. KeepRuntimeFolderOption
-
-Per default the test container removes all test runner folders. If you want to keep them for any reasons (e.g. check why a test fails) set the following option:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- keepRuntimeFolder() };
-}
-{pygmentize}
-
-h3. FeaturesScannerProvisionOption
-
-The FeaturesScannerProvisionOption (e.g. CoreOption.scanFeature()) are directly supported by the Paxexam Karaf Testframework.
-
-h3. BootDelegationOption
-
-The BootDelegationOption as known from PaxExam is also supported added the boot delegation string directly into the correct property files.
-
-h3. SystemPackageOption
-
-The Standard Exam SystemPackageOption is implemented by adding those packages to "org.osgi.framework.system.packages.extra" of the config.properties file.
-
-h3. BootClasspathLibraryOption
-
-The BootClasspathLibraryOption is honored by copying the urls into the lib directory where they are automatically taken and worked on.
-
-h3. ExamBundlesStartLevel
-
-The ExamBundlesStartLevel can be used to configure the start lvl of the bundles provided by the test-frameworks features.xml. Simply use it as a new option like:
-
-{pygmentize:java}
-@Configuration
-public Option[] config() {
- return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/${project.version}/zip"),
- useOwnExamBundlesStartLevel(4) };
-}
-{pygmentize}
-
-h2. Driver
-
-Drivers are the parts of the framework responsible for running the Karaf Based Distribution. By default the already in the overview explained KarafDistributionConfigurationOption uses a JavaRunner starting the distribution platform independent but not using the scripts in the distribution. If you like to test those scripts too an option is to to use the ScriptRunner via the KarafDistributionKitConfigurationOption instead.
-
-h3. JavaRunner
-
-The JavaRunner builds the entire command itself and executes Karaf in a new JVM. This behavior is more or less exactly what the default runner does. Simply use the KarafDistributionConfigurationOption as explained in the Commands section to use this.
-
-h3. ScriptRunner
-The script runner has the disadvantage over the java runner that it is also platform dependent. The advantage though is that you can also test your specific scripts. To use it follow the explanation of the KarafDistributionKitConfigurationOption in the Commands section.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/asf-logo.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/asf-logo.png b/manual/src/main/webapp/images/asf-logo.png
deleted file mode 100644
index d824fab..0000000
Binary files a/manual/src/main/webapp/images/asf-logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/bg.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/bg.png b/manual/src/main/webapp/images/bg.png
deleted file mode 100644
index 878a84f..0000000
Binary files a/manual/src/main/webapp/images/bg.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/bg02-blue-left.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/bg02-blue-left.png b/manual/src/main/webapp/images/bg02-blue-left.png
deleted file mode 100644
index 057efdf..0000000
Binary files a/manual/src/main/webapp/images/bg02-blue-left.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/bg02-blue-right.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/bg02-blue-right.png b/manual/src/main/webapp/images/bg02-blue-right.png
deleted file mode 100644
index edf9a9d..0000000
Binary files a/manual/src/main/webapp/images/bg02-blue-right.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/bg02-white-left-nogr.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/bg02-white-left-nogr.png b/manual/src/main/webapp/images/bg02-white-left-nogr.png
deleted file mode 100644
index 1c5186c..0000000
Binary files a/manual/src/main/webapp/images/bg02-white-left-nogr.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/bg02-white-right-nogr.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/bg02-white-right-nogr.png b/manual/src/main/webapp/images/bg02-white-right-nogr.png
deleted file mode 100644
index 9734def..0000000
Binary files a/manual/src/main/webapp/images/bg02-white-right-nogr.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/big-bullet.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/big-bullet.png b/manual/src/main/webapp/images/big-bullet.png
deleted file mode 100644
index f036db5..0000000
Binary files a/manual/src/main/webapp/images/big-bullet.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/deployer.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/deployer.png b/manual/src/main/webapp/images/deployer.png
deleted file mode 100644
index 505eb3c..0000000
Binary files a/manual/src/main/webapp/images/deployer.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_admin.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_admin.jpg b/manual/src/main/webapp/images/jconsole_admin.jpg
deleted file mode 100644
index 93e8d0e..0000000
Binary files a/manual/src/main/webapp/images/jconsole_admin.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_connect.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_connect.jpg b/manual/src/main/webapp/images/jconsole_connect.jpg
deleted file mode 100644
index 6041ee1..0000000
Binary files a/manual/src/main/webapp/images/jconsole_connect.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_features.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_features.jpg b/manual/src/main/webapp/images/jconsole_features.jpg
deleted file mode 100644
index 233e5fa..0000000
Binary files a/manual/src/main/webapp/images/jconsole_features.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_memory.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_memory.jpg b/manual/src/main/webapp/images/jconsole_memory.jpg
deleted file mode 100644
index c9fbb29..0000000
Binary files a/manual/src/main/webapp/images/jconsole_memory.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_overview.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_overview.jpg b/manual/src/main/webapp/images/jconsole_overview.jpg
deleted file mode 100644
index b41a72b..0000000
Binary files a/manual/src/main/webapp/images/jconsole_overview.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_summary.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_summary.jpg b/manual/src/main/webapp/images/jconsole_summary.jpg
deleted file mode 100644
index 7245d12..0000000
Binary files a/manual/src/main/webapp/images/jconsole_summary.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/jconsole_threads.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/jconsole_threads.jpg b/manual/src/main/webapp/images/jconsole_threads.jpg
deleted file mode 100644
index b4c0cb2..0000000
Binary files a/manual/src/main/webapp/images/jconsole_threads.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/karaf-logo.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/karaf-logo.png b/manual/src/main/webapp/images/karaf-logo.png
deleted file mode 100644
index 066ab86..0000000
Binary files a/manual/src/main/webapp/images/karaf-logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/karaf.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/karaf.png b/manual/src/main/webapp/images/karaf.png
deleted file mode 100644
index f9fb4a4..0000000
Binary files a/manual/src/main/webapp/images/karaf.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/karaf2.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/karaf2.png b/manual/src/main/webapp/images/karaf2.png
deleted file mode 100644
index f9fb4a4..0000000
Binary files a/manual/src/main/webapp/images/karaf2.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/left-box-bottom.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/left-box-bottom.png b/manual/src/main/webapp/images/left-box-bottom.png
deleted file mode 100644
index 0495248..0000000
Binary files a/manual/src/main/webapp/images/left-box-bottom.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/left-box-right.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/left-box-right.png b/manual/src/main/webapp/images/left-box-right.png
deleted file mode 100644
index 2698074..0000000
Binary files a/manual/src/main/webapp/images/left-box-right.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/images/left-box-top.png
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/images/left-box-top.png b/manual/src/main/webapp/images/left-box-top.png
deleted file mode 100644
index e1fc26e..0000000
Binary files a/manual/src/main/webapp/images/left-box-top.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/index.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/index.conf b/manual/src/main/webapp/index.conf
deleted file mode 100644
index 4397cc1..0000000
--- a/manual/src/main/webapp/index.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-h1. Apache Karaf
-
-This project contains documentation about Apache Karaf.
-
-* [Karaf Overview|overview]
-* [Update Notes|update-notes]
-* [Quick Start|quick-start]
-* [Users Guide|users-guide/index]
-* [Developers Guide|developers-guide/index]
-* [Commands Reference|commands/commands]
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/manual.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/manual.conf b/manual/src/main/webapp/manual.conf
deleted file mode 100644
index de21749..0000000
--- a/manual/src/main/webapp/manual.conf
+++ /dev/null
@@ -1,87 +0,0 @@
-{attributes:layout=/WEB-INF/scalate/layouts/print.ssp}
-
-{div:class=title}
-!/images/karaf-logos.png!
-\\
-\\
-\\
-\\
-Apache Karaf
-Users' Guide
-\\
-\\
-\\
-\\
-{div}
-
-{div:class=copyright-section}
-Copyright 2008-2014 The Apache Software Foundation
-
-The PDF format of the Karaf Manual has been generated by Prince XML (http://www.princexml.com).
-{div}
-
-
-{div:class=toc-title}
-Table of contents
-{div}
-
-{toc:maxLevel=2}
-
-h1. Overview
-{include:overview.conf}
-
-h1. Quick Start
-{include:quick-start.conf}
-
-h1. Users Guide
-{include:users-guide/installation.conf}
-{include:users-guide/directory-structure.conf}
-{include:users-guide/start-stop.conf}
-{include:users-guide/wrapper.conf}
-{include:users-guide/console.conf}
-{include:users-guide/remote.conf}
-{include:users-guide/log}
-{include:users-guide/configuration.conf}
-{include:users-guide/urls.conf}
-{include:users-guide/provisioning.conf}
-{include:users-guide/deployers}
-{include:users-guide/kar}
-{include:users-guide/instances}
-{include:users-guide/security}
-{include:users-guide/obr}
-{include:users-guide/enterprise}
-{include:users-guide/webcontainer}
-{include:users-guide/jndi}
-{include:users-guide/jta}
-{include:users-guide/jdbc}
-{include:users-guide/jms}
-{include:users-guide/jpa}
-{include:users-guide/ejb}
-{include:users-guide/cdi}
-{include:users-guide/failover}
-{include:users-guide/monitoring}
-{include:users-guide/webconsole}
-{include:users-guide/tuning}
-
-h1. Developers Guide
-{include:developers-guide/developer-commands.conf}
-{include:developers-guide/scripting.conf}
-{include:developers-guide/connect.conf}
-{include:developers-guide/branding.conf}
-{include:developers-guide/extending.conf}
-{include:developers-guide/karaf-maven-plugin.conf}
-{include:developers-guide/karaf-maven-plugin-features-add-to-repository.conf}
-{include:developers-guide/karaf-maven-plugin-features-generate-descriptor.conf}
-{include:developers-guide/karaf-maven-plugin-features-validate-descriptor.conf}
-{include:developers-guide/karaf-maven-plugin-features-create-kar.conf}
-{include:developers-guide/karaf-maven-plugin-commands-generate-help.conf}
-{include:developers-guide/karaf-maven-plugin-instance-create-archive.conf}
-{include:developers-guide/custom-distribution.conf}
-{include:developers-guide/services.conf}
-{include:developers-guide/creating-bundles.conf}
-{include:developers-guide/archetypes.conf}
-{include:developers-guide/security-framework.conf}
-{include:developers-guide/debugging.conf}
-{include:developers-guide/writing-tests.conf}
-{include:developers-guide/github-contributions.conf}
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/overview.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/overview.conf b/manual/src/main/webapp/overview.conf
deleted file mode 100644
index 1f9ba69..0000000
--- a/manual/src/main/webapp/overview.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-h1. Apache Karaf Overview
-
-Apache Karaf is a modern and polymorphic container.
-
-It's a lightweight, powerful, and enterprise ready container powered by OSGi.
-You can deploy different kind of applications in Karaf, OSGi or non-OSGi.
-
-With this flexibility, Karaf is the perfect container for microservices, systems integration, big data, and much more.
-
-Apache Karaf uses either the Apache Felix or Eclipse Equinox OSGi frameworks, providing additional features on top of the framework.
-
-Apache Karaf can be scaled from a very lightweight container to a fully featured enterprise service: it's a very flexible and extensible container, covering all the major needs.
-
-Here is a short list of provided features:
-
-* *Hot deployment*: simply drop a file in the {{deploy}} directory, Apache Karaf will detect the type of the file and
- try to deploy it.
-* *Complete Console*: Apache Karaf provides a complete Unix-like console where you can completely manage the container.
-* *Dynamic Configuration*: Apache Karaf provides a set of commands focused on managing its own configuration.
- All configuration files are centralized in the {{etc}} folder. Any change in a configuration file is noticed and reloaded.
-* *Advanced Logging System*: Apache Karaf supports all the popular logging frameworks (slf4j, log4j, etc). Whichever
- logging framework you use, Apache Karaf centralizes the configuration in one file.
-* *Provisioning*: Apache Karaf supports a large set of URLs where you can install your applications (Maven repository, HTTP,
- file, etc). It also provides the concept of "Karaf Features" which is a way to describe your application.
-* *Management*: Apache Karaf is an enterprise-ready container, providing many management indicators and operations
- via JMX.
-* *Remote*: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also
- accessible remotely.
-* *Security*: Apache Karaf provides a complete security framework (based on JAAS), and provides a RBAC (Role-Based Access
- Control) mechanism for console and JMX access.
-* *Instances*: multiple instances of Apache Karaf can be managed directly from a main instance (root).
-* *OSGi frameworks*: Apache Karaf is not tightly coupled to one OSGi framework. By default, Apache Karaf runs with the Apache Felix
- Framework, but you can easily switch to Equinox (just change one property in a configuration file).
-
-!/images/karaf.png!
-
-
[05/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/quick-start.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/quick-start.conf b/manual/src/main/webapp/quick-start.conf
deleted file mode 100644
index fa3c462..0000000
--- a/manual/src/main/webapp/quick-start.conf
+++ /dev/null
@@ -1,162 +0,0 @@
-h1. Quick Start
-
-These instructions should help you get Apache Karaf up and running in 5 to 15 minutes.
-
-h2. Prerequisites
-
-Karaf requires a Java SE 7 or Java SE 8 environment to run. Refer to [http://www.oracle.com/technetwork/java/javase/] for details on how to download and install Java SE 1.7 or greater.
-
-* Open a Web browser and access the following URL: [http://karaf.apache.org/index/community/download.html]
-* Download the binary distribution that matches your system (zip for windows, tar.gz for unixes)
-* Extract the archive to a new folder on your hard drive; for example in c:\karaf - from now on this directory will be referenced as <KARAF_HOME>.
-
-h2. Start the server
-
-Open a command line console and change the directory to <KARAF_HOME>.
-
-To start the server, run the following command in Windows:
-{code}
-bin\karaf.bat
-{code}
-respectively on Unix:
-{code}
-bin/karaf
-{code}
-You should see the following information on the command line console:
-
-{code}
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
-
-karaf@root()>
-
-{code}
-
-h2. Some shell Basics
-
-You can now run your first command. Simply type the {{<tab>}} key in the console.
-{code:borderStyle=solid}
-karaf@root()> Display all 294 possibilities? (y or n)
-...
-shell:logout shell:more shell:new shell:printf shell:sleep shell:sort shell:source
-shell:stack-traces-print shell:tac shell:tail shell:threads shell:watch shell:wc shell:while
-shutdown sleep sort source ssh ssh ssh-host-change
-ssh-port-change ssh:ssh stack-traces-print start start-level status stop
-su sudo system system:framework system:name system:property system:shutdown
-system:start-level system:version tac tail threads tree-show uninstall
-update user-add user-delete user-list version version-list wait
-watch wc while
-{code}
-
-You can then grab more specific help for a given command using the {{--help}} option for this command:
-
-{code:borderStyle=solid}
-karaf@root()> bundle:list --help
-DESCRIPTION
- bundle:list
-
- Lists all installed bundles.
-
-SYNTAX
- bundle:list [options] [ids]
-
-ARGUMENTS
- ids
- The list of bundle (identified by IDs or name or name/version) separated by whitespaces
-
-OPTIONS
- -t
- Specifies the bundle threshold; bundles with a start-level less than this value will not get printed out.
- --no-format
- Disable table rendered output
- -s
- Shows the symbolic name
- -l
- Show the locations
- --no-ellipsis
-
- --help
- Display this help message
- -u
- Shows the update locations
- --context, -c
- Use the given bundle context
- (defaults to 0)
- -r
- Shows the bundle revisions
-{code}
-
-Note that the console supports tab completion so if you start typing a command it will show all possible completions and also auto complete if there is only one completion.
-
-h2. Deploy a sample application
-
-While you will learn in the Karaf user's guide how to fully use and leverage Apache Karaf, let's install a sample [Apache Camel|http://camel.apache.org] application for now:
-
-In the console, run the following commands:
-{code}
-karaf@root()> feature:repo-add camel 2.15.2
-Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.15.2/xml/features
-karaf@root()> feature:install camel-spring
-karaf@root()> bundle:install -s mvn:org.apache.camel/camel-example-osgi/2.15.2
-Bundle ID: 82
-{code}
-
-The example installed is using Camel to start a timer every 2 seconds and output a message in the log.
-The previous commands download the Camel features descriptor and install the example feature.
-
-You can display the log in the shell:
-
-{code}
-karaf@root()> log:display
-...
-2015-06-30 13:39:44,731 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:44 CEST 2015]
-2015-06-30 13:39:46,730 | INFO | timer://myTimer | MyTransform | 82 - camel-example-osgi - 2.15.2 | >>>> SpringDSL set body: Tue Jun 30 13:39:46 CEST 2015
-2015-06-30 13:39:46,731 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:46 CEST 2015]
-2015-06-30 13:39:48,730 | INFO | timer://myTimer | MyTransform | 82 - camel-example-osgi - 2.15.2 | >>>> SpringDSL set body: Tue Jun 30 13:39:48 CEST 2015
-2015-06-30 13:39:48,730 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:48 CEST 2015]
-{code}
-
-h3. Stopping and uninstalling the sample application
-
-To stop and uninstall the demo, run the following command:
-
-{code}
-karaf@root()> bundle:stop camel-example-osgi
-karaf@root()> bundle:uninstall camel-example-osgi
-{code}
-
-h2. Stopping Karaf
-
-To stop Karaf from the console, enter {{^D}} in the console:
-{code}
-^D
-{code}
-
-Alternatively, you can also run the following command:
-
-{code}
-karaf@root()> system:shutdown
-{code}
-
-halt is also an alias for system:shutdown:
-
-{code}
-karaf@root()> halt
-{code}
-
-h3. Cleaning the Karaf state
-
-Normally Karaf remembers the features and bundles you installed and started. To reset Karaf into a clean state, just delete the data directory when Karaf is not running.
-
-h2. Summary
-
-This document shows how simple it is to get Apache Karaf up and running and install a simple Apache Camel application.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/update-notes.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/update-notes.conf b/manual/src/main/webapp/update-notes.conf
deleted file mode 100644
index 9847f2d..0000000
--- a/manual/src/main/webapp/update-notes.conf
+++ /dev/null
@@ -1,126 +0,0 @@
-h1. Update Notes (from 3.x to 4.x)
-
-This section is dedicated to users of previous Apache Karaf version.
-
-NB: for the users upgrading from Karaf 2.x, please see the "Update Notes (from 2.x to 3.x)" in the Karaf 3.x
-documentation first.
-
-NB: Karaf 4.x supports Java8.
-
-h2. Distributions
-
-Apache Karaf 4.x is available as tar.gz and zip archives. The content is the same and works on either Unix or Windows
-platforms.
-The {{bin}} folder contains both sh and bat scripts.
-
-h2. Commands
-
-Karaf 4 commands are close to the ones provided in Karaf 3.
-
-The sub-shell modes are the same (in {{etc/org.apache.karaf.shell.cfg}} or using {{shell:completion}} command).
-
-However, some minor changes have been introduced and new commands available:
-
-|| Apache Karaf 4.x ||
-| feature:requirement-list |
-| feature:requirement-add |
-| feature:requirement-remove |
-| feature:regions |
-| feature:start |
-| feature:stop |
-| jaas:group-create |
-| jaas:group-add |
-| jaas:group-delete |
-| jaas:group-list |
-| jaas:group-role-add |
-| jaas:group-role-delete |
-| jaas:su |
-| jaas:sudo |
-| shell:edit |
-| shell:env |
-| shell:less |
-| shell:stack-traces-print |
-| shell:threads |
-| shell:while |
-| log:list |
-| bundle:capabilities |
-| bundle:diag |
-| bundle:id |
-| bundle:load-test |
-| bundle:requirements |
-| bundle:resolve |
-| system:name |
-
-We encourage the users to use the {{--help}} option to check the name and type of arguments and options.
-
-In term of development, you can still use the blueprint definition as you do in Karaf 2.x & 3.x (with the corresponding annotations).
-
-However, in Karaf 4.x, you can use DS and new annotations and avoid the usage of a blueprint XML.
-
-The new annotations are available: @Service, @Completion, @Parsing, @Reference. It allows you to complete define the command
-in the command class directly.
-
-To simplify the generation of the code and OSGi headers, Karaf 4.x provides the karaf-services-maven-plugin (in org.apache.karaf.tooling Maven groupId).
-
-Take a look in the developer guide for the command development "new style" details.
-
-h2. Features repositories
-
-Karaf 4.x provides:
-
-* {{mvn:org.apache.karaf.features/enterprise/4.0.x/xml/features}}
-* {{mvn:org.apache.karaf.features/framework/4.0.x/xml/features}}
-* {{mvn:org.apache.karaf.features/spring/4.0.x/xml/features}}
-* {{mvn:org.apache.karaf.features/standard/4.0.x/xml/features}}
-* {{mvn:org.apache.karaf.features/static/4.0.x/xml/features}}
-
-h2. Features resolver
-
-Apache Karaf 4.x brings a complete new feature resolver. The purpose is to simplify the features installation and
-lifecycle.
-The new resolver now checks the feature requirements (defined directly in the features XML), and check which bundles
-provides the capabilities to satisfy these requirements.
-It allows Karaf to automatically install bundles required by features.
-
-For "old style" feature (features XML using namespace from Karaf 2.x or 3.x), this feature is not enabled.
-As soon as you use a "new style" feature (with namespace 1.3.0 used by Karaf 4.x), this feature is enabled.
-
-h2. Namespaces
-
-Apache Karaf 4.x brings updated version of the namespaces:
-
-* Supported features namespaces:
-** {{karaf-features-1.0.0.xsd}}
-** {{karaf-features-1.1.0.xsd}}
-** {{karaf-features-1.2.0.xsd}}
-** {{karaf-features-1.2.1.xsd}}
-** {{karaf-features-1.3.0.xsd}}
-* Supported jaas namespaces:
-** {{karaf-jaas-1.0.0.xsd}}
-** {{karaf-jaas-1.1.0.xsd}}
-* Supported shell namespaces:
-** {{karaf-shell-1.0.0.xsd}}
-** {{karaf-shell-1.1.0.xsd}}
-
-h2. Maven plugin
-
-A cleanup of the goals provided by {{karaf-maven-plugin}} has been done.
-
-Now the provided goals are:
-
-* {{karaf:archive}} to create a tar.gz or zip of a Karaf distribution
-* {{karaf:assembly}} to create a custom Karaf distribution assembly
-* {{karaf:kar}} to create a kar file
-* {{karaf:verify}} to verify and validate Karaf features
-* {{karaf:features-add-to-repository}} to recursively copy features XML and content into a folder (repository)
-* {{karaf:features-export-meta-data}} to extract the metadata from a features XML
-* {{karaf:features-generate-descriptor}} to generate a features XML
-* {{karaf:commands-generate-help}} to generate help/documentation on the commands
-
-h2. Update guide
-
-We encourage users to start a fresh Apache Karaf 4.x container.
-
-If you upgrade an existing container, {{lib}} and {{system}} folder have to be updated (just an override copy).
-
-For the {{etc}} folder, a diff is required as some properties changed and new configurations are available.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/cdi.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/cdi.conf b/manual/src/main/webapp/users-guide/cdi.conf
deleted file mode 100644
index be474a4..0000000
--- a/manual/src/main/webapp/users-guide/cdi.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-h1. CDI
-
-This section described how to add support of CDI, and embed a CDI container in Apache Karaf. It doesn't describe
-how to develop CDI applications. See the developer guide for that.
-
-h2. Pax CDI
-
-Apache Karaf supports different CDI containers by using Pax CDI.
-
-Pax CDI is pre-loaded in Apache Karaf.
-
-You can see now a set of new CDI features available:
-
-{code}
-karaf@root()> feature:list|grep -i cdi
-pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
-pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
-pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
-pax-cdi-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI support
-pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
-pax-cdi-1.2-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.2 support
-pax-cdi-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans CDI support
-pax-cdi-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI support
-pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
-pax-cdi-1.2-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.2 support
-pax-cdi-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI support
-pax-cdi-1.1-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.1 support
-pax-cdi-1.2-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.2 support
-pax-cdi-web-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans Web CDI support
-deltaspike-core | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike core support
-deltaspike-jpa | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike jpa support
-deltaspike-partial-bean | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike partial bean support
-deltaspike-data | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike data support
-{code}
-
-h2. CDI Containers
-
-Thanks to Pax CDI, Apache Karaf supports multiple CDI implementation versions, and different CDI containers.
-
-You just have to install the feature corresponding to the CDI container and version that you want to use.
-
-h3. Apache OpenWebBeans
-
-Apache Karaf provides a ready to use feature for Apache OpenWebBeans.
-
-The {{openwebbeans}} feature automatically install the Pax CDI features and the Apache OpenWebBeans bundles:
-
-{code}
-karaf@root()> feature:install http
-karaf@root()> feature:install pax-cdi-openwebbeans
-{code}
-
-h3. JBoss Weld CDI container
-
-Apache Karaf provides a ready to use feature for JBoss Weld.
-
-The {{weld}} feature automatically install the Pax CDI features and the JBoss Weld bundles:
-
-{code}
-karaf@root()> feature:install pax-cdi-weld
-{code}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/configuration.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/configuration.conf b/manual/src/main/webapp/users-guide/configuration.conf
deleted file mode 100644
index e5f312e..0000000
--- a/manual/src/main/webapp/users-guide/configuration.conf
+++ /dev/null
@@ -1,368 +0,0 @@
-h1. Configuration
-
-h2. Files
-
-Apache Karaf stores and loads all configuration in files located in the {{etc}} folder.
-
-By default, the {{etc}} folder is located relatively to the {{KARAF_BASE}} folder. You can define another location
-using the {{KARAF_ETC}} variable.
-
-Each configuration is identified by a ID (the ConfigAdmin PID). The configuration files name follows the {{pid.cfg}}
-name convention.
-
-For instance, {{etc/org.apache.karaf.shell.cfg}} means that this file is the file used by the configuration with
-{{org.apache.karaf.shell}} as PID.
-
-A configuration file is a properties file containing key/value pairs:
-
-{code}
-property=value
-{code}
-
-In Apache Karaf, a configuration is PID with a set of properties attached.
-
-Apache Karaf automatically loads all {{*.cfg}} files from the {{etc}} folder.
-
-You can configure the behaviour of the configuration files using some dedicated properties in the
-{{etc/config.properties}} configuration file:
-
-{code}
-...
-#
-# Configuration FileMonitor properties
-#
-felix.fileinstall.enableConfigSave = true
-felix.fileinstall.dir = ${karaf.etc}
-felix.fileinstall.filter = .*\\.cfg
-felix.fileinstall.poll = 1000
-felix.fileinstall.noInitialDelay = true
-felix.fileinstall.log.level = 3
-felix.fileinstall.log.default = jul
-...
-{code}
-
-* {{felix.fileinstall.enableConfigSave}} flush back in the configuration file the changes performed directly on the
-configuration service (ConfigAdmin). If {{true}}, any change (using {{config:*}} commands, MBeans, OSGi service) is
-persisted back in the configuration false. Default is {{true}}.
-* {{felix.fileinstall.dir}} is the directory where Apache Karaf is looking for configuration files. Default is {{${karaf.etc}}}
-meaning the value of the {{KARAF_ETC}} variable.
-* {{felix.fileinstall.filter}} is the file name pattern used to load only some configuration files. Only files matching
-the pattern will be loaded. Default value is {{.*\\.cfg}} meaning *.cfg files.
-* {{felix.fileinstall.poll}} is the polling interval (in milliseconds). Default value is {{1000}} meaning that Apache
-Karaf "re-loads" the configuration files every second.
-* {{felix.fileinstall.noInitialDelay}} is a flag indicating if the configuration file polling starts as soon as Apache
-Karaf starts or wait for a certain time. If {{true}}, Apache Karaf polls the configuration files as soon as the configuration
-service starts.
-* {{felix.fileinstall.log.level}} is the log message verbosity level of the configuration polling service. More
-this value is high, more verbose the configuration service is.
-* {{felix.fileinstall.log.default}} is the logging framework to use, {{jul}} meaning Java Util Logging.
-
-You can change the configuration at runtime by directly editiing the configuration file.
-
-You can also do the same using the {{config:*}} commands or the ConfigMBean.
-
-h2. {{config:*}} commands
-
-Apache Karaf provides a set of commands to manage the configuration.
-
-h3. {{config:list}}
-
-{{config:list}} displays the list of all configurations available, or the properties in a given configuration (PID).
-
-Without the {{query}} argument, the {{config:list}} command display all configurations, with PID, attached bundle and
-properties defined in the configuration:
-
-{code}
-karaf@root()> config:list
-----------------------------------------------------------------
-Pid: org.apache.karaf.service.acl.command.system.start-level
-BundleLocation: mvn:org.apache.karaf.shell/org.apache.karaf.shell.console/4.0.0
-Properties:
- service.guard = (&(osgi.command.scope=system)(osgi.command.function=start-level))
- * = *
- start-level = admin # admin can set any start level, including < 100
- start-level[/[^0-9]*/] = viewer # viewer can obtain the current start level
- execute[/.*/,/[^0-9]*/] = viewer # viewer can obtain the current start level
- execute = admin # admin can set any start level, including < 100
- service.pid = org.apache.karaf.service.acl.command.system.start-level
- start-level[/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
- execute[/.*/,/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-...
-{code}
-
-The {{query}} argument accepts a query using a LDAP syntax.
-
-For instance, you can display details on one specific configuration using the following filter:
-
-{code}
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- service.pid = org.apache.karaf.log
- size = 500
-{code}
-
-h3. {{config:edit}}
-
-{{config:edit}} is the first command to do when you want to change a configuration. {{config:edit}} command put you
-in edition mode for a given configuration.
-
-For instance, you can edit the {{org.apache.karaf.log}} configuration:
-
-{code}
-karaf@root()> config:edit org.apache.karaf.log
-{code}
-
-The {{config:edit}} command doesn't display anything, it just puts you in configuration edit mode. You are now ready
-to use other config commands (like {{config:property-append}}, {{config:property-delete}}, {{config:property-set}}, ...).
-
-If you provide a configuration PID that doesn't exist yet, Apache Karaf will create a new configuration (and so a new
-configuration file) automatically.
-
-All changes that you do in configuration edit mode are store in your console session: the changes are not directly
-applied in the configuration. It allows you to "commit" the changes (see {{config:update}} command) or "rollback" and
-cancel your changes (see {{config:cancel}} command).
-
-h3. {{config:property-list}}
-
-The {{config:property-list}} lists the properties for the currently edited configuration.
-
-Assuming that you edited the {{org.apache.karaf.log}} configuration, you can do:
-
-{code}
-karaf@root()> config:property-list
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- service.pid = org.apache.karaf.log
- size = 500
-{code}
-
-h3. {{config:property-set}}
-
-The {{config:property-set}} command update the value of a given property in the currently edited configuration.
-
-For instance, to change the value of the {{size}} property of previously edited {{org.apache.karaf.log}} configuration,
-you can do:
-
-{code}
-karaf@root()> config:property-set size 1000
-karaf@root()> config:property-list
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- service.pid = org.apache.karaf.log
- size = 1000
-{code}
-
-If the property doesn't exist, the {{config:property-set}} command creates the property.
-
-You can use {{config:property-set}} command outside the configuration edit mode, by specifying the {{-p}} (for configuration pid) option:
-
-{code}
-karaf@root()> config:property-set -p org.apache.karaf.log size 1000
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 1000
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-{code}
-
-{warning}
-Using the {{pid}} option, you bypass the configuration commit and rollback mechanism.
-{warning}
-
-h3. {{config:property-append}}
-
-The {{config:property-append}} is similar to {{config:property-set}} command, but instead of completely replacing the
-property value, it appends a string at the end of the property value.
-
-For instance, to add 1 at the end of the value of the {{size}} property in {{org.apache.karaf.log}} configuration
-(and so have 5001 for the value instead of 500), you can do:
-
-{code}
-karaf@root()> config:property-append size 1
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 5001
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-{code}
-
-Like the {{config:property-set}} command, if the property doesn't exist, the {{config:property-set}} command creates
-the property.
-
-You can use the {{config:property-append}} command outside the configuration edit mode, by specifying the {{-p}} (for configuration pid) option:
-
-{code}
-karaf@root()> config:property-append -p org.apache.karaf.log size 1
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 5001
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-{code}
-
-{warning}
-Using the {{pid}} option, you bypass the configuration commit and rollback mechanism.
-{warning}
-
-h3. {{config:property-delete}}
-
-The {{config:property-delete}} command delete a property in the currently edited configuration.
-
-For instance, you previously added a {{test}} property in {{org.apache.karaf.log}} configuration. To delete this {{test}}
-property, you do:
-
-{code}
-karaf@root()> config:property-set test test
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
- test = test
-karaf@root()> config:property-delete test
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-{code}
-
-You can use the {{config:property-delete}} command outside the configuration edit mode, by specifying the {{-p}} (for configuration pid) option:
-
-{code}
-karaf@root()> config:property-delete -p org.apache.karaf.log test
-{code}
-
-h3. {{config:update}} and {{config:cancel}}
-
-When you are in the configuration edit mode, all changes that you do using {{config:property*}} commands are stored in "memory"
-(actually in the console session).
-
-Thanks to that, you can "commit" your changes using the {{config:update}} command. The {{config:update}} command will
-commit your changes, update the configuration, and (if possible) update the configuration files.
-
-For instance, after changing {{org.apache.karaf.log}} configuration with some {{config:property*}} commands, you have
-to commit your change like this:
-
-{code}
-karaf@root()> config:edit org.apache.karaf.log
-karaf@root()> config:property-set test test
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
- test = test
-{code}
-
-On the other hand, if you want to "rollback" your changes, you can use the {{config:cancel}} command. It will cancel all
-changes that you did, and return of the configuration state just before the {{config:edit}} command. The {{config:cancel}}
-exits from the edit mode.
-
-For instance, you added the test property in the {{org.apache.karaf.log}} configuration, but it was a mistake:
-
-{code}
-karaf@root()> config:edit org.apache.karaf.log
-karaf@root()> config:property-set test test
-karaf@root()> config:cancel
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-4.0.0/etc/org.apache.karaf.log.cfg
-{code}
-
-h3. {{config:delete}}
-
-The {{config:delete}} command completely delete an existing configuration. You don't have to be in edit mode to delete
-a configuration.
-
-For instance, you added {{my.config}} configuration:
-
-{code}
-karaf@root()> config:edit my.config
-karaf@root()> config:property-set test test
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=my.config)"
-----------------------------------------------------------------
-Pid: my.config
-BundleLocation: null
-Properties:
- service.pid = my.config
- test = test
-{code}
-
-You can delete the {{my.config}} configuration (including all properties in the configuration) using the {{config:delete}}
-command:
-
-{code}
-karaf@root()> config:delete my.config
-karaf@root()> config:list "(service.pid=my.config)"
-karaf@root()>
-{code}
-
-h3. {{config:meta}}
-
-The {{config:meta}} command lists the meta type information related to a given configuration.
-
-It allows you to get details about the configuration properties: key, name, type, default value, and description:
-
-{code}
-karaf@root()> config:meta -p org.apache.karaf.log
-Meta type informations for pid: org.apache.karaf.log
-key | name | type | default | description
----------------------------------------------------------------------------------------------------------------------------------------
-size | Size | int | 500 | size of the log to keep in memory
-pattern | Pattern | String | %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n | Pattern used to display log entries
-{code}
-
-h2. JMX ConfigMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the configurations: the ConfigMBean.
-
-The ConfigMBean object name is: {{org.apache.karaf:type=config,name=*}}.
-
-h3. Attributes
-
-The {{Configs}} attribute is a list of all configuration PIDs.
-
-h3. Operations
-
-* {{listProperties(pid)}} returns the list of properties (property=value formatted) for the configuration {{pid}}.
-* {{deleteProperty(pid, property)}} deletes the {{property}} from the configuration {{pid}}.
-* {{appendProperty(pid, property, value)}} appends {{value}} at the end of the value of the {{property}} of the configuration {{pid}}.
-* {{setProperty(pid, property, value)}} sets {{value}} for the value of the {{property}} of the configuration {{pid}}.
-* {{delete(pid)}} deletes the configuration identified by the {{pid}}.
-* {{create(pid)}} creates an empty (without any property) configuration with {{pid}}.
-* {{update(pid, properties)}} updates a configuration identified with {{pid}} with the provided {{properties}} map.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/console.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/console.conf b/manual/src/main/webapp/users-guide/console.conf
deleted file mode 100644
index e508793..0000000
--- a/manual/src/main/webapp/users-guide/console.conf
+++ /dev/null
@@ -1,443 +0,0 @@
-h1. Using the console
-
-h2. Available commands
-
-To see a list of the available commands in the console, you can use the {{help}}:
-
-{code}
-karaf@root()> help
-bundle Enter the subshell
-bundle:capabilities Displays OSGi capabilities of a given bundles.
-bundle:classes Displays a list of classes/resources contained in the bundle
-bundle:diag Displays diagnostic information why a bundle is not Active
-bundle:dynamic-import Enables/disables dynamic-import for a given bundle.
-bundle:find-class Locates a specified class in any deployed bundle
-bundle:headers Displays OSGi headers of a given bundles.
-bundle:id Gets the bundle ID.
-...
-{code}
-
-You have the list of all commands with a short description.
-
-You can use the tab key to get a quick list of all commands:
-
-{code}
-karaf@root()> Display all 294 possibilities? (y or n)
-...
-{code}
-
-h2. Subshell and completion mode
-
-The commands have a scope and a name. For instance, the command {{feature:list}} has {{feature}} as scope, and {{list}} as name.
-
-Karaf "groups" the commands by scope. Each scope form a subshell.
-
-You can directly execute a command with its full qualified name (scope:name):
-
-{code}
-karaf@root()> feature:list
-...
-{code}
-
-or enter in a subshell and type the command contextual to the subshell:
-
-{code}
-karaf@root()> feature
-karaf@root(feature)> list
-{code}
-
-You can note that you enter in a subshell directly by typing the subshell name (here {{feature}}). You can "switch" directly from a subshell to another:
-
-{code}
-karaf@root()> feature
-karaf@root(feature)> bundle
-karaf@root(bundle)>
-{code}
-
-The prompt displays the current subshell between ().
-
-The {{exit}} command goes to the parent subshell:
-
-{code}
-karaf@root()> feature
-karaf@root(feature)> exit
-karaf@root()>
-{code}
-
-The completion mode defines the behaviour of the tab key and the help command.
-
-You have three different modes available:
-
-* GLOBAL
-* FIRST
-* SUBSHELL
-
-You can define your default completion mode using the completionMode property in {{etc/org.apache.karaf.shell.cfg}} file. By default, you have:
-
-{code}
-completionMode = GLOBAL
-{code}
-
-You can also change the completion mode “on the fly” (while using the Karaf shell console) using the {{shell:completion}} command:
-
-{code}
-karaf@root()> shell:completion
-GLOBAL
-karaf@root()> shell:completion FIRST
-karaf@root()> shell:completion
-FIRST
-{code}
-
-{{shell:completion}} can inform you about the current completion mode used. You can also provide the new completion mode that you want.
-
-GLOBAL completion mode is the default one in Karaf 4.0.0 (mostly for transition purpose).
-
-GLOBAL mode doesn’t really use subshell: it’s the same behavior as in previous Karaf versions.
-
-When you type the tab key, whatever in which subshell you are, the completion will display all commands and all aliases:
-
-{code}
-karaf@root()> <TAB>
-karaf@root()> Display all 273 possibilities? (y or n)
-...
-karaf@root()> feature
-karaf@root(feature)> <TAB>
-karaf@root(feature)> Display all 273 possibilities? (y or n)
-{code}
-
-FIRST completion mode is an alternative to the GLOBAL completion mode.
-
-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).
-However, if you type the tab key when you are in a subshell, the completion will display only the commands of the current subshell:
-
-{code}
-karaf@root()> shell:completion FIRST
-karaf@root()> <TAB>
-karaf@root()> Display all 273 possibilities? (y or n)
-...
-karaf@root()> feature
-karaf@root(feature)> <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)> <TAB>
-karaf@root(log)>
-clear display exception-display get log set tail
-{code}
-
-SUBSHELL completion mode is the real subshell mode.
-
-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.
-Once you are in a subshell, if you type the TAB key, the completion displays the commands of the current subshell:
-
-{code}
-karaf@root()> shell:completion SUBSHELL
-karaf@root()> <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)> <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)> <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
-{code}
-
-h2. Unix like environment
-
-Karaf console provides a full Unix like environment.
-
-h3. Help or man
-
-We already saw the usage of the {{help}} command to display all commands available.
-
-But you can also use the {{help}} command to get details about a command or
-the {{man}} command which is an alias to the {{help}} command.
-You can also use another form to get the command help, by using the {{--help}} option to the command.
-
-So these commands
-
-{code}
-karaf@root()> help feature:list
-karaf@root()> man feature:list
-karaf@root()> feature:list --help
-{code}
-
-All produce the same help output:
-{code}
-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
-
-{code}
-
-h3. Completion
-
-When you type the tab key, Karaf tries to complete:
-
-* subshell
-* commands
-* aliases
-* command arguments
-* command options
-
-h3. Alias
-
-An alias is another name associated to a given command.
-
-The {{shell:alias}} command creates a new alias. For instance, to create the {{list-installed-features}} alias to the actual
-{{feature:list -i}} command, you can do:
-
-{code}
-karaf@root()> alias "list-features-installed = { feature:list -i }"
-karaf@root()> list-features-installed
-Name | Version | Required | State | Repository | Description
-------------------------------------------------------------------------------------------------------------------------------
-feature | 4.0.0 | x | Started | standard-4.0.0 | Features Support
-shell | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell
-deployer | 4.0.0 | x | Started | standard-4.0.0 | Karaf Deployer
-bundle | 4.0.0 | x | Started | standard-4.0.0 | Provide Bundle support
-config | 4.0.0 | x | Started | standard-4.0.0 | Provide OSGi ConfigAdmin support
-diagnostic | 4.0.0 | x | Started | standard-4.0.0 | Provide Diagnostic support
-instance | 4.0.0 | x | Started | standard-4.0.0 | Provide Instance support
-jaas | 4.0.0 | x | Started | standard-4.0.0 | Provide JAAS support
-log | 4.0.0 | x | Started | standard-4.0.0 | Provide Log support
-package | 4.0.0 | x | Started | standard-4.0.0 | Package commands and mbeans
-service | 4.0.0 | x | Started | standard-4.0.0 | Provide Service support
-system | 4.0.0 | x | Started | standard-4.0.0 | Provide System support
-kar | 4.0.0 | x | Started | standard-4.0.0 | Provide KAR (KARaf archive) support
-ssh | 4.0.0 | x | Started | standard-4.0.0 | Provide a SSHd server on Karaf
-management | 4.0.0 | x | Started | standard-4.0.0 | Provide a JMX MBeanServer and a set of MBeans in
-{code}
-
-At login, the Apache Karaf console reads the {{etc/shell.init.script}} file where you can create your aliases.
-It's similar to a bashrc or profile file on Unix.
-
-{code}
-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 } ;
-{code}
-
-You can see here the aliases available by default:
-
-* {{ld}} is a short form to display log (alias to {{log:display}} command)
-* {{lde}} is a short form to display exceptions (alias to {{log:exception-display}} command)
-* {{la}} is a short form to list all bundles (alias to {{bundle:list -t 0}} command)
-* {{ls}} is a short form to list all services (alias to {{service:list}} command)
-* {{cl}} is a short form to list all configurations (alias to {{config:list}} command)
-* {{halt}} is a short form to shutdown Apache Karaf (alias to {{system:shutdown -h -f}} command)
-* {{help}} is a short form to display help (alias to {{*:help}} command)
-* {{man}} is the same as help (alias to {{help}} command)
-* {{log:list}} displays all loggers and level (alias to {{log:get ALL}} command)
-
-You can create your own aliases in the {{etc/shell.init.script}} file.
-
-h3. Key binding
-
-Like on most Unix environment, Karaf console support some key bindings:
-
-* the arrows key to navigate in the commands history
-* CTRL-D to logout/shutdown Karaf
-* CTRL-R to search previously executed command
-* CTRL-U to remove the current line
-
-h3. Pipe
-
-You can pipe the output of one command as input to another one. It's a pipe, using the | character:
-
-{code}
-karaf@root()> feature:list |grep -i war
-pax-war | 4.1.4 | | Uninstalled | org.ops4j.pax.web-4.1.4 | Provide support of a full WebContainer
-pax-war-tomcat | 4.1.4 | | Uninstalled | org.ops4j.pax.web-4.1.4 |
-war | 4.0.0 | | Uninstalled | standard-4.0.0 | Turn Karaf as a full WebContainer
-blueprint-web | 4.0.0 | | Uninstalled | standard-4.0.0 | Provides an OSGI-aware Servlet ContextListener fo
-{code}
-
-h3. Grep, more, find, ...
-
-Karaf console provides some core commands similar to Unix environment:
-
-* {{shell:alias}} creates an alias to an existing command
-* {{shell:cat}} displays the content of a file or URL
-* {{shell:clear}} clears the current console display
-* {{shell:completion}} displays or change the current completion mode
-* {{shell:date}} displays the current date (optionally using a format)
-* {{shell:each}} executes a closure on a list of arguments
-* {{shell:echo}} echoes and prints arguments to stdout
-* {{shell:edit}} calls a text editor on the current file or URL
-* {{shell:env}} displays or sets the value of a shell session variable
-* {{shell:exec}} executes a system command
-* {{shell:grep}} prints lines matching the given pattern
-* {{shell:head}} displays the first line of the input
-* {{shell:history}} prints the commands history
-* {{shell:if}} allows you to use conditions (if, then, else blocks) in script
-* {{shell:info}} prints various information about the current Karaf instance
-* {{shell:java}} executes a Java application
-* {{shell:less}} file pager
-* {{shell:logout}} disconnects shell from current session
-* {{shell:more}} is a file pager
-* {{shell:new}} creates a new Java object
-* {{shell:printf}} formats and prints arguments
-* {{shell:sleep}} sleeps for a bit then wakes up
-* {{shell:sort}} writes sorted concatenation of all files to stdout
-* {{shell:source}} executes commands contained in a script
-* {{shell:stack-traces-print}} prints the full stack trace in the console when the execution of a command throws an exception
-* {{shell:tac}} captures the STDIN and returns it as a string
-* {{shell:tail}} displays the last lines of the input
-* {{shell:threads}} prints the current thread
-* {{shell:watch}} periodically executes a command and refresh the output
-* {{shell:wc}} prints newline, words, and byte counts for each file
-* {{shell:while}} loop while the condition is true
-
-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.
-So you can use 'head' instead of 'shell:head'
-
-Again, you can find details and all options of these commands using {{help}} command or {{--help}} option.
-
-h3. Scripting
-
-The Apache Karaf Console supports a complete scripting language, similar to bash or csh on Unix.
-
-The {{each}} ({{shell:each}}) command can iterate in a list:
-
-{code}
-karaf@root()> list = [1 2 3]; each ($list) { echo $it }
-1
-2
-3
-{code}
-
-{tip}
-The same loop could be written with the {{shell:while}} command:
-
-{code}
-karaf@root()> a = 0 ; while { %((a+=1) <= 3) } { echo $a }
-1
-2
-3
-{code}
-{tip}
-
-You can create the list yourself (as in the previous example), or some commands can return a list too.
-
-We can note that the console created a "session" variable with the name {{list}} that you can access with {{$list}}.
-
-The {{$it}} variable is an implicit one corresponding to the current object (here the current iterated value from the
-list).
-
-When you create a list with {{[]}}, Apache Karaf console creates a Java ArrayList. It means that you can use methods
-available in the ArrayList objects (like get or size for instance):
-
-{code}
-karaf@root()> list = ["Hello" world]; echo ($list get 0) ($list get 1)
-Hello world
-{code}
-
-We can note here that calling a method on an object is directly using {{(object method argument)}}.
-Here {{($list get 0)}} means {{$list.get(0)}} where {{$list}} is the ArrayList.
-
-The {{class}} notation will display details about the object:
-
-{code}
-karaf@root()> $list class
-...
-ProtectionDomain ProtectionDomain null
- null
- <no principals>
- java.security.Permissions@6521c24e (
- ("java.security.AllPermission" "<all permissions>" "<all actions>")
-)
-
-
-Signers null
-SimpleName ArrayList
-TypeParameters [E]
-{code}
-
-You can "cast" a variable to a given type.
-
-{code}
-karaf@root()> ("hello world" toCharArray)
-[h, e, l, l, o, , w, o, r, l, d]
-{code}
-
-If it fails, you will see the casting exception:
-
-{code}
-karaf@root()> ("hello world" toCharArray)[0]
-Error executing command: [C cannot be cast to [Ljava.lang.Object;
-{code}
-
-You can "call" a script using the {{shell:source}} command:
-
-{code}
-karaf@root> shell:source script.txt
-True!
-{code}
-
-where {{script.txt}} contains:
-
-{code}
-foo = "foo"
-if { $foo equals "foo" } {
- echo "True!"
-}
-{code}
-
-{warning}
-The spaces are important when writing script.
-For instance, the following script is not correct:
-
-{code}
-if{ $foo equals "foo" } ...
-{code}
-
-and will fail with:
-
-{code}
-karaf@root> shell:source script.txt
-Error executing command: Cannot coerce echo "true!"() to any of []
-{code}
-
-because a space is missing after the {{if}} statement.
-{warning}
-
-As for the aliases, you can create init scripts in the {{etc/shell.init.script}} file.
-You can also named you script with an alias. Actually, the aliases are just scripts.
-
-See the Scripting section of the developers guide for details.
-
-h2. Security
-
-The Apache Karaf console supports a Role Based Access Control (RBAC) security mechanism. It means that depending of
-the user connected to the console, you can define, depending of the user's groups and roles, the permission to execute
-some commands, or limit the values allowed for the arguments.
-
-Console security is detailed in the [Security section|security] of this user guide.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/deployers.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/deployers.conf b/manual/src/main/webapp/users-guide/deployers.conf
deleted file mode 100644
index f8972f3..0000000
--- a/manual/src/main/webapp/users-guide/deployers.conf
+++ /dev/null
@@ -1,223 +0,0 @@
-h1. Deployers
-
-The following picture describes the architecture of the deployers.
-
-!/images/deployer.png!
-
-Apache Karaf polls the {{deploy}} folder for new files.
-
-You can configure the location of the {{deploy}} folder, and the polling behaviour in the {{etc/org.apache.felix.fileinstall-deploy.cfg}}
-configuration file:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-felix.fileinstall.dir = ${karaf.base}/deploy
-felix.fileinstall.tmpdir = ${karaf.data}/generated-bundles
-felix.fileinstall.poll = 1000
-felix.fileinstall.start.level = 80
-felix.fileinstall.active.level = 80
-felix.fileinstall.log.level = 3
-{code}
-
-* {{felix.fileinstall.dir}} defines the location of the {{deploy}} folder. Default value is {{KARAF_BASE/deploy}}.
-* {{felix.fileinstall.tmpdir}} defines a temporary folder where the deployers store their files. Default value is {{KARAF_DATA/generated-bundles}}.
-* {{felix.fileinstall.poll}} defines the polling interval (in milliseconds). Default value is 1 second.
-
-When Apache Karaf polls a file from the {{deploy}} folder, it "delegates" the file handling to a deployer.
-
-By default, Apache Karaf provides a set of deployers:
-
-* Blueprint deployer is able to handle Blueprint XML files.
-* Spring deployer is able to handle Spring XML files.
-* Features deployer is able to handle Apache Karaf features XML files (see [Provisioning section|provisioning] for details).
-* KAR deployer is able to handle KAR files (see [KAR section|kar] for details).
-* Wrap deployer is able to handle non-OSGi jar files and turns it as OSGi bundles "on the fly".
-* Optionally, WAR deployer (if you install the war feature) is able to handle WAR files.
-
-h2. Blueprint deployer
-
-The Blueprint deployer is able to handle plain Blueprint XML configuration files.
-
-The Blueprint deployer is able to transform "on the fly" any Blueprint XML file into valid OSGi bundle.
-
-The generated OSGi MANIFEST will contain the following headers:
-
-{code}
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Import-Package: [required packages]
-DynamicImport-Package: *
-{code}
-
-The {{name}} and {{version}} of the file are extracted using a heuristic that will match common patterns.
-
-For example {{my-config-1.0.1.xml}} will lead to {{name = my-config}} and {{version = 1.0.1}}.
-
-The default imported packages are extracted from the spring file definition and includes all classes referenced directly.
-
-If you need to customize the generated manifest, you can do so by including an xml element in your blueprint configuration:
-
-{code:lang=xml}
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
- Require-Bundle= my-bundle
- </manifest>
-{code}
-
-h2. Spring deployer
-
-The Spring deployer is similar to the Blueprint deployer.
-
-The Spring deployer is able to deploy Spring XML files.
-
-Like the Blueprint deployer, the generated OSGi MANIFEST will contain the following headers:
-
-{code}
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Spring-Context: *;publish-context:=false;create-asynchronously:=true
-Import-Package: [required packages]
-DynamicImport-Package: *
-{code}
-
-If you need to customize the generated manifest, you can do so by including a XML element in your Spring configuration:
-
-{code:lang=xml}
-<spring:beans ...>
- <manifest xmlns="http://karaf.apache.org/xmlns/deployer/spring/v1.0.0">
- Require-Bundle= my-bundle
- </manifest>
-{code}
-
-h2. Features deployer
-
-See the [Provisioning section|provisioning] for details.
-
-h2. KAR deployer
-
-See the [KAR section|kar] for details.
-
-h2. War deployer
-
-The installation of the WAR feature enables a WAR deployer.
-
-It means that with the war feature installed, Apache Karaf is a complete OSGi WebContainer (like Tomcat) where
-you can deploy WAB (WebApplication Bundle) or pure WAR (WebApplication aRchive).
-
-You can install the war feature with:
-
-{code}
-karaf@root()> feature:install war
-{code}
-
-The WAR deployer supports:
-
-* WAB files
-* WAR files
-* exploded WAR (as a directory named {{*.war}}).
-
-The only requirement of the WAR deployer is that the archive contains the {{WEB-INF/web.xml}} file.
-
-h2. Wrap deployer
-
-The wrap deployer allows you to "hot deploy" non-OSGi jar files ("classical" jar files) from the deploy folder.
-
-The wrap deployer creates "on the fly" an OSGi bundle with a non-OSGi jar file.
-
-The wrap deployer looks for jar files in the deploy folder. A jar file is considered as non-OSGi if the MANIFEST doesn't
-contain the {{Bundle-SymbolicName}} and {{Bundle-Version}} attributes, or if there is no MANIFEST at all.
-
-The wrap deployer "transforms" non-OSGi jar file into an OSGi bundle.
-
-The wrap deployer tries to populate the Bundle-SymbolicName and Bundle-Version extracted from the jar file path.
-
-For example, if you simply copy commons-lang-2.3.jar (which is not an OSGi bundle) into the deploy folder, you
-will see:
-
-{code}
-karaf@root()> la|grep -i commons-lang
-80 | Active | 80 | 2.3 | commons-lang
-{code}
-
-If you take a look on the commons-lang headers, you can see that the bundle exports all packages with optional resolution
-and that {{Bundle-SymbolicName}} and {{Bundle-Version}} have been populated:
-
-{code}
-karaf@root()> bundle:headers 80
-
-commons-lang (80)
------------------
-Specification-Title = Commons Lang
-Tool = Bnd-2.1.0.20130426-122213
-Specification-Version = 2.3
-Specification-Vendor = Apache Software Foundation
-Implementation-Version = 2.3
-Generated-By-Ops4j-Pax-From = wrap:file:/opt/apache-karaf-4.0.0/deploy/commons-lang-2.3.jar$Bundle-SymbolicName=commons-lang&Bundle-Version=2.3
-Implementation-Vendor-Id = org.apache
-Created-By = 1.7.0_21 (Oracle Corporation)
-Implementation-Title = Commons Lang
-Manifest-Version = 1.0
-Bnd-LastModified = 1386339925753
-X-Compile-Target-JDK = 1.1
-Originally-Created-By = 1.3.1_09-85 ("Apple Computer, Inc.")
-Ant-Version = Apache Ant 1.6.5
-Package = org.apache.commons.lang
-X-Compile-Source-JDK = 1.3
-Extension-Name = commons-lang
-Implementation-Vendor = Apache Software Foundation
-
-Bundle-Name = commons-lang
-Bundle-SymbolicName = commons-lang
-Bundle-Version = 2.3
-Bundle-ManifestVersion = 2
-
-Export-Package =
- org.apache.commons.lang;uses:=org.apache.commons.lang.exception,
- org.apache.commons.lang.builder,
- org.apache.commons.lang.enum,
- org.apache.commons.lang.enums,
- org.apache.commons.lang.exception,
- org.apache.commons.lang.math,
- org.apache.commons.lang.mutable,
- org.apache.commons.lang.text,
- org.apache.commons.lang.time,
- org,
- org.apache,
- org.apache.commons
-
-{code}
-
-You can specify some MANIFEST headers by specifying the headers as URL parameters.
-
-In the URL parameters, you can specify the headers using the '$' character and '&' to separate the different headers.
-For instance:
-
-{code}
-karaf@root()> bundle:install -s 'wrap:mvn:jboss/jbossall-client/4.2.3.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.2.3.GA&Export-Package=org.jboss.remoting;version="4.2.3.GA",\!*'
-{code}
-
-When defined in a features.xml file, it's necessary to escape any ampersands and quotes, or use a CDATA tag:
-
-{code:lang=xml}
-<bundle>wrap:mvn:jboss/jbossall-client/4.3.2.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.3.2.GA&Export-Package=org.jboss.remoting;version="4.3.2.GA",!*</bundle>
-{code}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/directory-structure.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/directory-structure.conf b/manual/src/main/webapp/users-guide/directory-structure.conf
deleted file mode 100644
index 3e624dc..0000000
--- a/manual/src/main/webapp/users-guide/directory-structure.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-h1. Directory structure
-
-The directory layout of a Karaf installation is as follows:
-* {{/bin}}: control scripts to start, stop, login, ...
-* {{/demos}}: contains some simple Karaf samples
-* {{/etc}}: configuration files
-* {{/data}}: working directory
-** {{/cache}}: OSGi framework bundle cache
-** {{/generated-bundles}}: temporary folder used by the deployers
-** {{/log}}: log files
-* {{/deploy}}: hot deploy directory
-* {{/instances}}: directory containing [instances|instances]
-* {{/lib}}: contains libraries
-** {{/lib/boot}}: contains the systeù libraries used at Karaf bootstrap
-** {{/lib/endorsed}}: directory for endorsed libraries
-** {{/lib/ext}}: directory for JRE extensions
-* {{/system}}: OSGi bundles repository, laid out as a Maven 2 repository
-
-{tip}
-The {{data}} folder contains all the working and temporary files for Karaf.
-If you want to restart from a clean state, you can wipe out this directory, which has the same effect as
-[using the clean option|start-stop#Starting Karaf from clean].
-{tip}
-
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/ejb.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/ejb.conf b/manual/src/main/webapp/users-guide/ejb.conf
deleted file mode 100644
index 2b8f24a..0000000
--- a/manual/src/main/webapp/users-guide/ejb.conf
+++ /dev/null
@@ -1,80 +0,0 @@
-h1. EJB
-
-This section describes how to add support of EJB in Apache Karaf. It doesn't describe how to develop EJB applications.
-See the developer guide for that.
-
-h2. Apache OpenEJB
-
-Apache Karaf doesn't provide "native" support of EJB (Enterprise Java Beans).
-
-Apache OpenEJB provides EJB support for Apache Karaf by providing a set of features.
-
-You have to update some Karaf configuration to have full OpenEJB support.
-
-First, in the {{etc/system.properties}}, you have to append the following properties:
-
-{code}
-...
-#
-# OpenEJB scanner
-#
-openejb.deployments.classpath.exclude=bundle:*
-openejb.deployments.classpath.filter.descriptors=true
-{code}
-
-Due to some OpenEJB version constraint, you also have to update the {{etc/jre.properties}} by changing the version of
-the {{javax.xml.namespace}} package, and remove the version of the {{javax.annotation}} package (provided by Geronimo
-Annotation API spec bundle, used by OpenEJB):
-
-{code}
-...
-javax.annotation, \
-javax.annotation.processing, \
-...
-javax.xml.namespace;version="1.0.0", \
-...
-{code}
-
-It enables the OpenEJB bundles scanning, looking for EJBs.
-
-After starting/restart Karaf to take these changes, we can install the OpenEJB feature:
-
-{code}
-karaf@root()> feature:repo-add openejb
-{code}
-
-By default, the {{feature:repo-add openejb}} command will install the latest OpenEJB version available.
-
-You can specify a target version using the {{version}} argument:
-
-{code}
-karaf@root()> feature:repo-add openejb 4.5.2
-{code}
-
-Now, you have a set of new OpenEJB features available in your Apache Karaf container:
-
-{code}
-karaf@root()> la
-...
-openejb-core | 4.5.2 | | openejb-features |
-openejb-server | 4.5.2 | | openejb-features |
-openejb-cxf | 4.5.2 | | openejb-features |
-openejb-rest | 4.5.2 | | openejb-features |
-openejb-soap | 4.5.2 | | openejb-features |
-{code}
-
-You can add EJB support installing the {{openejb-core}} feature:
-
-{code}
-karaf@root()> feature:install openejb-core
-{code}
-
-h2. Apache KarafEE
-
-A custom distribution of Apache Karaf embedding OpenEJB is available in the Apache TomEE project.
-
-The name of this custom distribution is KarafEE:
-
-[https://svn.apache.org/repos/asf/tomee/karafee/]
-
-However, this project is now "deprecated", and all resources from KarafEE will move directly in Apache Karaf soon.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/enterprise.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/enterprise.conf b/manual/src/main/webapp/users-guide/enterprise.conf
deleted file mode 100644
index 87518fe..0000000
--- a/manual/src/main/webapp/users-guide/enterprise.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-h1. Enterprise
-
-Apache Karaf provides a set of enterprise class features.
-
-These features are not installed by default, you have to install yourself depending of your needs.
-
-The enterprise features available are:
-
-* [Http Service|http] provide basic OSGi HttpServices
-* [WebContainer (JSP/Servlet)|webcontainer] providing a complete JSP/Servlet support. These feature turns Apache Karaf as a complete
- web container where you can deploy web application (as you can do in Apache Tomcat, or other JEE application servers).
-* [Naming (JNDI)|jndi] providing a complete Java Naming and Directory Interface support. Apache Karaf provides a complete
- JNDI "server" (context) where you can create name to identify Objects (especially OSGi services).
-* [Transaction (JTA)|jta] providing a complete transaction manager as an OSGi service.
-* [DataSources (JDBC)|jdbc] providing useful OSGi service, console commands, and MBean to manipulate JDBC datasources and perform database operations.
-* [MOM (JMS)|jms] providing useful OSGi service, console commands, and MBean to manipulate JMS connection factories and perform messaging operations.
-* [Persistence (JPA)|jpa] providing ready to use JPA engines and entity manager as an OSGi service.
-* [EJB|ejb] adding EJB support in Apache Karaf.
-* [CDI|cdi] providing ready to use CDI containers in Apache Karaf.
-* [HA/failover and cluster|failover] providing active/passive or active/active topologies with multiple Apache Karaf instances.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/failover.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/failover.conf b/manual/src/main/webapp/users-guide/failover.conf
deleted file mode 100644
index 1cd06f0..0000000
--- a/manual/src/main/webapp/users-guide/failover.conf
+++ /dev/null
@@ -1,230 +0,0 @@
-h1. HA/failover and cluster
-
-Apache Karaf natively provides a failover mechanism. It uses a kind of master/slave topology where one instance is active
-and the others are in standby.
-
-If you are looking for cluster of Apache Karaf instances (active/active), [Apache Karaf Cellar|http://karaf.apache.org/index/subprojects/cellar.html] is a solution.
-
-Karaf provides failover capability using either a simple lock file or a JDBC locking mechanism.
-In both cases, a container-level lock system allows bundles to be preloaded into the slave Karaf instance in order to provide faster failover performance.
-
-h2. HA/failover (active/passive)
-
-The Apache Karaf failover capability uses a lock system.
-
-This container-level lock system allows bundles installed on the master to be preloaded on the slave, in order to provide faster failover performance.
-
-Two types of lock are supported:
-
-* filesystem lock
-* database lock
-
-When a first instance starts, if the lock is available, it takes the lock and become the master.
-If a second instance starts, it tries to acquire the lock. As the lock is already hold by the master, the instance becomes
-a slave, in standby mode (not active). A slave periodically check if the lock has been released or not.
-
-h3. Filesystem lock
-
-The Apache Karaf instances share a lock on the filesystem. It means that the filesystem storing the lock has to be accessible
-to the different instances (using SAN, NFS, ...).
-
-The configuration of the lock system has to be defined in the {{etc/system.properties}} file, on each instance (master/slave):
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.SimpleFileLock
-karaf.lock.dir=<PathToLockFileDirectory>
-karaf.lock.delay=10000
-{code}
-
-* {{karaf.lock}} property enables the the HA/failover mechanism
-* {{karaf.lock.class}} property contains the class name providing the lock implementation. Here, we use the filesystem lock.
-* {{karaf.lock.dir}} property contains the location where the lock will be written. All instances have to share the same lock.
-* {{karaf.lock.delay}} property is the interval period (in milliseconds) to check if the lock has been released or not.
-
-h3. Database lock
-
-It's not always possible and easy to have a shared filesystem between multiple Apache Karaf instances.
-
-Instead of sharing a filesystem, Apache Karaf supports sharing a database.
-
-The master instance holds the lock by locking a table in the database. If the master loses the lock, a waiting slave
-gains access to the locking table, acquire the lock on the table and starts.
-
-The database lock uses JDBC (Java DataBase Connectivity). To use database locking, you have to:
-
-* copy the JDBC driver in the {{lib/ext}} folder on each instance. The JDBC driver to use is the one corresponding to the
- database used for the locking system.
-* update {{etc/system.properties}} file on each instance:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.DefaultJDBCLock
-karaf.lock.level=50
-karaf.lock.delay=10000
-karaf.lock.jdbc.url=jdbc:derby://dbserver:1527/sample
-karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-{code}
-
-* {{karaf.lock}} property enabled the HA/failover mechanism
-* {{karaf.lock.class}} property contains the class name providing the lock implementation. The {{org.apache.karaf.main.DefaultJDBCLock}}
- is the most generic database lock system implementation. Apache Karaf supports lock system for specific databases (see later for details).
-* {{karaf.lock.level}} property is the container-level locking (see later for details).
-* {{karaf.lock.delay}} property is the interval period (in milliseconds) to check if the lock has been released or not.
-* {{karaf.lock.jdbc.url}} property contains the JDBC URL to the database (derby in this example).
-* {{karaf.lock.jdbc.driver}} property contains the class name of the JDBC driver to use (derby in this example).
-* {{karaf.lock.jdbc.user}} property contains the username to use to connect to the database.
-* {{karaf.lock.jdbc.password}} property contains the password to use to connet to the database.
-* {{karaf.lock.jdbc.table}} property contains the database table to use for the lock. Karaf will first try to find the table as specified in this property,
- and if not found, it will try the table name in lower and upper case.
-
-{warning}
-Apache Karaf won't start if the JDBC driver is not present in the {{lib/ext}} folder.
-{warning}
-
-{warning}
-The {{sample}} database will be created automatically if it does not exist.
-{warning}
-
-{warning}
-If the connection to the database is lost, the master instance tries to gracefully shutdown, allowing a slave instance to
-become the master when the database is back. The former master instance will required a manual restart.
-{warning}
-
-h4. Lock on Oracle
-
-Apache Karaf supports Oracle database for locking. The lock implementation class name to use is {{org.apache.karaf.main.lock.OracleJDBCLock}}:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.OracleJDBCLock
-karaf.lock.jdbc.url=jdbc:oracle:thin:@hostname:1521:XE
-karaf.lock.jdbc.driver=oracle.jdbc.OracleDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-{code}
-
-The Oracle JDBC driver file ({{ojdbc*.jar}}) has to be copied in the {{lib/ext}} folder.
-
-{warning}
-The {{karaf.lock.jdbc.url}} property contains a JDBC URL which requires an active SID. It means that you must manually create the Oracle
-database instance first before using the lock mechanism.
-{warning}
-
-h4. Lock on Derby
-
-Apache Karaf supports Apache Derby database for locking. The lock implementation class name to use is {{org.apache.karaf.main.lock.DerbyJDBCLock}}:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.DerbyJDBCLock
-karaf.lock.jdbc.url=jdbc:derby://127.0.0.1:1527/dbname
-karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-{code}
-
-The Derby JDBC driver file name has to be copied in the {{lib/ext}} folder.
-
-h4.Lock on MySQL
-
-Apache Karaf supports MySQL database for locking. The lock implementation class name to use is {{org.apache.karaf.main.lock.MySQLJDBCLock}}:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.MySQLJDBCLock
-karaf.lock.jdbc.url=jdbc:mysql://127.0.0.1:3306/dbname
-karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-{code}
-
-The MySQL JDBC driver file name has to be copied in {{lib/ext}} folder.
-
-h4. Lock on PostgreSQL
-
-Apache Karaf supports PostgreSQL database for locking. The lock implementation class name to use is {{org.apache.karaf.main.lock.PostgreSQLJDBCLock}}:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.PostgreSQLJDBCLock
-karaf.lock.jdbc.url=jdbc:postgresql://127.0.0.1:1527/dbname
-karaf.lock.jdbc.driver=org.postgresql.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=0
-{code}
-
-The PostgreSQL JDBC driver file has to be copied in the {{lib/ext}} folder.
-
-h4. Lock on Microsoft SQLServer
-
-Apache Karaf supports Microsoft SQLServer database for locking. The lock implementation class name to use is {{org.apache.karaf.main.lock.SQLServerJDBCLock}}:
-
-{code}
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.SQLServerJDBCLock
-karaf.lock.level=50
-karaf.lock.delay=10000
-karaf.lock.jdbc.url=jdbc:jtds:sqlserver://127.0.0.1;databaseName=sample
-karaf.lock.jdbc.driver=net.sourceforge.jtds.jdbc.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-{code}
-
-The JTDS JDBC driver file has to be copied in the {{lib/ext}} folder.
-
-h3. Container-level locking
-
-Apache Karaf supports container-level locking. It allows bundles to be preloaded into the slave instance.
-Thanks to that, switching to a slave instance is very fast as the slave instance already contains all required bundles.
-
-The container-level locking is supported in both filesystem and database lock mechanisms.
-
-The container-level locking uses the {{karaf.lock.level}} property:
-
-{code}
-karaf.lock.level=50
-{code}
-
-The {{karaf.lock.level}} property tells the Karaf instance how far up the boot process to bring the OSGi container.
-All bundles with an ID equals or lower to this start level will be started in that Karaf instance.
-
-As reminder, the bundles start levels are specified in {{etc/startup.properties}}, in the {{url=level}} format.
-
-|| Level || Behavior ||
-| 1 | A 'cold' standby instance. Core bundles are not loaded into container. Slaves will wait until lock acquired to start server. |
-| <50 | A 'hot' standby instance. Core bundles are loaded into the container. Slaves will wait until lock acquired to start user level bundles. The console will be accessible for each slave instance at this level. |
-| >50 | This setting is not recommended as user bundles will end up being started. |
-
-{warning}
-Using 'hot' standby means that the slave instances are running and bind some ports. So, if you use master and slave instances on the same machine, you have
-to update the slave configuration to bind the services (ssh, JMX, etc) on different port numbers.
-{warning}
-
-h2. Cluster (active/active)
-
-Apache Karaf doesn't natively support cluster. By cluster, we mean several active instances, synchronized with each other.
-
-However, [Apache Karaf Cellar|http://karaf.apache.org/index/subprojects/cellar.html] can be installed to provide cluster support.
-
-See the [Apache Karaf Cellar website|http://karaf.apache.org/index/subprojects/cellar.html] for details.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/features.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/features.conf b/manual/src/main/webapp/users-guide/features.conf
deleted file mode 100644
index 6dc83de..0000000
--- a/manual/src/main/webapp/users-guide/features.conf
+++ /dev/null
@@ -1,52 +0,0 @@
-h1. Features
-
-h2. Standard Features
-
-* *Hot deployment*: simply drop a file in the {{deploy}} directory, Apache Karaf will detect the type of the file and
- try to deploy it.
-* *Complete Console*: Apache Karaf provides a complete Unix-like console where you can completely manage the container.
-* *Dynamic Configuration*: Apache Karaf provides a set of command dedicated for the management of the configuration files.
- All configuration files are centralized in the {{etc}} folder. Any change in a configuration file is taken on the fly.
-* *Advanced Logging System*: Apache Karaf supports a large set of Logging framework (slf4j, log4j, etc). Whatever the
- logging framework you use, Apache Karaf centralizes the configuration in one file.
-* *Provisioning*: Apache Karaf supports a large set of URL where you can install your application (Maven repository, HTTP,
- file, etc). It also provides the concept of "Karaf Feature" which is a way to describe your application.
-* *Management*: Apache Karaf is an enterprise-ready container, providing a lot of management indicators and operations
- via JMX.
-* *Remote*: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also
- accessible remotely.
-* *Security*: Apache Karaf provides a complete security framework (based on JAAS), and providing RBAC (Role-Based Access
- Control) mechanism for console and JMX.
-* *Instances*: multiple instances of Apache Karaf can be managed directly from a main instance (root).
-* *OSGi frameworks*: Apache Karaf is not tight to one OSGi framework. By default, Apache Karaf runs with Apache Felix
- Framework, but you can easily switch to Equinox (just change on property in a configuration file).
-
-!/images/karaf.png!
-
-h2. Enterprise features
-
-* WebContainer (JSP/Servlet support, including WAR archive deployment support)
-* Naming (JNDI)
-* Transaction (JTA)
-* DataSources (JDBC)
-* MOM (JMS)
-* Persistence (JPA)
-* EJB
-* CDI
-* HA/failover and cluster (Apache Karaf Cellar)
-* Monitoring (Apache Karaf Decanter)
-* Artifacts repository and OSGi bundle repository (Apache Karaf Cave)
-
-h2. External Features
-
-As a very extend-able container, OpenSource and commercial projects provide "native" support of Apache Karaf.
-
-We can mention (this list is not exhaustive):
-
-* [Apache ActiveMQ|http://activemq.apache.org/osgi-integration.html]
-* [Apache Camel|http://camel.apache.org/karaf.html]
-* [Apache CXF|http://cxf.apache.org]
-* [JClouds|http://www.jclouds.org/documentation/userguide/karaf/]
-* [Apache Wicket|http://team.ops4j.org/wiki/display/paxwicket/Install+Pax+Wicket]
-* ...
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/http.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/http.conf b/manual/src/main/webapp/users-guide/http.conf
deleted file mode 100644
index fa45219..0000000
--- a/manual/src/main/webapp/users-guide/http.conf
+++ /dev/null
@@ -1,60 +0,0 @@
-h1. Http Service
-
-The Karaf http feature enables the Pax Web implementation of the OSGi HTTPService.
-
-h2. Installing the HTTP feature
-
-{code}
-root@karaf()> feature:install http
-{code}
-
-Test the HTTP service is up by pointing your browser to [http://localhost:8181/].
-
-h2. Configuring the HTTPService
-
-By default the HTTPService listens on port 8181 you can change the port by creating a file {{etc/org.ops4j.pax.web.cfg}} with the following content:
-
-{code}
-org.osgi.service.http.port=8181
-{code}
-
-or by typing:
-{code}
-root@karaf> config:property-set -p org.ops4j.pax.web org.osgi.service.http.port 8181
-{code}
-
-If the http feature is already installed the change will take effect immediately.
-
-h2. Registering a servlet with the HttpService manually
-
-See [Apache Felix HTTP Service|http://felix.apache.org/site/apache-felix-http-service.html].
-
-h2. Using the Pax Web whiteboard extender
-
-The Pax Web whiteboard extender is an enhancement of the http feature. So use the following command to install:
-
-{code}
-root@karaf> feature:install http-whiteboard
-{code}
-
-The [Pax Web whiteboard|http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard] extender listens to services
-of interface type HttpServlet and Filter.
-It will register each of these interfaces with the HttpService and remove them as soon as the service goes down.
-So it is much more convenient than registering with the HttpService directly.
-
-{code}
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <service interface="javax.servlet.http.HttpServlet">
- <service-properties>
- <entry key="alias" value="/myservlet"/>
- </service-properties>
- <bean id="myServlet" class="com.example.MyServlet"/>
- </service>
-</blueprint>
-{code}
-
-The above snippet publishes the Servlet MyServlet on http://localhost:8181/myServlet.
-
-Please keep in mind that the Whiteboard pattern for Servlets is not standardized and only works with Pax Web.
-
-For commands take a look at the command section in the [webcontainer|webcontainer] chapter.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/index.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/index.conf b/manual/src/main/webapp/users-guide/index.conf
deleted file mode 100644
index d140ec0..0000000
--- a/manual/src/main/webapp/users-guide/index.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-h1. Users Guide
-
-* [Installation|installation]
-* [Directory structure|directory-structure]
-* [Start, stop, restart, connect|start-stop]
-* [Integration in the operating system: the Service Wrapper|wrapper]
-* [Console|/users-guide/console]
-* [Remote|remote]
-* [Log|log]
-* [Configuration|configuration]
-* [Artifacts repositories and URLs|urls]
-* [Provisioning and features|provisioning]
-* [Deployers|deployers]
-* [KAR|kar]
-* [Instances|instances]
-* [Security|security]
-* [OBR|obr]
-* [Enterprise|enterprise]
-** [WebContainer (JSP/Servlet)|webcontainer]
-** [Naming (JNDI)|jndi]
-** [Transaction (JTA)|jta]
-** [DataSource (JDBC)|jdbc]
-** [MOM (JMS)|jms]
-** [Persistence (JPA)|jpa]
-** [EJB|ejb]
-** [CDI|cdi]
-** [HA/failover and cluster|failover]
-* [Monitoring and Management using JMX|monitoring]
-* [WebConsole|webconsole]
-* [Tuning|tuning]
[13/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/security.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/security.adoc b/manual/src/main/asciidoc/user-guide/security.adoc
new file mode 100644
index 0000000..a4bae68
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/security.adoc
@@ -0,0 +1,584 @@
+//
+// Licensed 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.
+//
+
+== Security
+
+Apache Karaf provides an advanced and flexible security system, powered by JAAS (Java Authentication and Authorization
+Service) in an OSGi compliant way.
+
+It provides a dynamic security system.
+
+The Apache Karaf security framework is used internally to control the access to:
+
+* the OSGi services (described in the developer guide)
+* the console commands
+* the JMX layer
+* the WebConsole
+
+Your applications can also use the security framework (see the developer guide for details).
+
+=== Realms
+
+Apache Karaf is able to manage multiple realms. A realm contains the definition of the login modules to use for the
+authentication and/or authorization on this realm. The login modules define the authentication and authorization for
+the realm.
+
+The `jaas:realm-list` command list the current defined realms:
+
+----
+karaf@root()> jaas:realm-list
+Index | Realm Name | Login Module Class Name
+-----------------------------------------------------------------------------------
+1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
+----
+
+You can see that the Apache Karaf provides a default realm named `karaf`.
+
+This realm has two login modules:
+
+* the `PropertiesLoginModule` uses the `etc/users.properties` file as backend for users, groups, roles and password.
+ This login module authenticates the users and returns the users' roles.
+* the `PublickeyLoginModule` is especially used by the SSHd. It uses the `etc/keys.properties` file. This file contains
+ the users and a public key associated to each user.
+
+Apache Karaf provides additional login modules (see the developer guide for details):
+
+* JDBCLoginModule uses a database as backend
+* LDAPLoginModule uses a LDAP server as backend
+* SyncopeLoginModule uses Apache Syncope as backend
+* OsgiConfigLoginModule uses a configuration as backend
+
+You can manage an existing realm, login module, or create your own realm using the `jaas:realm-manage` command.
+
+=== Users, groups, roles, and passwords
+
+As we saw, by default, Apache Karaf uses a PropertiesLoginModule.
+
+This login module uses the `etc/users.properties` file as storage for the users, groups, roles and passwords.
+
+The initial `etc/users.properties` file contains:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# This file contains the users, groups, and roles.
+# Each line has to be of the format:
+#
+# USER=PASSWORD,ROLE1,ROLE2,...
+# USER=PASSWORD,_g_:GROUP,...
+# _g_\:GROUP=ROLE1,ROLE2,...
+#
+# All users, grousp, and roles entered in this file are available after Karaf startup
+# and modifiable via the JAAS command group. These users reside in a JAAS domain
+# with the name "karaf".
+#
+karaf = karaf,_g_:admingroup
+_g_\:admingroup = group,admin,manager,viewer
+----
+
+We can see in this file, that we have one user by default: `karaf`.
+The default password is `karaf`.
+
+The `karaf` user is member of one group: the `admingroup`.
+
+A group is always prefixed by `_g_:`. An entry without this prefix is an user.
+
+A group defines a set of roles. By default, the `admingroup` defines `group`, `admin`, `manager`, and `viewer`
+roles.
+
+It means that the `karaf` user will have the roles defined by the `admingroup`.
+
+==== Commands
+
+The `jaas:*` commands manage the realms, users, groups, roles in the console.
+
+===== `jaas:realm-list`
+
+We already used the `jaas:realm-list` previously in this section.
+
+The `jaas:realm-list` command list the realm and the login modules for each realm:
+
+----
+karaf@root()> jaas:realm-list
+Index | Realm Name | Login Module Class Name
+-----------------------------------------------------------------------------------
+1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
+----
+
+We have here one realm (`karaf`) containing two login modules (`PropertiesLoginModule` and `PublickeyLoginModule`).
+
+The `index` is used by the `jaas:realm-manage` command to easily identify the realm/login module that we want to manage.
+
+===== `jaas:realm-manage`
+
+The `jaas:realm-manage` command switch in realm/login module edit mode, where you can manage the users, groups, and roles in the login module.
+
+To identify the realm and login module that you want to manage, you can use the `--index` option.
+The indexes are displayed by the `jaas:realm-list` command:
+
+----
+karaf@root()> jaas:realm-manage --index 1
+----
+
+Another way is to use the `--realm` and `--module` options. The `--realm` option expects the realm name, and the `--module`
+option expects the login module class name:
+
+----
+karaf@root()> jaas:realm-manage --realm karaf --module org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+----
+
+===== `jaas:user-list`
+
+When you are in edit mode, you can list the users in the login module using the `jaas:user-list`:
+
+----
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+----
+
+You can see the user name and the group by role.
+
+===== `jaas:user-add`
+
+The `jaas:user-add` command adds a new user (and the password) in the currently edited login module:
+
+----
+karaf@root()> jaas:user-add foo bar
+----
+
+To "commit" your change (here the user addition), you have to execute the `jaas:update` command:
+
+----
+karaf@root()> jaas:update
+karaf@root()> jaas:realm-manage --index 1
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+foo | |
+----
+
+On the other hand, if you want to rollback the user addition, you can use the `jaas:cancel` command.
+
+===== `jaas:user-delete`
+
+The `jaas:user-delete` command deletes an user from the currently edited login module:
+
+----
+karaf@root()> jaas:user-delete foo
+----
+
+Like for the `jaas:user-add` command, you have to use the `jaas:update` to commit your change (or `jaas:cancel` to rollback):
+
+----
+karaf@root()> jaas:update
+karaf@root()> jaas:realm-manage --index 1
+karaf@root()> jaas:user-list
+User Name | Group | Role
+--------------------------------
+karaf | admingroup | admin
+karaf | admingroup | manager
+karaf | admingroup | viewer
+----
+
+===== `jaas:group-add`
+
+The `jaas:group-add` command assigns a group (and eventually creates the group) to an user in the currently edited login module:
+
+----
+karaf@root()> jaas:group-add karaf mygroup
+----
+
+===== `jaas:group-delete`
+
+The `jaas:group-delete` command removes an user from a group in the currently edited login module:
+
+----
+karaf@root()> jaas:group-delete karaf mygroup
+----
+
+===== `jaas:group-role-add`
+
+The `jaas:group-role-add` command adds a role in a group in the currently edited login module:
+
+----
+karaf@root()> jaas:group-role-add mygroup myrole
+----
+
+===== `jaas:group-role-delete`
+
+The `jaas:group-role-delete` command removes a role from a group in the currently edited login module:
+
+----
+karaf@root()> jaas:group-role-delete mygroup myrole
+----
+
+===== `jaas:update`
+
+The `jaas:update` command commits your changes in the login module backend. For instance, in the case of the PropertiesLoginModule,
+the `etc/users.properties` will be updated only after the execution of the `jaas:update` command.
+
+===== `jaas:cancel`
+
+The `jaas:cancel` command rollback your changes and doesn't update the login module backend.
+
+=== Passwords encryption
+
+By default, the passwords are stored in clear form in the `etc/users.properties` file.
+
+It's possible to enable encryption in the `etc/org.apache.karaf.jaas.cfg` configuration file:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# Boolean enabling / disabling encrypted passwords
+#
+encryption.enabled = false
+
+#
+# Encryption Service name
+# the default one is 'basic'
+# a more powerful one named 'jasypt' is available
+# when installing the encryption feature
+#
+encryption.name =
+
+#
+# Encryption prefix
+#
+encryption.prefix = {CRYPT}
+
+#
+# Encryption suffix
+#
+encryption.suffix = {CRYPT}
+
+#
+# Set the encryption algorithm to use in Karaf JAAS login module
+# Supported encryption algorithms follow:
+# MD2
+# MD5
+# SHA-1
+# SHA-256
+# SHA-384
+# SHA-512
+#
+encryption.algorithm = MD5
+
+#
+# Encoding of the encrypted password.
+# Can be:
+# hexadecimal
+# base64
+#
+encryption.encoding = hexadecimal
+----
+
+If the `encryption.enabled` property is set to true, the password encryption is enabled.
+
+With encryption enabled, the password are encrypted at the first time an user logs in. The encrypted passwords are
+prefixed and suffixed with `\{CRYPT\`}. To re-encrypt the password, you can reset the password in clear (in `etc/users.properties`
+file), without the `\{CRYPT\`} prefix and suffix. Apache Karaf will detect that this password is in clear (because it's not
+prefixed and suffixed with `\{CRYPT\`}) and encrypt it again.
+
+The `etc/org.apache.karaf.jaas.cfg` configuration file allows you to define advanced encryption behaviours:
+
+* the `encryption.prefix` property defines the prefix to "flag" a password as encrypted. The default is `\{CRYPT\`}.
+* the `encryption.suffix` property defines the suffix to "flag" a password as encrypted. The default is `\{CRYPT\`}.
+* the `encryption.algorithm` property defines the algorithm to use for encryption (digest). The possible values are `MD2`, `MD5`,
+`SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`. The default is `MD5`.
+* the `encryption.encoding` property defines the encoding of the encrypted password. The possible values are `hexadecimal`
+ or `base64`. The default value is `hexadecimal`.
+
+=== Managing authentication by key
+
+For the SSH layer, Karaf supports the authentication by key, allowing to login without providing the password.
+
+The SSH client (so bin/client provided by Karaf itself, or any ssh client like OpenSSH) uses a public/private keys pair that
+will identify himself on Karaf SSHD (server side).
+
+The keys allowed to connect are stored in `etc/keys.properties` file, following the format:
+
+----
+user=key,role
+----
+
+By default, Karaf allows a key for the karaf user:
+
+----
+# karaf=AAAAB3NzaC1kc3MAAACBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAAAAFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QAAAIEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoAAACBAKKSU2PFl/qOLxIwmBZPPIcJshVe7bVUpFvyl3BbJDow8rXfskl8wO63OzP/qLmcJM0+JbcRU/53JjTuyk31drV2qxhIOsLDC9dGCWj47Y7TyhPdXh/0dthTRBy6bqGtRPxGa7gJov1xm/UuYYXPIUR/3x9MAZvZ5xvE0kYXO+rx,admin
+----
+
+[NOTE]
+====
+For security reason, this key is disabled. We encourage to create the keys pair per client and update the `etc/keys.properties` file.
+====
+
+The easiest way to create key pair is to use OpenSSH.
+
+You can create a key pair using:
+
+----
+ssh-keygen -t dsa -f karaf.id_dsa -N karaf
+----
+
+You have now the public and private keys:
+
+----
+-rw------- 1 jbonofre jbonofre 771 Jul 25 22:05 karaf.id_dsa
+-rw-r--r-- 1 jbonofre jbonofre 607 Jul 25 22:05 karaf.id_dsa.pub
+----
+
+You can copy in the content of the `karaf.id_dsa.pub` file in the `etc/keys.properties`:
+
+----
+karaf=AAAAB3NzaC1kc3MAAACBAJLj9vnEhu3/Q9Cvym2jRDaNWkATgQiHZxmErCmiLRuD5Klfv+HT/+8WoYdnvj0YaXFP80phYhzZ7fbIO2LRFhYhPmGLa9nSeOsQlFuX5A9kY1120yB2kxSIZI0fU2hy1UCgmTxdTQPSYtdWBJyvO/vczoX/8I3FziEfss07Hj1NAAAAFQD1dKEzkt4e7rBPDokPOMZigBh4kwAAAIEAiLnpbGNbKm8SNLUEc/fJFswg4G4VjjngjbPZAjhkYe4+H2uYmynry6V+GOTS2kaFQGZRf9XhSpSwfdxKtx7vCCaoH9bZ6S5Pe0voWmeBhJXi/Sww8f2stpitW2Oq7V7lDdDG81+N/D7/rKDD5PjUyMsVqc1n9wCTmfqmi6XPEw8AAACAHAGwPn/Mv7P9Q9+JZRWtGq+i4pL1zs1OluiStCN9e/Ok96t3gRVKPheQ6IwLacNjC9KkSKrLtsVyepGA+V5j/N+Cmsl6csZilnLvMUTvL/cmHDEEhTIQnPNrDDv+tED2BFqkajQqYLgMWeGVqXsBU6IT66itZlYtrq4v6uDQG/o=,admin
+----
+
+and specify to the client to use the `karaf.id_dsa` private key:
+
+----
+bin/client -k ~/karaf.id_dsa
+----
+
+or to ssh
+
+----
+ssh -p 8101 -i ~/karaf.id_dsa karaf@localhost
+----
+
+=== RBAC
+
+Apache Karaf uses the roles to control the access to the resources: it's a RBAC (Role Based Access Control) system.
+
+The roles are used to control:
+
+* access to OSGi services
+* access to the console (control the execution of the commands)
+* access to JMX (MBeans and/or operations)
+* access to the WebConsole
+
+==== OSGi services
+
+The details about OSGi services RBAC support is explained in the developer guide.
+
+==== Console
+
+Console RBAC supports is a specialization of the OSGi service RBAC. Actually, in Apache Karaf, all console commands are
+defined as OSGi services.
+
+The console command name follows the `scope:name` format.
+
+The ACL (Access Lists) are defined in `etc/org.apache.karaf.command.acl.<scope>.cfg` configuration files, where `<scope>`
+is the commands scope.
+
+For instance, we can define the ACL to the `feature:*` commands by creating a `etc/org.apache.karaf.command.acl.feature.cfg`
+configuration file. In this `etc/org.apache.karaf.command.acl.feature.cfg` configuration file, we can set:
+
+----
+list = viewer
+info = viewer
+install = admin
+uninstall = admin
+----
+
+Here, we define that `feature:list` and `feature:info` commands can be executed by users with `viewer` role, whereas
+the `feature:install` and `feature:uninstall` commands can only be executed by users with `admin` role.
+Note that users in the admin group will also have viewer role, so will be able to do everything.
+
+Apache Karaf command ACLs can control access using (inside a given command scope):
+
+* the command name regex (e.g. `name = role`)
+* the command name and options or arguments values regex (e.g. `name[/.*[0-9][0-9][0-9]+.*/] = role` to execute name only with argument value above 100)
+
+Both command name and options/arguments support exact matching or regex matching.
+
+By default, Apache Karaf defines the following commands ACLs:
+
+* `etc/org.apache.karaf.command.acl.bundle.cfg` configuration file defines the ACL for `bundle:*` commands.
+ This ACL limits the execution of `bundle:*` commands for system bundles only to the users with `admin` role, whereas
+ `bundle:*` commands for non-system bundles can be executed by the users with `manager` role.
+* `etc/org.apache.karaf.command.acl.config.cfg` configuration file defines the ACL for `config:*` commands.
+ This ACL limits the execution of `config:*` commands with `jmx.acl.*`, `org.apache.karaf.command.acl.*`, and
+ `org.apache.karaf.service.acl.*` configuration PID to the users with `admin` role. For the other configuration PID,
+ the users with the `manager` role can execute `config:*` commands.
+* `etc/org.apache.karaf.command.acl.feature.cfg` configuration file defines the ACL for `feature:*` commands.
+ Only the users with `admin` role can execute `feature:install` and `feature:uninstall` commands. The other `feature:*`
+ commands can be executed by any user.
+* `etc/org.apache.karaf.command.acl.jaas.cfg` configuration file defines the ACL for `jaas:*` commands.
+ Only the users with `admin` role can execute `jaas:update` command. The other `jaas:*` commands can be executed by any
+ user.
+* `etc/org.apache.karaf.command.acl.kar.cfg` configuration file defines the ACL for `kar:*` commands.
+ Only the users with `admin` role can execute `kar:install` and `kar:uninstall` commands. The other `kar:*` commands
+ can be executed by any user.
+* `etc/org.apache.karaf.command.acl.shell.cfg` configuration file defines the ACL for `shell:*` and "direct" commands.
+ Only the users with `admin` role can execute `shell:edit`, `shell:exec`, `shell:new`, and `shell:java` commands.
+ The other `shell:*` commands can be executed by any user.
+
+You can change these default ACLs, and add your own ACLs for additional command scopes (for instance `etc/org.apache.karaf.command.acl.cluster.cfg` for
+Apache Karaf Cellar, `etc/org.apache.karaf.command.acl.camel.cfg` from Apache Camel, ...).
+
+You can fine tuned the command RBAC support by editing the `karaf.secured.services` property in `etc/system.properties`:
+
+----
+#
+# By default, only Karaf shell commands are secured, but additional services can be
+# secured by expanding this filter
+#
+karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
+----
+
+==== JMX
+
+Like for the console commands, you can define ACL (AccessLists) to the JMX layer.
+
+The JMX ACL are defined in `etc/jmx.acl<ObjectName>.cfg` configuration file, where `<ObjectName>` is a MBean object name
+(for instance `org.apache.karaf.bundle` represents `org.apache.karaf;type=Bundle` MBean).
+
+The `etc/jmx.acl.cfg` is the most generic configuration file and is used when no specific ones are found.
+It contains the "global" ACL definition.
+
+JMX ACLs can control access using (inside a JMX MBean):
+
+* the operation name regex (e.g. `operation* = role`)
+* the operation arguments value regex (e.g. `operation(java.lang.String, int)[/([1-4])?[0-9]/,/.*/] = role`)
+
+By default, Apache Karaf defines the following JMX ACLs:
+
+* `etc/jmx.acl.org.apache.karaf.bundle.cfg` configuration file defines the ACL for the `org.apache.karaf:type=bundle`
+ MBean. This ACL limits the `setStartLevel()`, `start()`, `stop()`, and `update()` operations for system bundles for
+ only users with `admin` role. The other operations can be performed by users with the `manager` role.
+* `etc/jmx.acl.org.apache.karaf.config.cfg` configuration file defines the ACL for the `org.apache.karaf:type=config`
+ MBean. This ACL limits the change on `jmx.acl*`, `org.apache.karaf.command.acl*`, and `org.apache.karaf.service.acl*`
+ configuration PIDs for only users with `admin` role. The other operations can be performed by users with the `manager` role.
+* `etc/jmx.acl.org.apache.karaf.security.jmx.cfg` configuration file defines the ACL for the `org.apache.karaf:type=security,area=jmx`
+ MBean. This ACL limits the invocation of the `canInvoke()` operation for the users with `viewer` role.
+* `etc/jmx.acl.osgi.compendium.cm.cfg` configuration file defines the ACL for the `osgi.compendium:type=cm` MBean.
+ This ACL limits the changes on `jmx.acl*`, `org.apache.karaf.command.acl*`, and `org.apache.karaf.service.acl*`
+ configuration PIDs for only users with `admin` role. The other operations can be performed by users with the `manager` role.
+* `etc/jmx.acl.java.lang.Memory.cfg` configuration file defines the ACL for the core JVM Memory MBean.
+ This ACL limits the invocation of the `gc` operation for only users with the `manager` role.
+* `etc/jmx.acl.cfg` configuration file is the most generic file. The ACLs defined here are used when no other specific
+ ACLs match (by specific ACL, it's an ACL defined in another MBean specific `etc/jmx.acl.*.cfg` configuration file).
+ The `list*()`, `get*()`, `is*()` operations can be performed by users with the `viewer` role.
+ The `set*()` and all other `*()` operations can be performed by users with the `admin` role.
+
+==== WebConsole
+
+The Apache Karaf WebConsole is not available by default. To enable it, you have to install the `webconsole` feature:
+
+----
+karaf@root()> feature:install webconsole
+----
+
+The WebConsole doesn't support fine grained RBAC like console or JMX for now.
+
+All users with the `admin` role can logon the WebConsole and perform any operations.
+
+=== SecurityMBean
+
+Apache Karaf provides a JMX MBean to check if the current user can invoke a given MBean and/or operation.
+
+The `canInvoke()` operation gets the roles of the current user, and check if one the roles can invoke the MBean and/or the
+operation, eventually with a given argument value.
+
+==== Operations
+
+* `canInvoke(objectName)` returns `true` if the current user can invoke the MBean with the `objectName`, `false` else.
+* `canInvoke(objectName, methodName)` returns `true` if the current user can invoke the operation `methodName` on the MBean
+ with the `objectName`, `false` else.
+* `canInvoke(objectName, methodName, argumentTypes)` returns `true` if the current user can invoke the operation `methodName`
+with the array of arguments types `argumentTypes` on the MBean with `objectName`, `false` else.
+* `canInvoke(bulkQuery)` returns a tabular data containing for each operation in the `bulkQuery` tabular data if `canInvoke`
+is `true` or `false`.
+
+=== Security providers
+
+Some applications require specific security providers to be available, such as [BouncyCastle|http://www.bouncycastle.org].
+
+The JVM imposes some restrictions about the use of such jars: they have to be signed and be available on the boot classpath.
+
+One way to deploy those providers is to put them in the JRE folder at `$JAVA_HOME/jre/lib/ext` and modify the security
+policy configuration (`$JAVA_HOME/jre/lib/security/java.security`) in order to register such providers.
+
+While this approach works fine, it has a global effect and requires you to configure all your servers accordingly.
+
+Apache Karaf offers a simple way to configure additional security providers:
+* put your provider jar in `lib/ext`
+* modify the `etc/config.properties` configuration file to add the following property
+
+----
+org.apache.karaf.security.providers = xxx,yyy
+----
+
+The value of this property is a comma separated list of the provider class names to register.
+
+For instance, to add the bouncycastle security provider, you define:
+
+----
+org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
+----
+
+In addition, you may want to provide access to the classes from those providers from the system bundle so that all bundles
+can access those.
+
+It can be done by modifying the `org.osgi.framework.bootdelegation` property in the same configuration file:
+
+----
+org.osgi.framework.bootdelegation = ...,org.bouncycastle*
+----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/start-stop.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/start-stop.adoc b/manual/src/main/asciidoc/user-guide/start-stop.adoc
new file mode 100644
index 0000000..d89a005
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/start-stop.adoc
@@ -0,0 +1,439 @@
+//
+// Licensed 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.
+//
+
+== Start, stop, restart, connect
+
+=== Start
+
+Apache Karaf supports different start mode:
+
+* the "regular" mode starts Apache Karaf in foreground, including the shell console.
+* the "server" mode starts Apache Karaf in foreground, without the shell console.
+* the "background" mode starts Apache Karaf in background.
+
+You can also manage Apache Karaf as a system service (see link:wrapper[System Service] section).
+
+==== Regular mode
+
+The regular mode uses the `bin/karaf` Unix script (`bin\karaf.bat` on Windows). It's the default start process.
+
+It starts Apache Karaf as a foreground process, and displays the shell console.
+
+On Unix:
+
+----
+bin/karaf
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+----
+
+On Windows:
+
+----
+bin\karaf.bat
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+----
+
+[NOTE]
+====
+Closing the console or shell window will cause Apache Karaf to terminate.
+====
+
+==== Server mode
+
+The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.
+
+To use this mode, you use the `server` argument to the `bin/karaf` Unix script (`bin\karaf.bat` on Windows).
+
+On Unix:
+
+----
+bin/karaf server
+
+----
+
+On Windows:
+
+----
+bin\karaf.bat server
+
+----
+
+[NOTE]
+====
+Closing the console or shell window will cause Apache Karaf to terminate.
+====
+
+You can connect to the shell console using SSH or client (see the Connect section in this page).
+
+==== Background mode
+
+The background mode starts Apache Karaf as a background process.
+
+To start in background mode, you have to use `bin/start` Unix script (`bin\start.bat` on Windows).
+
+On Unix:
+
+----
+bin/start
+----
+
+On Windows:
+
+----
+bin\start.bat
+----
+
+You can connect to the shell console using SSH or client (see the Connect section in this page).
+
+==== Clean start
+
+Apache Karaf stores all previously applications installed and changes that you did in the data folder.
+
+If you want to start from a clean state, you can remove the data folder.
+
+For convenience, you can use the `clean` argument to the `bin/karaf` Unix script (`bin\karaf.bat` on Windows).
+
+On Unix:
+
+----
+bin/karaf clean
+----
+
+----
+bin/start clean
+----
+
+On Windows:
+
+----
+bin\karaf.bat clean
+----
+
+----
+bin\start.bat clean
+----
+
+==== Customize variables
+
+Apache Karaf accepts environment variables:
+
+* `JAVA_MIN_MEM`: minimum memory for the JVM (default is 128M).
+* `JAVA_MAX_MEM`: maximum memory for the JVM (default is 512M).
+* `JAVA_PERM_MEM`: minimum perm memory for the JVM (default is JVM default value).
+* `JAVA_MAX_PERM_MEM`: maximum perm memory for the JVM (default is JVM default value).
+* `KARAF_HOME`: the location of your Apache Karaf installation (default is found depending where you launch the startup script).
+* `KARAF_BASE`: the location of your Apache Karaf base (default is `KARAF_HOME`).
+* `KARAF_DATA`: the location of your Apache Karaf data folder (default is `KARAF_BASE/data`).
+* `KARAF_ETC`: the location of your Apache Karaf etc folder (default is `KARAF_BASE/etc`).
+* `KARAF_OPTS`: extra arguments passed to the Java command line (default is null).
+* `KARAF_DEBUG`: 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.
+
+You can define these environment variables in `bin/setenv` Unix script (`bin\setenv.bat` on Windows).
+
+For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:
+
+On Unix:
+
+----
+# Content of bin/setenv
+export JAVA_MIN_MEM=256M
+export JAVA_MAX_MEM=1024M
+----
+
+On Windows:
+
+----
+rem Content of bin\setenv.bat
+set JAVA_MIN_MEM=256M
+set JAVA_MAX_MEM=1024M
+----
+
+==== Connect
+
+Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.
+This connection can be local or remote. It means that you can access to Karaf console remotely.
+
+To connect to the console, you can use the `bin/client` Unix script (`bin\client.bat` on Windows).
+
+On Unix:
+
+----
+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:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+On Windows:
+
+----
+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:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0-SNAPSHOT)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+By default, `client` tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).
+
+`client` accepts different options to let you connect on a remote Apache Karaf instance. You can use `--help` to get details about the options:
+
+On Unix:
+
+----
+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
+----
+
+On Windows:
+
+----
+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
+----
+
+Actually, `client` is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.
+
+For instance, on Unix, you can do:
+
+----
+ssh karaf@localhost -p 8101
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0-SNAPSHOT)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+=== Stop
+
+When you start Apache Karaf in regular mode, the `logout` command or CTRL-D key binding logout from the console and shutdown Apache Karaf.
+
+When you start Apache Karaf in background mode (with the `bin/start` Unix script (`bin\start.bat` on Windows)), you can use the `bin/stop` Unix script (`bin\stop.bat` on Windows).
+
+More generally, you can use the `shutdown` command (on the Apache Karaf console) that work in any case.
+
+The `shutdown` command is very similar to the the `shutdown` Unix command.
+
+To shutdown Apache Karaf now, you can simple using `shutdown`:
+
+----
+karaf@root()> shutdown -h
+Confirm: halt instance root (yes/no):
+----
+
+The `shutdown` command asks for a confirmation. If you want to bypass the confirmation step, you can use the `-f` (`--force`) option:
+
+----
+karaf@root()> shutdown -f
+----
+
+You can also use directly `halt` which is an alias to `shutdown -f -h`.
+
+The `shutdown` command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.
+
+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
+(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 `now` is an alias for 0.
+
+For instance, the following command will shutdown Apache Karaf at 10:35am:
+
+----
+karaf@root()> system:shutdown 10:35
+----
+
+Another example to shutdown Apache Karaf in 10 minutes:
+
+----
+karaf@root()> system:shutdown 10
+----
+
+Like for other commands, you can find details on the `shutdown` command man page:
+
+----
+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.
+----
+
+=== Status
+
+When you start Apache Karaf in background mode, you may want to check the current status.
+
+To do so, you can use the `bin/status` Unix script (`bin\status.bat` on Windows).
+
+[NOTE]
+====
+The status script returns 0 exit code if Apache Karaf is running, 1 exit code else.
+====
+
+On Unix:
+
+----
+bin/status
+Not Running ...
+----
+
+----
+bin/status
+Running ...
+----
+
+On Windows:
+
+----
+bin\status.bat
+Not Running ...
+----
+
+----
+bin\status.bat
+Running ...
+----
+
+=== Restart
+
+The `shutdown` command accepts the `-r` (`--restart`) option to restart Apache Karaf:
+
+----
+karaf@root()> system:shutdown -r
+----
+
+[NOTE]
+====
+This command does not start a new JVM. It simply restarts the OSGi framework.
+====
+
+=== SystemMBean
+
+Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.
+
+The SystemMBean object name is `org.apache.karaf:type=system`.
+
+The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:
+
+* `reboot()` reboots Apache Karaf now (without cleaning the cache)
+* `reboot(time)` reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the `shutdown` command.
+* `rebootCleanCache(time)` reboots Apache Karaf at a given time, including the cleanup of the cache.
+* `rebootCleanAll(time)` reboots Apache Karaf at a given time, including the cleanup of the whole data folder.
+* `halt()` shutdown Apache Karaf now.
+* `halt(time)` shutdown Apache Karaf at a given time. The time format is the same as the time argument of the `shutdown` command.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/tuning.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/tuning.adoc b/manual/src/main/asciidoc/user-guide/tuning.adoc
new file mode 100644
index 0000000..07e7e74
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/tuning.adoc
@@ -0,0 +1,159 @@
+//
+// Licensed 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.
+//
+
+== Tuning
+
+=== Garbage Collection
+
+Like any Java applications, Apache Karaf uses a JVM. An important feature of the JVM is the Garbage Collector.
+
+Apache Karaf default configuration is sized for small to medium needs and to work on most machine.
+
+That's why this default configuration may appear like "small".
+
+By default, Apache Karaf uses:
+
+* `-Xms128M`
+* `-Xmx512M`
+* `-XX:+UnlockDiagnosticVMOptions`
+* `-XX:+UnsyncloadClass`
+
+On Sun/Oracle JVM:
+
+* the Perm size is the JVM default (for Java 7)
+
+On IBM JVM and AIX system:
+
+* `-Xverify:none`
+* `-Xdump:heap`
+* `-Xlp`
+
+For any container, it's always difficult to predict the usage of the resources and the behaviour of the artifacts deployed.
+
+Generally speaking, a good approach for tuning is to enable `-verbose:gc` and use tools like VisualVM to identify the potentials
+memory leaks, and see the possible optimisation of the spaces and GC.
+
+You can find introduction about GC here: [http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html].
+
+==== Java 6
+
+If you have enough resources available on the machine, a good configuration may be:
+
+* `-server`
+* `-Xmx1024M`
+* `-XX:MaxPermSize=640M`
+* `-XX:+UseConcMarkSweepGC`
+* `-XX:+UseParNewGC`
+* `-XX:+CMSClassUnloadingEnabled`
+
+It will give more resources to Apache Karaf, and avoid some perm space saturation if you do a lot of bundles refresh.
+
+See http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html for details about Java 6 tuning.
+
+==== Java 7
+
+Java 7 introduces a new GC algorithm: the GC1.
+
+Depending of the use cases (and usage of the heap), the new GC1 algorithm can give good performance improvements:
+
+* `-XX:+UseG1GC`
+* `-XX:-UseAdaptiveSizePolicy`
+
+See http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html for details about Java 7 GC1 tuning.
+
+You can find a good article about Java 7 tuning here: http://java-is-the-new-c.blogspot.de/2013/07/tuning-and-benchmarking-java-7s-garbage.html
+
+=== Threads
+
+In high loaded system, the number of threads can be very large.
+
+==== WebContainer
+
+If you use the Apache Karaf WebContainer, the Jetty connectors create threads to handle the incoming HTTP requests.
+
+The `etc/jetty.xml` configuration file allows you to tune the Jetty connector.
+
+For instance, the following connector configuration:
+
+----
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="host">
+ <Property name="jetty.host" />
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="8181" />
+ </Set>
+ <Set name="maxIdleTime">300000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">20000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+----
+
+defines the following properties:
+
+* `maxIdleTime` is the maximum inactivity time for a connection.
+* `lowResourcesConnections` defines the number of connections. If the current number of connections is greater than
+ this value, the status is "low on resources". In that case, a new connection timeout is applied: the `lowResourceMaxIdleTime`.
+* `Acceptors` defines the number of threads for incoming connections.
+
+==== Apache Camel
+
+For instance, if you use Apache Camel inside Apache Karaf, Camel components can create a lot of threads.
+
+Apache Camel use the notion of `threadPoolProfile` to control the threads creation.
+
+For instance, the following Camel configuration defines a pool creation strategy:
+
+----
+<threadPoolProfile id="defaultThreadPoolProfile" defaultProfile="true"
+ poolSize="10" maxPoolSize="20" maxQueueSize="1000"
+ rejectedPolicy="CallerRuns"/>
+----
+
+See the http://camel.apache.org for details.
+
+==== Apache CXF
+
+Apache CXF uses workqueues to handle server request/response.
+
+You may see a `etc/org.apache.cxf.workqueues-default.cfg` configuration file. It's the default configuration applied
+to all workqueues (a workqueue can be associated to a specific endpoint).
+
+On a workqueue, you can define the following properties about the threads:
+
+* `org.apache.cxf.workqueue.default.highWaterMark` defines the maximum number of threads.
+* `org.apache.cxf.workqueue.default.lowWaterMark` defines the minimum number of threads.
+* `org.apache.cxf.workqueue.default.initialSize` defines the initial number of threads.
+
+See the http://cxf.apache.org for details.
+
+=== System packages
+
+The `etc/jre.properties` defines the packages directly provided by the JVM.
+
+Most of the time, the default configuration in Apache Karaf is fine and works in most of the use cases.
+
+However, some times, you may want to not use the packages provided by the JVM, but the same packages provided by a bundle.
+
+For instance, the JAXB version provided by the JVM is "old", and you want to use new JAXB bundles.
+
+In that case, you have to comment the packages in `etc/jre.properties` to avoid to be provided by the JVM and use the
+ones from the bundles.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/urls.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/urls.adoc b/manual/src/main/asciidoc/user-guide/urls.adoc
new file mode 100644
index 0000000..47f7abe
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/urls.adoc
@@ -0,0 +1,60 @@
+//
+// Licensed 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.
+//
+
+== Artifacts repositories and URLs
+
+The main information provided by a feature is the set of OSGi bundles that defines the application. Such bundles are URLs pointing to the actual bundle jars. For example, one would write the following definition:
+
+----
+<bundle>http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
+----
+
+Doing this will make sure the above bundle is installed while installing the feature.
+
+However, Karaf provides several URL handlers, in addition to the usual ones (file, http, etc...). One of these is the Maven URL handler, which allow reusing maven repositories to point to the bundles.
+
+You can deploy bundles from file system without using Maven
+
+As we can use file: as protocol handler to deploy bundles, you can use the following syntax to deploy bundles when they are
+located in a directory which is not available using Maven
+
+----
+<bundle>file:base/bundles/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
+----
+
+Note: The path is relative to the Apache Karaf installation directory
+
+=== Maven URL Handler
+
+The equivalent of the above bundle would be:
+
+----
+<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
+----
+
+In addition to being less verbose, the Maven url handlers can also resolve snapshots and can use a local copy of the jar if one is available in your Maven local repository.
+
+The `org.ops4j.pax.url.mvn` bundle resolves `mvn` URLs. It can be configured using the file `etc/org.ops4j.pax.url.cfg`
+
+The most important property is :
+
+* `org.ops4j.pax.url.mvn.repositories` : Comma separated list of repository remote repository URLs that are checked in order of occurence when resolving maven artifacts
+
+By default, snapshots are disabled. To enable an URL for snapshots append @snapshots to a repository entry. For example
+
+----
+http://www.example.org/repo@snapshots
+----
+
+Repositories on the local machine are supported through `file:/` URLs.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/webconsole.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/webconsole.adoc b/manual/src/main/asciidoc/user-guide/webconsole.adoc
new file mode 100644
index 0000000..62c6eb1
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/webconsole.adoc
@@ -0,0 +1,61 @@
+//
+// Licensed 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.
+//
+
+== WebConsole
+
+Apache Karaf provides an optional WebConsole.
+
+This WebConsole provides a graphical web GUI to see and manage your Apache Karaf container.
+
+You can use the WebConsole to:
+
+* manage Apache Karaf features
+* manage OSGi bundles
+* manage the instances
+* manage the confgurations
+* manage the log service
+
+The WebConsole is extensible via a plugins system. Some applications can add new pages to the WebConsole.
+For instance, Apache Karaf Cellar provides additional pages to administrate cluster groups, nodes, etc.
+
+=== Installation
+
+To enable the Apache Karaf WebConsole, you just have to install the `webconsole` feature:
+
+----
+karaf@root()> feature:install webconsole
+----
+
+The `webconsole` feature automatically installs the `http` feature (see the [WebContainer section|webcontainer] for details).
+
+=== Access
+
+The Apache Karaf WebConsole uses the WebContainer port number (see the [WebContainer section|webcontainer] for details)
+with the `/system/console` context.
+
+By default, the Apache Karaf WebContainer port number is `8181`.
+
+It means that the Apache Karaf WebConsole is accessible on the following URL: http://localhost:8181/system/console
+
+As the Apache Karaf WebConsole uses the security framework, an username and password will be prompted.
+
+You have to enter an username/password from the `karaf` realm. By default, you can use `karaf`/`karaf`.
+
+See the link:security[Security section] for details.
+
+[NOTE]
+====
+Only users with the `admin` role are allowed to logon on the Apache Karaf WebConsole.
+Right now, the WebConsole doesn't use RBAC system as we have for console commands, or MBeans.
+====
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/webcontainer.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/webcontainer.adoc b/manual/src/main/asciidoc/user-guide/webcontainer.adoc
new file mode 100644
index 0000000..cccd9af
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/webcontainer.adoc
@@ -0,0 +1,292 @@
+//
+// Licensed 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.
+//
+
+=== WebContainer (JSP/Servlet)
+
+Apache Karaf can act a complete WebContainer, fully supporting JSP/Servlet specification.
+
+Apache Karaf WebContainer supports both:
+
+* WAB (WebApplication Bundles) which are OSGi native web applications
+* WAR (WebApplication aRchives) which are non-OSGi web applications (the same as you can deploy in any web container like Apache Tomcat)
+
+To enable the Apache Karaf WebContainer, you just have to install the `war` feature:
+
+----
+karaf@root()> feature:install war
+----
+
+[NOTE]
+====
+The installation of the `webconsole` feature automatically installs the `war` feature.
+====
+
+The `war` feature provides:
+
+* an embedded web container (powered by Jetty), with its configuration
+* a set of console commands
+* a new war deployer
+
+==== Configuration
+
+The default port used by the WebContainer is 8181.
+
+The WebContainer configuration is in the `etc/jetty.xml` configuration file.
+
+The `etc/jetty.xml` is a standard Eclipse Jetty configuration file.
+
+The default Apache Karaf WebContainer `etc/jetty.xml` contains:
+
+----
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
+DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<Configure class="org.eclipse.jetty.server.Server">
+
+ <!-- =========================================================== -->
+ <!-- Set connectors -->
+ <!-- =========================================================== -->
+ <!-- One of each type! -->
+ <!-- =========================================================== -->
+
+ <!-- Use this connector for many frequently idle connections and for
+ threadless continuations. -->
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="host">
+ <Property name="jetty.host" />
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="8181" />
+ </Set>
+ <Set name="maxIdleTime">300000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">20000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure Authentication Realms -->
+ <!-- Realms may be configured for the entire server here, or -->
+ <!-- they can be configured for a specific web app in a context -->
+ <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
+ <!-- example). -->
+ <!-- =========================================================== -->
+ <Call name="addBean">
+ <Arg>
+ <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <Set name="name">karaf</Set>
+ <Set name="loginModuleName">karaf</Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Arg>
+ </Call>
+ <Call name="addBean">
+ <Arg>
+ <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <Set name="name">default</Set>
+ <Set name="loginModuleName">karaf</Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Arg>
+ </Call>
+
+</Configure>
+----
+
+The `SelectChannelConnector` defines the default connector of the WebContainer.
+
+This connector defines the 8181 port number for the HTTP protocol (`port` property), and the 8443 port number for the
+HTTPS protocol (`confidentialPort` property).
+
+By default, Apache Karaf bind these ports on all network interfaces (`0.0.0.0`). You can config the `host` property
+to bind on a specific network interface (with a given IP address).
+
+The following resources give you details about advanced `etc/jetty.xml` configurations:
+
+* http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty
+* http://wiki.eclipse.org/Jetty/Howto/Configure_SSL
+* http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax
+
+==== Deploy
+
+Apache Karaf WebContainer is able to deploy:
+
+* pure OSGi WebApplication Bundle (WAB)
+* "classical" standard WebApplication aRchive (WAR)
+
+===== WAB (WebApplication Bundle)
+
+A WAB is a standard WAR or JAR archive containing at least the following properties in the MANIFEST:
+
+* `Bundle-ManifestVersion: 2` defines that the bundle follows the rules of R4 specification.
+* `Bundle-SymbolicName` specifies a unique, non-localizable name for the bundle. This name should be based on the
+ reverse domain name convention.
+* `Web-ContextPath` specifies the location of the web application.
+
+WAB can be deployed directly in Apache Karaf, for instance, by dropping the archive in the `deploy` folder, or using the
+`bundle:install` command.
+
+For instance, the Apache Karaf manual (documentation) is available as a WAB that you can deploy directly in a running instance:
+
+----
+karaf@root()> bundle:install -s mvn:org.apache.karaf/manual/4.0.0/war
+----
+
+===== WAR (WebApplication aRchive)
+
+Apache Karaf allows you to deploy directly WAR files without repackaging as WAB.
+
+Using the `webbundle` prefix and providing headers directly on the URL, Apache Karaf creates a WAB "on the fly".
+
+For instance, you can deploy the Apache Tomcat sample non-OSGi "classical" WAR with the following command:
+
+----
+karaf@root()> bundle:install -s "webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample"
+----
+
+You can note the `webbundle` prefix, and the `Bundle-SymbolicName` and `Web-ContextPath` headers on the URL.
+
+==== Commands
+
+===== `http:list`
+
+The `http:list` lists the available Servlets deployed in the WebContainer.
+
+For instance, if you have installed the Apache Karaf WebConsole, you can see the WebConsole Servlets:
+
+----
+karaf@root()> http:list
+ID | Servlet | Servlet-Name | State | Alias | Url
+-----------------------------------------------------------------------------------------------------
+113 | ResourceServlet | /res | Deployed | /system/console/res | [/system/console/res/*]
+113 | KarafOsgiManager | ServletModel-2 | Undeployed | /system/console | [/system/console/*]
+113 | KarafOsgiManager | ServletModel-5 | Deployed | /system/console | [/system/console/*]
+----
+
+The `ID` is the ID of the bundle which provides the servlet (`113` here).
+
+The `State` is the current state of the Servlet (`Deployed` or `Undeployed`).
+
+The `Url` is the URL where the Servlet is available.
+
+===== `web:list`
+
+The `web:list` command lists the WebApplication Bundles ("native" WAB or "wrapped WAR") deployed in the WebContainer.
+
+For instance, if you installed the Apache Karaf manual WAR file as described previously, you can see it with `web:list`:
+
+----
+karaf@root()> web:list
+ID | State | Web-State | Level | Web-ContextPath | Name
+---------------------------------------------------------------------------------------------------
+111 | Active | Deployed | 80 | /karaf-doc | Apache Karaf :: Manual (4.0.0)
+----
+
+===== `web:stop`
+
+The `web:stop` command stops a web application in the WebContainer. The `web:stop` command expects a `id` argument
+corresponding to the bundle ID (as displayed by the `web:list` command).
+
+For instance, to stop the Apache Karaf manual web application:
+
+----
+karaf@root()> web:stop 111
+----
+
+===== `web:start`
+
+The `web:start` command starts a web application in the WebContainer. The `web:start` command expects a `id` argument
+corresponding to the bundle ID (as displayed by the `web:list` command).
+
+For instance, to start the Apache Karaf manual web application:
+
+----
+karaf@root()> web:start 111
+----
+
+==== JMX HttpMBean
+
+On the JMX layer, you have a MBean dedicated to the manipulation of the Servlets: the HttpMBean.
+
+The ObjectName to use is `org.apache.karaf:type=http,name=*`.
+
+===== Attributes
+
+The `Servlets` attribute provides a tabular data providing the list of deployed Servlets including:
+
+* `Alias` is the Servlet URL alias.
+* `Bundle-ID` is the ID of the bundle which provides this Servlet.
+* `Servlet` is the class name of the Servlet.
+* `State` is the current Servlet state (`Deployed` or `Undeployed`).
+* `URL` is the URL of the Servlet (the Servlet context path).
+
+==== JMX WebMBean
+
+On the JMX layer, you have a MBean dedicated to the manipulation of the Web Applications: the WebMBean.
+
+The ObjectName to use is `org.apache.karaf:type=web,name=*`.
+
+===== Attributes
+
+The `WebBundles` attribute provides a tabular data providing the list of deployed Web Applications including:
+
+* `ID` is the ID of the bundle providing the Web Application.
+* `Level` is the bundle start level.
+* `Name` is the bundle symbolic name providing the Web Application.
+* `State` is the current state of the bundle.
+* `Web-ContextPath` is the context path of the Web Application.
+* `Web-State` is the current status of the Web Application (`Deployed` or `Undeployed`).
+
+===== Operations
+
+* `start(id)` starts the web context of the bundle with `id`.
+* `start(list)` starts the web context of the bundles with ID in the provided `list`.
+* `stop(id)` stops the web context of the bundle with `id`.
+* `stop(list)` stops the web context of the bundles with ID in the provided `list`.
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/wrapper.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/wrapper.adoc b/manual/src/main/asciidoc/user-guide/wrapper.adoc
new file mode 100644
index 0000000..9f52fb7
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/wrapper.adoc
@@ -0,0 +1,409 @@
+//
+// Licensed 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.
+//
+
+== Integration in the operating system: the Service Wrapper
+
+In the previous chapter, we saw the different scripts and commands to start, stop, restart Apache Karaf.
+
+Instead of using these commands and scripts, you can integrate Apache Karaf directly in your operating system service control.
+
+Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate Apache Karaf:
+
+* like a native Windows Service
+* like a Unix daemon process
+
+The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.
+
+It also includes advanced fault detection software which monitors an application.
+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.
+It guarantees the maximum possible uptime of Apache Karaf.
+
+=== Supported platforms
+
+* Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)
+* Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)
+* FreeBSD 9.x, 8.x
+* AIX 5.x, 6.x, 7.x (Power architecture)
+* Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)
+* HP-UX 10.x, 11.x (32 and 64 bits architecture)
+* SGI Irix
+* MacOS X
+
+=== Installation
+
+Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.
+
+In the console:
+
+----
+karaf@root()> feature:install service-wrapper
+----
+
+Now, you have the `wrapper:install` command, to "register" Apache Karaf as service/daemon on your system:
+
+----
+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 )
+----
+
+=== Installation
+
+Karaf Wrapper is an optional feature. To install it, simply type:
+
+----
+karaf@root> feature:install wrapper
+----
+
+Once installed, wrapper feature will provide `wrapper:install` new command in the Karaf shell:
+
+----
+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 )
+----
+
+The `wrapper:install` command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.
+
+For instance, on a Ubuntu/Debian Linux system:
+
+----
+karaf@root()> wrapper:install
+Creating file: /opt/apache-karaf-4.0.0/bin/karaf-wrapper
+Creating file: /opt/apache-karaf-4.0.0/bin/karaf-service
+Creating file: /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
+Creating missing directory: /opt/apache-karaf-4.0.0/lib/wrapper
+Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/libwrapper.so
+Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper.jar
+Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper-main.jar
+
+Setup complete. You may wish to tweak the JVM properties in the wrapper configuration file:
+ /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
+before installing and starting the service.
+
+
+Ubuntu/Debian Linux system detected:
+ To install the service:
+ $ ln -s /opt/apache-karaf-4.0.0/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
+
+----
+
+[NOTE]
+====
+You can install the wrapper without starting Karaf using bin/shell wrapper:install command.
+====
+
+You can note that `wrapper:install` command detected the running operating system ("Ubuntu/Debian Linux system detected").
+
+You have a complete explanation and list of system commands to perform to integrate Apache Karaf in your systemV:
+
+----
+ln -s /opt/apache-karaf-4.0.0/bin/karaf-service /etc/init.d/
+update-rc.d karaf-service defaults
+----
+
+Karaf also supports systemd service, so you can use systemctl instead of SystemV based service:
+
+----
+systemctl enable /opt/apache-karaf-4.0.2/bin/karaf.service
+----
+
+This will enable Karaf at system boot.
+
+=== Uninstall
+
+The `wrapper:install` provides the system commands to perform to uninstall the service/daemon).
+
+For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove the `karaf-service` script from the runlevel scripts:
+
+----
+rm /etc/init.d/karaf-service
+----
+
+If you preferred the systemd service instead of systemV:
+
+----
+systemctl disable karaf
+----
+
+You can remove the "Wrapper Service" installer after that:
+
+----
+karaf@root()> feature:uninstall service-wrapper
+----
+
+=== Note for MacOS users
+
+On MacOS you can install the service for an user or for the system.
+
+If you want to add `bin/org.apache.karaf.KARAF` as user service move this file into `~/Library/LaunchAgents/`:
+
+----
+mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
+----
+
+If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:
+
+----
+sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
+----
+
+Change owner and rights:
+
+----
+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
+----
+
+You can test your service:
+
+----
+launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
+launchctl start org.apache.karaf.KARAF
+launchctl stop org.apache.karaf.KARAF
+----
+
+Finally, after restart your session or system you can use launchctl command to start and stop your service.
+
+If you want to remove the service call:
+
+----
+launchctl remove org.apache.karaf.KARAF
+----
+
+=== Configuration
+
+When using scripts in the Apache Karaf `bin` folder, you can using `bin/setenv` Unix script (`bin\setenv.bat` on Windows) as described in the [Start, stop, restart, connect|start-stop] section of the documentation.
+
+[NOTE]
+====
+The `bin/setenv` Unix script (`bin\setenv.bat` on Windows) is not used by the Apache Karaf Service Wrapper.
+====
+
+To configure Apache Karaf started by the Service Wrapper, you have to tune the `etc/karaf-wrapper.conf` file. If you provided the `name` option to the `wrapper:install` command, the file is `etc/karaf-yourname.conf`.
+
+In this file, you can configure the different environment variables used by Apache Karaf. The Service Wrapper installer automatically populate these variables for you during the installation (using `wrapper:install` command).
+For instance:
+
+* `set.default.JAVA_HOME` is the `JAVA_HOME` used to start Apache Karaf (populated during Service Wrapper installation).
+* `set.default.KARAF_HOME` is the location of your Apache Karaf installation (populated during Service Wrapper installation).
+* `set.default.KARAF_BASE` is the location of your Apache Karaf installation (populated during Service Wrapper installation).
+* `set.default.KARAF_DATA` is the location of the Apache Karaf data folder (populated during Service Wrapper installation).
+* `set.default.KARAF_ETC` is the location of the Apache Karaf etc folder (populated during Service Wrapper installation).
+* `wrapper.java.additional` is used to pass additional arguments to the Java command, indexed by the argument number. The next index to use is 11.
+* `wrapper.java.initmemory` is the initial JVM memory size (the `-Xms`). It's not set by default (JVM default).
+* `wrapper.java.maxmemory` is the maximum JVM memory size (the `-Xmx`). It's set to 512M by default.
+* `wrapper.logfile` is the location of the Service Wrapper log file. It's set to `%KARAF_DATA%/log/wrapper.log` by default.
+* `wrapper.logfile.loglevel` is the Service Wrapper log level. It's set to `INFO` by default.
+* `wrapper.logfile.maxsize` is the Service Wrapper log file maximum size (before rotation). It's set to `10m` (10MB) by default.
+* `wrapper.logfile.maxfiles` is the number of Service Wrapper log files created (and rotated). It's set to `5` by default.
+* `wrapper.syslog.loglevel` is the integration with Unix syslog daemon. By default, it's set to `none` meaning disabled.
+* `wrapper.ntservice.name` is Windows service specific and defines the Windows service name. It's set to the `name` option of the `wrapper:install` command, or `karaf` by default.
+* `wrapper.ntservice.displayname` is Windows service specific and defines the Windows service display name. It's set to the `display` option of the `wrapper:install` command, or `karaf` by default.
+* `wrapper.ntservice.description` is Windows service specific and defines the Windows service description. It's set to the `description` option of the `wrapper:install` command, or empty by default.
+* `wrapper.ntservice.starttype` is Windows service specific and defines if the Windows service is started automatically with the service, or just on demand. It's set to `AUTO_START` by default, and could be switch to `DEMAND_START`.
+
+This is a example of generated `etc/karaf-wrapper.conf` file:
+
+----
+# ------------------------------------------------------------------------
+# 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=/opt/apache-karaf-4.0.0
+set.default.KARAF_BASE=/opt/apache-karaf-4.0.0
+set.default.KARAF_DATA=/opt/apache-karaf-4.0.0/data
+set.default.KARAF_ETC=/opt/apache-karaf-4.0.0/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
+----
[09/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/security.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/security.adoc b/manual/src/main/asciidoc/users-guide/security.adoc
deleted file mode 100644
index 072400e..0000000
--- a/manual/src/main/asciidoc/users-guide/security.adoc
+++ /dev/null
@@ -1,583 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Security
-
-Apache Karaf provides an advanced and flexible security system, powered by JAAS (Java Authentication and Authorization
-Service) in an OSGi compliant way.
-
-It provides a dynamic security system.
-
-The Apache Karaf security framework is used internally to control the access to:
-
-* the OSGi services (described in the developer guide)
-* the console commands
-* the JMX layer
-* the WebConsole
-
-Your applications can also use the security framework (see the developer guide for details).
-
-== Realms
-
-Apache Karaf is able to manage multiple realms. A realm contains the definition of the login modules to use for the
-authentication and/or authorization on this realm. The login modules define the authentication and authorization for
-the realm.
-
-The `jaas:realm-list` command list the current defined realms:
-
-----
-karaf@root()> jaas:realm-list
-Index | Realm Name | Login Module Class Name
------------------------------------------------------------------------------------
-1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
-----
-
-You can see that the Apache Karaf provides a default realm named `karaf`.
-
-This realm has two login modules:
-
-* the `PropertiesLoginModule` uses the `etc/users.properties` file as backend for users, groups, roles and password.
- This login module authenticates the users and returns the users' roles.
-* the `PublickeyLoginModule` is especially used by the SSHd. It uses the `etc/keys.properties` file. This file contains
- the users and a public key associated to each user.
-
-Apache Karaf provides additional login modules (see the developer guide for details):
-
-* JDBCLoginModule uses a database as backend
-* LDAPLoginModule uses a LDAP server as backend
-* SyncopeLoginModule uses Apache Syncope as backend
-* OsgiConfigLoginModule uses a configuration as backend
-
-You can manage an existing realm, login module, or create your own realm using the `jaas:realm-manage` command.
-
-== Users, groups, roles, and passwords
-
-As we saw, by default, Apache Karaf uses a PropertiesLoginModule.
-
-This login module uses the `etc/users.properties` file as storage for the users, groups, roles and passwords.
-
-The initial `etc/users.properties` file contains:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# This file contains the users, groups, and roles.
-# Each line has to be of the format:
-#
-# USER=PASSWORD,ROLE1,ROLE2,...
-# USER=PASSWORD,_g_:GROUP,...
-# _g_\:GROUP=ROLE1,ROLE2,...
-#
-# All users, grousp, and roles entered in this file are available after Karaf startup
-# and modifiable via the JAAS command group. These users reside in a JAAS domain
-# with the name "karaf".
-#
-karaf = karaf,_g_:admingroup
-_g_\:admingroup = group,admin,manager,viewer
-----
-
-We can see in this file, that we have one user by default: `karaf`.
-The default password is `karaf`.
-
-The `karaf` user is member of one group: the `admingroup`.
-
-A group is always prefixed by `_g_:`. An entry without this prefix is an user.
-
-A group defines a set of roles. By default, the `admingroup` defines `group`, `admin`, `manager`, and `viewer`
-roles.
-
-It means that the `karaf` user will have the roles defined by the `admingroup`.
-
-=== Commands
-
-The `jaas:*` commands manage the realms, users, groups, roles in the console.
-
-h4. `jaas:realm-list`
-
-We already used the `jaas:realm-list` previously in this section.
-
-The `jaas:realm-list` command list the realm and the login modules for each realm:
-
-----
-karaf@root()> jaas:realm-list
-Index | Realm Name | Login Module Class Name
------------------------------------------------------------------------------------
-1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
-----
-
-We have here one realm (`karaf`) containing two login modules (`PropertiesLoginModule` and `PublickeyLoginModule`).
-
-The `index` is used by the `jaas:realm-manage` command to easily identify the realm/login module that we want to manage.
-
-h4. `jaas:realm-manage`
-
-The `jaas:realm-manage` command switch in realm/login module edit mode, where you can manage the users, groups, and roles in the login module.
-
-To identify the realm and login module that you want to manage, you can use the `--index` option.
-The indexes are displayed by the `jaas:realm-list` command:
-
-----
-karaf@root()> jaas:realm-manage --index 1
-----
-
-Another way is to use the `--realm` and `--module` options. The `--realm` option expects the realm name, and the `--module`
-option expects the login module class name:
-
-----
-karaf@root()> jaas:realm-manage --realm karaf --module org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-----
-
-h4. `jaas:user-list`
-
-When you are in edit mode, you can list the users in the login module using the `jaas:user-list`:
-
-----
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-----
-
-You can see the user name and the group by role.
-
-h4. `jaas:user-add`
-
-The `jaas:user-add` command adds a new user (and the password) in the currently edited login module:
-
-----
-karaf@root()> jaas:user-add foo bar
-----
-
-To "commit" your change (here the user addition), you have to execute the `jaas:update` command:
-
-----
-karaf@root()> jaas:update
-karaf@root()> jaas:realm-manage --index 1
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-foo | |
-----
-
-On the other hand, if you want to rollback the user addition, you can use the `jaas:cancel` command.
-
-h4. `jaas:user-delete`
-
-The `jaas:user-delete` command deletes an user from the currently edited login module:
-
-----
-karaf@root()> jaas:user-delete foo
-----
-
-Like for the `jaas:user-add` command, you have to use the `jaas:update` to commit your change (or `jaas:cancel` to rollback):
-
-----
-karaf@root()> jaas:update
-karaf@root()> jaas:realm-manage --index 1
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-----
-
-h4. `jaas:group-add`
-
-The `jaas:group-add` command assigns a group (and eventually creates the group) to an user in the currently edited login module:
-
-----
-karaf@root()> jaas:group-add karaf mygroup
-----
-
-h4. `jaas:group-delete`
-
-The `jaas:group-delete` command removes an user from a group in the currently edited login module:
-
-----
-karaf@root()> jaas:group-delete karaf mygroup
-----
-
-h4. `jaas:group-role-add`
-
-The `jaas:group-role-add` command adds a role in a group in the currently edited login module:
-
-----
-karaf@root()> jaas:group-role-add mygroup myrole
-----
-
-h4. `jaas:group-role-delete`
-
-The `jaas:group-role-delete` command removes a role from a group in the currently edited login module:
-
-----
-karaf@root()> jaas:group-role-delete mygroup myrole
-----
-
-h4. `jaas:update`
-
-The `jaas:update` command commits your changes in the login module backend. For instance, in the case of the PropertiesLoginModule,
-the `etc/users.properties` will be updated only after the execution of the `jaas:update` command.
-
-h4. `jaas:cancel`
-
-The `jaas:cancel` command rollback your changes and doesn't update the login module backend.
-
-== Passwords encryption
-
-By default, the passwords are stored in clear form in the `etc/users.properties` file.
-
-It's possible to enable encryption in the `etc/org.apache.karaf.jaas.cfg` configuration file:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# Boolean enabling / disabling encrypted passwords
-#
-encryption.enabled = false
-
-#
-# Encryption Service name
-# the default one is 'basic'
-# a more powerful one named 'jasypt' is available
-# when installing the encryption feature
-#
-encryption.name =
-
-#
-# Encryption prefix
-#
-encryption.prefix = {CRYPT}
-
-#
-# Encryption suffix
-#
-encryption.suffix = {CRYPT}
-
-#
-# Set the encryption algorithm to use in Karaf JAAS login module
-# Supported encryption algorithms follow:
-# MD2
-# MD5
-# SHA-1
-# SHA-256
-# SHA-384
-# SHA-512
-#
-encryption.algorithm = MD5
-
-#
-# Encoding of the encrypted password.
-# Can be:
-# hexadecimal
-# base64
-#
-encryption.encoding = hexadecimal
-----
-
-If the `encryption.enabled` property is set to true, the password encryption is enabled.
-
-With encryption enabled, the password are encrypted at the first time an user logs in. The encrypted passwords are
-prefixed and suffixed with `\{CRYPT\`}. To re-encrypt the password, you can reset the password in clear (in `etc/users.properties`
-file), without the `\{CRYPT\`} prefix and suffix. Apache Karaf will detect that this password is in clear (because it's not
-prefixed and suffixed with `\{CRYPT\`}) and encrypt it again.
-
-The `etc/org.apache.karaf.jaas.cfg` configuration file allows you to define advanced encryption behaviours:
-
-* the `encryption.prefix` property defines the prefix to "flag" a password as encrypted. The default is `\{CRYPT\`}.
-* the `encryption.suffix` property defines the suffix to "flag" a password as encrypted. The default is `\{CRYPT\`}.
-* the `encryption.algorithm` property defines the algorithm to use for encryption (digest). The possible values are `MD2`, `MD5`,
-`SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`. The default is `MD5`.
-* the `encryption.encoding` property defines the encoding of the encrypted password. The possible values are `hexadecimal`
- or `base64`. The default value is `hexadecimal`.
-
-== Managing authentication by key
-
-For the SSH layer, Karaf supports the authentication by key, allowing to login without providing the password.
-
-The SSH client (so bin/client provided by Karaf itself, or any ssh client like OpenSSH) uses a public/private keys pair that
-will identify himself on Karaf SSHD (server side).
-
-The keys allowed to connect are stored in `etc/keys.properties` file, following the format:
-
-----
-user=key,role
-----
-
-By default, Karaf allows a key for the karaf user:
-
-----
-# karaf=AAAAB3NzaC1kc3MAAACBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAAAAFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QAAAIEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoAAACBAKKSU2PFl/qOLxIwmBZPPIcJshVe7bVUpFvyl3BbJDow8rXfskl8wO63OzP/qLmcJM0+JbcRU/53JjTuyk31drV2qxhIOsLDC9dGCWj47Y7TyhPdXh/0dthTRBy6bqGtRPxGa7gJov1xm/UuYYXPIUR/3x9MAZvZ5xvE0kYXO+rx,admin
-----
-
-{warning}
-For security reason, this key is disabled. We encourage to create the keys pair per client and update the `etc/keys.properties` file.
-{warning}
-
-The easiest way to create key pair is to use OpenSSH.
-
-You can create a key pair using:
-
-----
-ssh-keygen -t dsa -f karaf.id_dsa -N karaf
-----
-
-You have now the public and private keys:
-
-----
--rw------- 1 jbonofre jbonofre 771 Jul 25 22:05 karaf.id_dsa
--rw-r--r-- 1 jbonofre jbonofre 607 Jul 25 22:05 karaf.id_dsa.pub
-----
-
-You can copy in the content of the `karaf.id_dsa.pub` file in the `etc/keys.properties`:
-
-----
-karaf=AAAAB3NzaC1kc3MAAACBAJLj9vnEhu3/Q9Cvym2jRDaNWkATgQiHZxmErCmiLRuD5Klfv+HT/+8WoYdnvj0YaXFP80phYhzZ7fbIO2LRFhYhPmGLa9nSeOsQlFuX5A9kY1120yB2kxSIZI0fU2hy1UCgmTxdTQPSYtdWBJyvO/vczoX/8I3FziEfss07Hj1NAAAAFQD1dKEzkt4e7rBPDokPOMZigBh4kwAAAIEAiLnpbGNbKm8SNLUEc/fJFswg4G4VjjngjbPZAjhkYe4+H2uYmynry6V+GOTS2kaFQGZRf9XhSpSwfdxKtx7vCCaoH9bZ6S5Pe0voWmeBhJXi/Sww8f2stpitW2Oq7V7lDdDG81+N/D7/rKDD5PjUyMsVqc1n9wCTmfqmi6XPEw8AAACAHAGwPn/Mv7P9Q9+JZRWtGq+i4pL1zs1OluiStCN9e/Ok96t3gRVKPheQ6IwLacNjC9KkSKrLtsVyepGA+V5j/N+Cmsl6csZilnLvMUTvL/cmHDEEhTIQnPNrDDv+tED2BFqkajQqYLgMWeGVqXsBU6IT66itZlYtrq4v6uDQG/o=,admin
-----
-
-and specify to the client to use the `karaf.id_dsa` private key:
-
-----
-bin/client -k ~/karaf.id_dsa
-----
-
-or to ssh
-
-----
-ssh -p 8101 -i ~/karaf.id_dsa karaf@localhost
-----
-
-== RBAC
-
-Apache Karaf uses the roles to control the access to the resources: it's a RBAC (Role Based Access Control) system.
-
-The roles are used to control:
-
-* access to OSGi services
-* access to the console (control the execution of the commands)
-* access to JMX (MBeans and/or operations)
-* access to the WebConsole
-
-=== OSGi services
-
-The details about OSGi services RBAC support is explained in the developer guide.
-
-=== Console
-
-Console RBAC supports is a specialization of the OSGi service RBAC. Actually, in Apache Karaf, all console commands are
-defined as OSGi services.
-
-The console command name follows the `scope:name` format.
-
-The ACL (Access Lists) are defined in `etc/org.apache.karaf.command.acl.<scope>.cfg` configuration files, where `<scope>`
-is the commands scope.
-
-For instance, we can define the ACL to the `feature:*` commands by creating a `etc/org.apache.karaf.command.acl.feature.cfg`
-configuration file. In this `etc/org.apache.karaf.command.acl.feature.cfg` configuration file, we can set:
-
-----
-list = viewer
-info = viewer
-install = admin
-uninstall = admin
-----
-
-Here, we define that `feature:list` and `feature:info` commands can be executed by users with `viewer` role, whereas
-the `feature:install` and `feature:uninstall` commands can only be executed by users with `admin` role.
-Note that users in the admin group will also have viewer role, so will be able to do everything.
-
-Apache Karaf command ACLs can control access using (inside a given command scope):
-
-* the command name regex (e.g. `name = role`)
-* the command name and options or arguments values regex (e.g. `name[/.*[0-9][0-9][0-9]+.*/] = role` to execute name only with argument value above 100)
-
-Both command name and options/arguments support exact matching or regex matching.
-
-By default, Apache Karaf defines the following commands ACLs:
-
-* `etc/org.apache.karaf.command.acl.bundle.cfg` configuration file defines the ACL for `bundle:*` commands.
- This ACL limits the execution of `bundle:*` commands for system bundles only to the users with `admin` role, whereas
- `bundle:*` commands for non-system bundles can be executed by the users with `manager` role.
-* `etc/org.apache.karaf.command.acl.config.cfg` configuration file defines the ACL for `config:*` commands.
- This ACL limits the execution of `config:*` commands with `jmx.acl.*`, `org.apache.karaf.command.acl.*`, and
- `org.apache.karaf.service.acl.*` configuration PID to the users with `admin` role. For the other configuration PID,
- the users with the `manager` role can execute `config:*` commands.
-* `etc/org.apache.karaf.command.acl.feature.cfg` configuration file defines the ACL for `feature:*` commands.
- Only the users with `admin` role can execute `feature:install` and `feature:uninstall` commands. The other `feature:*`
- commands can be executed by any user.
-* `etc/org.apache.karaf.command.acl.jaas.cfg` configuration file defines the ACL for `jaas:*` commands.
- Only the users with `admin` role can execute `jaas:update` command. The other `jaas:*` commands can be executed by any
- user.
-* `etc/org.apache.karaf.command.acl.kar.cfg` configuration file defines the ACL for `kar:*` commands.
- Only the users with `admin` role can execute `kar:install` and `kar:uninstall` commands. The other `kar:*` commands
- can be executed by any user.
-* `etc/org.apache.karaf.command.acl.shell.cfg` configuration file defines the ACL for `shell:*` and "direct" commands.
- Only the users with `admin` role can execute `shell:edit`, `shell:exec`, `shell:new`, and `shell:java` commands.
- The other `shell:*` commands can be executed by any user.
-
-You can change these default ACLs, and add your own ACLs for additional command scopes (for instance `etc/org.apache.karaf.command.acl.cluster.cfg` for
-Apache Karaf Cellar, `etc/org.apache.karaf.command.acl.camel.cfg` from Apache Camel, ...).
-
-You can fine tuned the command RBAC support by editing the `karaf.secured.services` property in `etc/system.properties`:
-
-----
-#
-# By default, only Karaf shell commands are secured, but additional services can be
-# secured by expanding this filter
-#
-karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
-----
-
-=== JMX
-
-Like for the console commands, you can define ACL (AccessLists) to the JMX layer.
-
-The JMX ACL are defined in `etc/jmx.acl<ObjectName>.cfg` configuration file, where `<ObjectName>` is a MBean object name
-(for instance `org.apache.karaf.bundle` represents `org.apache.karaf;type=Bundle` MBean).
-
-The `etc/jmx.acl.cfg` is the most generic configuration file and is used when no specific ones are found.
-It contains the "global" ACL definition.
-
-JMX ACLs can control access using (inside a JMX MBean):
-
-* the operation name regex (e.g. `operation* = role`)
-* the operation arguments value regex (e.g. `operation(java.lang.String, int)[/([1-4])?[0-9]/,/.*/] = role`)
-
-By default, Apache Karaf defines the following JMX ACLs:
-
-* `etc/jmx.acl.org.apache.karaf.bundle.cfg` configuration file defines the ACL for the `org.apache.karaf:type=bundle`
- MBean. This ACL limits the `setStartLevel()`, `start()`, `stop()`, and `update()` operations for system bundles for
- only users with `admin` role. The other operations can be performed by users with the `manager` role.
-* `etc/jmx.acl.org.apache.karaf.config.cfg` configuration file defines the ACL for the `org.apache.karaf:type=config`
- MBean. This ACL limits the change on `jmx.acl*`, `org.apache.karaf.command.acl*`, and `org.apache.karaf.service.acl*`
- configuration PIDs for only users with `admin` role. The other operations can be performed by users with the `manager` role.
-* `etc/jmx.acl.org.apache.karaf.security.jmx.cfg` configuration file defines the ACL for the `org.apache.karaf:type=security,area=jmx`
- MBean. This ACL limits the invocation of the `canInvoke()` operation for the users with `viewer` role.
-* `etc/jmx.acl.osgi.compendium.cm.cfg` configuration file defines the ACL for the `osgi.compendium:type=cm` MBean.
- This ACL limits the changes on `jmx.acl*`, `org.apache.karaf.command.acl*`, and `org.apache.karaf.service.acl*`
- configuration PIDs for only users with `admin` role. The other operations can be performed by users with the `manager` role.
-* `etc/jmx.acl.java.lang.Memory.cfg` configuration file defines the ACL for the core JVM Memory MBean.
- This ACL limits the invocation of the `gc` operation for only users with the `manager` role.
-* `etc/jmx.acl.cfg` configuration file is the most generic file. The ACLs defined here are used when no other specific
- ACLs match (by specific ACL, it's an ACL defined in another MBean specific `etc/jmx.acl.*.cfg` configuration file).
- The `list*()`, `get*()`, `is*()` operations can be performed by users with the `viewer` role.
- The `set*()` and all other `*()` operations can be performed by users with the `admin` role.
-
-=== WebConsole
-
-The Apache Karaf WebConsole is not available by default. To enable it, you have to install the `webconsole` feature:
-
-----
-karaf@root()> feature:install webconsole
-----
-
-The WebConsole doesn't support fine grained RBAC like console or JMX for now.
-
-All users with the `admin` role can logon the WebConsole and perform any operations.
-
-== SecurityMBean
-
-Apache Karaf provides a JMX MBean to check if the current user can invoke a given MBean and/or operation.
-
-The `canInvoke()` operation gets the roles of the current user, and check if one the roles can invoke the MBean and/or the
-operation, eventually with a given argument value.
-
-=== Operations
-
-* `canInvoke(objectName)` returns `true` if the current user can invoke the MBean with the `objectName`, `false` else.
-* `canInvoke(objectName, methodName)` returns `true` if the current user can invoke the operation `methodName` on the MBean
- with the `objectName`, `false` else.
-* `canInvoke(objectName, methodName, argumentTypes)` returns `true` if the current user can invoke the operation `methodName`
-with the array of arguments types `argumentTypes` on the MBean with `objectName`, `false` else.
-* `canInvoke(bulkQuery)` returns a tabular data containing for each operation in the `bulkQuery` tabular data if `canInvoke`
-is `true` or `false`.
-
-== Security providers
-
-Some applications require specific security providers to be available, such as [BouncyCastle|http://www.bouncycastle.org].
-
-The JVM imposes some restrictions about the use of such jars: they have to be signed and be available on the boot classpath.
-
-One way to deploy those providers is to put them in the JRE folder at `$JAVA_HOME/jre/lib/ext` and modify the security
-policy configuration (`$JAVA_HOME/jre/lib/security/java.security`) in order to register such providers.
-
-While this approach works fine, it has a global effect and requires you to configure all your servers accordingly.
-
-Apache Karaf offers a simple way to configure additional security providers:
-* put your provider jar in `lib/ext`
-* modify the `etc/config.properties` configuration file to add the following property
-
-----
-org.apache.karaf.security.providers = xxx,yyy
-----
-
-The value of this property is a comma separated list of the provider class names to register.
-
-For instance, to add the bouncycastle security provider, you define:
-
-----
-org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
-----
-
-In addition, you may want to provide access to the classes from those providers from the system bundle so that all bundles
-can access those.
-
-It can be done by modifying the `org.osgi.framework.bootdelegation` property in the same configuration file:
-
-----
-org.osgi.framework.bootdelegation = ...,org.bouncycastle*
-----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/start-stop.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/start-stop.adoc b/manual/src/main/asciidoc/users-guide/start-stop.adoc
deleted file mode 100644
index bd5dc0c..0000000
--- a/manual/src/main/asciidoc/users-guide/start-stop.adoc
+++ /dev/null
@@ -1,433 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Start, stop, restart, connect
-
-== Start
-
-Apache Karaf supports different start mode:
-
-* the "regular" mode starts Apache Karaf in foreground, including the shell console.
-* the "server" mode starts Apache Karaf in foreground, without the shell console.
-* the "background" mode starts Apache Karaf in background.
-
-You can also manage Apache Karaf as a system service (see [System Service|wrapper] section of this manual).
-
-=== Regular mode
-
-The regular mode uses the `bin/karaf` Unix script (`bin\karaf.bat` on Windows). It's the default start process.
-
-It starts Apache Karaf as a foreground process, and displays the shell console.
-
-On Unix:
-
-----
-bin/karaf
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
-
-karaf@root()>
-----
-
-On Windows:
-
-----
-bin\karaf.bat
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
-
-karaf@root()>
-----
-
-{warning:title=Warning}
-Closing the console or shell window will cause Apache Karaf to terminate.
-{warning}
-
-=== Server mode
-
-The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.
-
-To use this mode, you use the `server` argument to the `bin/karaf` Unix script (`bin\karaf.bat` on Windows).
-
-On Unix:
-
-----
-bin/karaf server
-
-----
-
-On Windows:
-
-----
-bin\karaf.bat server
-
-----
-
-{warning:title=Warning}
-Closing the console or shell window will cause Apache Karaf to terminate.
-{warning}
-
-You can connect to the shell console using SSH or client (see the Connect section in this page).
-
-=== Background mode
-
-The background mode starts Apache Karaf as a background process.
-
-To start in background mode, you have to use `bin/start` Unix script (`bin\start.bat` on Windows).
-
-On Unix:
-
-----
-bin/start
-----
-
-On Windows:
-
-----
-bin\start.bat
-----
-
-You can connect to the shell console using SSH or client (see the Connect section in this page).
-
-=== Clean start
-
-Apache Karaf stores all previously applications installed and changes that you did in the data folder.
-
-If you want to start from a clean state, you can remove the data folder.
-
-For convenience, you can use the `clean` argument to the `bin/karaf` Unix script (`bin\karaf.bat` on Windows).
-
-On Unix:
-
-----
-bin/karaf clean
-----
-
-----
-bin/start clean
-----
-
-On Windows:
-
-----
-bin\karaf.bat clean
-----
-
-----
-bin\start.bat clean
-----
-
-=== Customize variables
-
-Apache Karaf accepts environment variables:
-
-* `JAVA_MIN_MEM`: minimum memory for the JVM (default is 128M).
-* `JAVA_MAX_MEM`: maximum memory for the JVM (default is 512M).
-* `JAVA_PERM_MEM`: minimum perm memory for the JVM (default is JVM default value).
-* `JAVA_MAX_PERM_MEM`: maximum perm memory for the JVM (default is JVM default value).
-* `KARAF_HOME`: the location of your Apache Karaf installation (default is found depending where you launch the startup script).
-* `KARAF_BASE`: the location of your Apache Karaf base (default is `KARAF_HOME`).
-* `KARAF_DATA`: the location of your Apache Karaf data folder (default is `KARAF_BASE/data`).
-* `KARAF_ETC`: the location of your Apache Karaf etc folder (default is `KARAF_BASE/etc`).
-* `KARAF_OPTS`: extra arguments passed to the Java command line (default is null).
-* `KARAF_DEBUG`: 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.
-
-You can define these environment variables in `bin/setenv` Unix script (`bin\setenv.bat` on Windows).
-
-For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:
-
-On Unix:
-
-----
-# Content of bin/setenv
-export JAVA_MIN_MEM=256M
-export JAVA_MAX_MEM=1024M
-----
-
-On Windows:
-
-----
-rem Content of bin\setenv.bat
-set JAVA_MIN_MEM=256M
-set JAVA_MAX_MEM=1024M
-----
-
-=== Connect
-
-Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.
-This connection can be local or remote. It means that you can access to Karaf console remotely.
-
-To connect to the console, you can use the `bin/client` Unix script (`bin\client.bat` on Windows).
-
-On Unix:
-
-----
-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:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-On Windows:
-
-----
-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:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0-SNAPSHOT)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-By default, `client` tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).
-
-`client` accepts different options to let you connect on a remote Apache Karaf instance. You can use `--help` to get details about the options:
-
-On Unix:
-
-----
-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
-----
-
-On Windows:
-
-----
-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
-----
-
-Actually, `client` is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.
-
-For instance, on Unix, you can do:
-
-----
-ssh karaf@localhost -p 8101
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0-SNAPSHOT)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-== Stop
-
-When you start Apache Karaf in regular mode, the `logout` command or CTRL-D key binding logout from the console and shutdown Apache Karaf.
-
-When you start Apache Karaf in background mode (with the `bin/start` Unix script (`bin\start.bat` on Windows)), you can use the `bin/stop` Unix script (`bin\stop.bat` on Windows).
-
-More generally, you can use the `shutdown` command (on the Apache Karaf console) that work in any case.
-
-The `shutdown` command is very similar to the the `shutdown` Unix command.
-
-To shutdown Apache Karaf now, you can simple using `shutdown`:
-
-----
-karaf@root()> shutdown -h
-Confirm: halt instance root (yes/no):
-----
-
-The `shutdown` command asks for a confirmation. If you want to bypass the confirmation step, you can use the `-f` (`--force`) option:
-
-----
-karaf@root()> shutdown -f
-----
-
-You can also use directly `halt` which is an alias to `shutdown -f -h`.
-
-The `shutdown` command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.
-
-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
-(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 `now` is an alias for 0.
-
-For instance, the following command will shutdown Apache Karaf at 10:35am:
-
-----
-karaf@root()> system:shutdown 10:35
-----
-
-Another example to shutdown Apache Karaf in 10 minutes:
-
-----
-karaf@root()> system:shutdown 10
-----
-
-Like for other commands, you can find details on the `shutdown` command man page:
-
-----
-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.
-----
-
-== Status
-
-When you start Apache Karaf in background mode, you may want to check the current status.
-
-To do so, you can use the `bin/status` Unix script (`bin\status.bat` on Windows).
-
-NB: the script returns 0 exit code if Apache Karaf is running, 1 exit code else.
-
-On Unix:
-
-----
-bin/status
-Not Running ...
-----
-
-----
-bin/status
-Running ...
-----
-
-On Windows:
-
-----
-bin\status.bat
-Not Running ...
-----
-
-----
-bin\status.bat
-Running ...
-----
-
-== Restart
-
-The `shutdown` command accepts the `-r` (`--restart`) option to restart Apache Karaf:
-
-----
-karaf@root()> system:shutdown -r
-----
-
-{warning:title=Warning}
-This command does not start a new JVM. It simply restarts the OSGi framework.
-{warning}
-
-== SystemMBean
-
-Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.
-
-The SystemMBean object name is `org.apache.karaf:type=system`.
-
-The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:
-
-* `reboot()` reboots Apache Karaf now (without cleaning the cache)
-* `reboot(time)` reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the `shutdown` command.
-* `rebootCleanCache(time)` reboots Apache Karaf at a given time, including the cleanup of the cache.
-* `rebootCleanAll(time)` reboots Apache Karaf at a given time, including the cleanup of the whole data folder.
-* `halt()` shutdown Apache Karaf now.
-* `halt(time)` shutdown Apache Karaf at a given time. The time format is the same as the time argument of the `shutdown` command.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/tuning.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/tuning.adoc b/manual/src/main/asciidoc/users-guide/tuning.adoc
deleted file mode 100644
index ea71304..0000000
--- a/manual/src/main/asciidoc/users-guide/tuning.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Tuning
-
-== Garbage Collection
-
-Like any Java applications, Apache Karaf uses a JVM. An important feature of the JVM is the Garbage Collector.
-
-Apache Karaf default configuration is sized for small to medium needs and to work on most machine.
-
-That's why this default configuration may appear like "small".
-
-By default, Apache Karaf uses:
-
-* `-Xms128M`
-* `-Xmx512M`
-* `-XX:+UnlockDiagnosticVMOptions`
-* `-XX:+UnsyncloadClass`
-
-On Sun/Oracle JVM:
-* the Perm size is the JVM default
-
-On IBM JVM and AIX system:
-* `-Xverify:none`
-* `-Xdump:heap`
-* `-Xlp`
-
-For any container, it's always difficult to predict the usage of the resources and the behaviour of the artifacts deployed.
-
-Generally speaking, a good approach for tuning is to enable `-verbose:gc` and use tools like VisualVM to identify the potentials
-memory leaks, and see the possible optimisation of the spaces and GC.
-
-You can find introduction about GC here: [http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html].
-
-=== Java 6
-
-If you have enough resources available on the machine, a good configuration may be:
-
-* `-server`
-* `-Xmx1024M`
-* `-XX:MaxPermSize=640M`
-* `-XX:+UseConcMarkSweepGC`
-* `-XX:+UseParNewGC`
-* `-XX:+CMSClassUnloadingEnabled`
-
-It will give more resources to Apache Karaf, and avoid some perm space saturation if you do a lot of bundles refresh.
-
-See [http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html] for details about Java 6 tuning.
-
-=== Java 7
-
-Java 7 introduces a new GC algorithm: the GC1.
-
-Depending of the use cases (and usage of the heap), the new GC1 algorithm can give good performance improvements:
-
-* `-XX:+UseG1GC`
-* `-XX:-UseAdaptiveSizePolicy`
-
-See [http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html] for details about Java 7 GC1 tuning.
-
-You can find a good article about Java 7 tuning here: [http://java-is-the-new-c.blogspot.de/2013/07/tuning-and-benchmarking-java-7s-garbage.html].
-
-== Threads
-
-In high loaded system, the number of threads can be very large.
-
-=== WebContainer
-
-If you use the Apache Karaf WebContainer, the Jetty connectors create threads to handle the incoming HTTP requests.
-
-The `etc/jetty.xml` configuration file allows you to tune the Jetty connector.
-
-For instance, the following connector configuration:
-
-----
- <Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
- <Property name="jetty.host" />
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="8181" />
- </Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
- </New>
- </Arg>
- </Call>
-----
-
-defines the following properties:
-
-* `maxIdleTime` is the maximum inactivity time for a connection.
-* `lowResourcesConnections` defines the number of connections. If the current number of connections is greater than
- this value, the status is "low on resources". In that case, a new connection timeout is applied: the `lowResourceMaxIdleTime`.
-* `Acceptors` defines the number of threads for incoming connections.
-
-=== Apache Camel
-
-For instance, if you use Apache Camel inside Apache Karaf, Camel components can create a lot of threads.
-
-Apache Camel use the notion of `threadPoolProfile` to control the threads creation.
-
-For instance, the following Camel configuration defines a pool creation strategy:
-
-----
-<threadPoolProfile id="defaultThreadPoolProfile" defaultProfile="true"
- poolSize="10" maxPoolSize="20" maxQueueSize="1000"
- rejectedPolicy="CallerRuns"/>
-----
-
-See the [Apache Camel website|http://camel.apache.org] for details.
-
-=== Apache CXF
-
-Apache CXF uses workqueues to handle server request/response.
-
-You may see a `etc/org.apache.cxf.workqueues-default.cfg` configuration file. It's the default configuration applied
-to all workqueues (a workqueue can be associated to a specific endpoint).
-
-On a workqueue, you can define the following properties about the threads:
-
-* `org.apache.cxf.workqueue.default.highWaterMark` defines the maximum number of threads.
-* `org.apache.cxf.workqueue.default.lowWaterMark` defines the minimum number of threads.
-* `org.apache.cxf.workqueue.default.initialSize` defines the initial number of threads.
-
-See the [Apache CXF website|http://cxf.apache.org] for details.
-
-== System packages
-
-The `etc/jre.properties` defines the packages directly provided by the JVM.
-
-Most of the time, the default configuration in Apache Karaf is fine and works in most of the use cases.
-
-However, some times, you may want to not use the packages provided by the JVM, but the same packages provided by a bundle.
-
-For instance, the JAXB version provided by the JVM is "old", and you want to use new JAXB bundles.
-
-In that case, you have to comment the packages in `etc/jre.properties` to avoid to be provided by the JVM and use the
-ones from the bundles.
-
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/update.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/update.adoc b/manual/src/main/asciidoc/users-guide/update.adoc
deleted file mode 100644
index 2b0217b..0000000
--- a/manual/src/main/asciidoc/users-guide/update.adoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Update procedure
-
-== From Karaf 3.0.x to Karaf 3.0.x
-
-== From Karaf 2.2.x to Karaf 3.0.x
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/urls.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/urls.adoc b/manual/src/main/asciidoc/users-guide/urls.adoc
deleted file mode 100644
index 481cb49..0000000
--- a/manual/src/main/asciidoc/users-guide/urls.adoc
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Artifacts repositories and URLs
-
-// TODO temp
-The main information provided by a feature is the set of OSGi bundles that defines the application. Such bundles are URLs pointing to the actual bundle jars. For example, one would write the following definition:
-{code:lang=xml}
-<bundle>http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
-----
-Doing this will make sure the above bundle is installed while installing the feature.
-
-However, Karaf provides several URL handlers, in addition to the usual ones (file, http, etc...). One of these is the Maven URL handler, which allow reusing maven repositories to point to the bundles.
-
-You can deploy bundles from file system without using Maven
-
-As we can use file: as protocol handler to deploy bundles, you can use the following syntax to deploy bundles when they are
-located in a directory which is not available using Maven
-
-{code:lang=xml}
-<bundle>file:base/bundles/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
-----
-
-Note: The path is relative to the Apache Karaf installation directory
-
-h4. Maven URL Handler
-
-The equivalent of the above bundle would be:
-{code:lang=xml}
-<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
-----
-
-In addition to being less verbose, the Maven url handlers can also resolve snapshots and can use a local copy of the jar if one is available in your Maven local repository.
-
-The `org.ops4j.pax.url.mvn` bundle resolves `mvn` URLs. It can be configured using the file `etc/org.ops4j.pax.url.cfg`
-
-The most important property is :
-
-* `org.ops4j.pax.url.mvn.repositories` : Comma separated list of repository remote repository URLs that are checked in order of occurence when resolving maven artifacts
-
-By default, snapshots are disabled. To enable an URL for snapshots append @snapshots to a repository entry. For example
-
-----
-http://www.example.org/repo@snapshots
-----
-
-Repositories on the local machine are supported through `file:/` URLs.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/webconsole.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/webconsole.adoc b/manual/src/main/asciidoc/users-guide/webconsole.adoc
deleted file mode 100644
index bc35816..0000000
--- a/manual/src/main/asciidoc/users-guide/webconsole.adoc
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// Licensed 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.
-//
-
-= WebConsole
-
-Apache Karaf provides an optional WebConsole.
-
-This WebConsole provides a graphical web GUI to see and manage your Apache Karaf container.
-
-You can use the WebConsole to:
-
-* manage Apache Karaf features
-* manage OSGi bundles
-* manage the instances
-* manage the confgurations
-* manage the log service
-
-The WebConsole is extensible via a plugins system. Some applications can add new pages to the WebConsole.
-For instance, Apache Karaf Cellar provides additional pages to administrate cluster groups, nodes, etc.
-
-== Installation
-
-To enable the Apache Karaf WebConsole, you just have to install the `webconsole` feature:
-
-----
-karaf@root()> feature:install webconsole
-----
-
-The `webconsole` feature automatically installs the `http` feature (see the [WebContainer section|webcontainer] for details).
-
-== Access
-
-The Apache Karaf WebConsole uses the WebContainer port number (see the [WebContainer section|webcontainer] for details)
-with the `/system/console` context.
-
-By default, the Apache Karaf WebContainer port number is `8181`.
-
-It means that the Apache Karaf WebConsole is accessible on the following URL:
-
-[http://localhost:8181/system/console]
-
-As the Apache Karaf WebConsole uses the security framework, an username and password will be prompted.
-
-You have to enter an username/password from the `karaf` realm. By default, you can use `karaf`/`karaf`.
-
-See the [Security section|security] for details.
-
-{warning}
-Only users with the `admin` role are allowed to logon on the Apache Karaf WebConsole.
-Right now, the WebConsole doesn't use RBAC system as we have for console commands, or MBeans.
-{warning}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/webcontainer.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/webcontainer.adoc b/manual/src/main/asciidoc/users-guide/webcontainer.adoc
deleted file mode 100644
index 8a2dbc7..0000000
--- a/manual/src/main/asciidoc/users-guide/webcontainer.adoc
+++ /dev/null
@@ -1,289 +0,0 @@
-//
-// Licensed 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.
-//
-
-= WebContainer (JSP/Servlet)
-
-Apache Karaf can act a complete WebContainer, fully supporting JSP/Servlet specification.
-
-Apache Karaf WebContainer supports both:
-
-* WAB (WebApplication Bundles) which are OSGi native web applications
-* WAR (WebApplication aRchives) which are non-OSGi web applications (the same as you can deploy in any web container like Apache Tomcat)
-
-To enable the Apache Karaf WebContainer, you just have to install the `war` feature:
-
-----
-karaf@root()> feature:install war
-----
-
-NB: the installation of the `webconsole` feature automatically installs the `war` feature.
-
-The `war` feature provides:
-
-* an embedded web container (powered by Jetty), with its configuration
-* a set of console commands
-* a new war deployer
-
-== Configuration
-
-The default port used by the WebContainer is 8181.
-
-The WebContainer configuration is in the `etc/jetty.xml` configuration file.
-
-The `etc/jetty.xml` is a standard Eclipse Jetty configuration file.
-
-The default Apache Karaf WebContainer `etc/jetty.xml` contains:
-
-{code:lang=xml}
-<?xml version="1.0"?>
-<!--
- 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.
--->
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
-DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
-
-<Configure class="org.eclipse.jetty.server.Server">
-
- <!-- =========================================================== -->
- <!-- Set connectors -->
- <!-- =========================================================== -->
- <!-- One of each type! -->
- <!-- =========================================================== -->
-
- <!-- Use this connector for many frequently idle connections and for
- threadless continuations. -->
- <Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
- <Property name="jetty.host" />
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="8181" />
- </Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- =========================================================== -->
- <!-- Configure Authentication Realms -->
- <!-- Realms may be configured for the entire server here, or -->
- <!-- they can be configured for a specific web app in a context -->
- <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
- <!-- example). -->
- <!-- =========================================================== -->
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
- <Set name="name">karaf</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
- <Set name="name">default</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
-
-</Configure>
-----
-
-The `SelectChannelConnector` defines the default connector of the WebContainer.
-
-This connector defines the 8181 port number for the HTTP protocol (`port` property), and the 8443 port number for the
-HTTPS protocol (`confidentialPort` property).
-
-By default, Apache Karaf bind these ports on all network interfaces (`0.0.0.0`). You can config the `host` property
-to bind on a specific network interface (with a given IP address).
-
-The following resources give you details about advanced `etc/jetty.xml` configurations:
-
-* [Standard configuration|http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty]
-* [Enable SSL|http://wiki.eclipse.org/Jetty/Howto/Configure_SSL]
-* [Reference|http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax]
-
-== Deploy
-
-Apache Karaf WebContainer is able to deploy:
-
-* pure OSGi WebApplication Bundle (WAB)
-* "classical" standard WebApplication aRchive (WAR)
-
-=== WAB (WebApplication Bundle)
-
-A WAB is a standard WAR or JAR archive containing at least the following properties in the MANIFEST:
-
-* `Bundle-ManifestVersion: 2` defines that the bundle follows the rules of R4 specification.
-* `Bundle-SymbolicName` specifies a unique, non-localizable name for the bundle. This name should be based on the
- reverse domain name convention.
-* `Web-ContextPath` specifies the location of the web application.
-
-WAB can be deployed directly in Apache Karaf, for instance, by dropping the archive in the `deploy` folder, or using the
-`bundle:install` command.
-
-For instance, the Apache Karaf manual (documentation) is available as a WAB that you can deploy directly in a running instance:
-
-----
-karaf@root()> bundle:install -s mvn:org.apache.karaf/manual/3.0.0/war
-----
-
-=== WAR (WebApplication aRchive)
-
-Apache Karaf allows you to deploy directly WAR files without repackaging as WAB.
-
-Using the `webbundle` prefix and providing headers directly on the URL, Apache Karaf creates a WAB "on the fly".
-
-For instance, you can deploy the Apache Tomcat sample non-OSGi "classical" WAR with the following command:
-
-----
-karaf@root()> bundle:install -s "webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample"
-----
-
-You can note the `webbundle` prefix, and the `Bundle-SymbolicName` and `Web-ContextPath` headers on the URL.
-
-== Commands
-
-=== `http:list`
-
-The `http:list` lists the available Servlets deployed in the WebContainer.
-
-For instance, if you have installed the Apache Karaf WebConsole, you can see the WebConsole Servlets:
-
-----
-karaf@root()> http:list
-ID | Servlet | Servlet-Name | State | Alias | Url
------------------------------------------------------------------------------------------------------
-113 | ResourceServlet | /res | Deployed | /system/console/res | [/system/console/res/*]
-113 | KarafOsgiManager | ServletModel-2 | Undeployed | /system/console | [/system/console/*]
-113 | KarafOsgiManager | ServletModel-5 | Deployed | /system/console | [/system/console/*]
-----
-
-The `ID` is the ID of the bundle which provides the servlet (`113` here).
-
-The `State` is the current state of the Servlet (`Deployed` or `Undeployed`).
-
-The `Url` is the URL where the Servlet is available.
-
-=== `web:list`
-
-The `web:list` command lists the WebApplication Bundles ("native" WAB or "wrapped WAR") deployed in the WebContainer.
-
-For instance, if you installed the Apache Karaf manual WAR file as described previously, you can see it with `web:list`:
-
-----
-karaf@root()> web:list
-ID | State | Web-State | Level | Web-ContextPath | Name
----------------------------------------------------------------------------------------------------
-111 | Active | Deployed | 80 | /karaf-doc | Apache Karaf :: Manual (3.0.0)
-----
-
-=== `web:stop`
-
-The `web:stop` command stops a web application in the WebContainer. The `web:stop` command expects a `id` argument
-corresponding to the bundle ID (as displayed by the `web:list` command).
-
-For instance, to stop the Apache Karaf manual web application:
-
-----
-karaf@root()> web:stop 111
-----
-
-=== `web:start`
-
-The `web:start` command starts a web application in the WebContainer. The `web:start` command expects a `id` argument
-corresponding to the bundle ID (as displayed by the `web:list` command).
-
-For instance, to start the Apache Karaf manual web application:
-
-----
-karaf@root()> web:start 111
-----
-
-== JMX HttpMBean
-
-On the JMX layer, you have a MBean dedicated to the manipulation of the Servlets: the HttpMBean.
-
-The ObjectName to use is `org.apache.karaf:type=http,name=*`.
-
-=== Attributes
-
-The `Servlets` attribute provides a tabular data providing the list of deployed Servlets including:
-
-* `Alias` is the Servlet URL alias.
-* `Bundle-ID` is the ID of the bundle which provides this Servlet.
-* `Servlet` is the class name of the Servlet.
-* `State` is the current Servlet state (`Deployed` or `Undeployed`).
-* `URL` is the URL of the Servlet (the Servlet context path).
-
-== JMX WebMBean
-
-On the JMX layer, you have a MBean dedicated to the manipulation of the Web Applications: the WebMBean.
-
-The ObjectName to use is `org.apache.karaf:type=web,name=*`.
-
-=== Attributes
-
-The `WebBundles` attribute provides a tabular data providing the list of deployed Web Applications including:
-
-* `ID` is the ID of the bundle providing the Web Application.
-* `Level` is the bundle start level.
-* `Name` is the bundle symbolic name providing the Web Application.
-* `State` is the current state of the bundle.
-* `Web-ContextPath` is the context path of the Web Application.
-* `Web-State` is the current status of the Web Application (`Deployed` or `Undeployed`).
-
-=== Operations
-
-* `start(id)` starts the web context of the bundle with `id`.
-* `start(list)` starts the web context of the bundles with ID in the provided `list`.
-* `stop(id)` stops the web context of the bundle with `id`.
-* `stop(list)` stops the web context of the bundles with ID in the provided `list`.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/wrapper.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/wrapper.adoc b/manual/src/main/asciidoc/users-guide/wrapper.adoc
deleted file mode 100644
index ca629aa..0000000
--- a/manual/src/main/asciidoc/users-guide/wrapper.adoc
+++ /dev/null
@@ -1,388 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Integration in the operating system: the Service Wrapper
-
-In the previous chapter, we saw the different scripts and commands to start, stop, restart Apache Karaf.
-
-Instead of using these commands and scripts, you can integrate Apache Karaf directly in your operating system service control.
-
-Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate Apache Karaf:
-
-* like a native Windows Service
-* like a Unix daemon process
-
-The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.
-
-It also includes advanced fault detection software which monitors an application.
-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.
-It guarantees the maximum possible uptime of Apache Karaf.
-
-== Supported platforms
-
-* Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)
-* Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)
-* FreeBSD 9.x, 8.x
-* AIX 5.x, 6.x, 7.x (Power architecture)
-* Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)
-* HP-UX 10.x, 11.x (32 and 64 bits architecture)
-* SGI Irix
-* MacOS X
-
-== Installation
-
-Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.
-
-In the console:
-
-----
-karaf@root()> feature:install service-wrapper
-----
-
-Now, you have the `wrapper:install` command, to "register" Apache Karaf as service/daemon on your system:
-
-----
-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 )
-----
-
-== Installation
-
-Karaf Wrapper is an optional feature. To install it, simply type:
-
-----
-karaf@root> feature:install wrapper
-----
-
-Once installed, wrapper feature will provide `wrapper:install` new command in the Karaf shell:
-
-----
-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 )
-----
-
-The `wrapper:install` command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.
-
-For instance, on a Ubuntu/Debian Linux system:
-
-----
-karaf@root()> wrapper:install
-Creating file: /opt/apache-karaf-3.0.0/bin/karaf-wrapper
-Creating file: /opt/apache-karaf-3.0.0/bin/karaf-service
-Creating file: /opt/apache-karaf-3.0.0/etc/karaf-wrapper.conf
-Creating file: /opt/apache-karaf-3.0.0/lib/libwrapper.so
-Creating file: /opt/apache-karaf-3.0.0/lib/karaf-wrapper.jar
-Creating file: /opt/apache-karaf-3.0.0/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.0/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.0/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
-
-----
-
-You can note that `wrapper:install` command detected the running operating system ("Ubuntu/Debian Linux system detected").
-
-You have a complete explanation and list of system commands to perform to integrate Apache Karaf in your system:
-
-----
-ln -s /opt/apache-karaf-3.0.0/bin/karaf-service /etc/init.d/
-update-rc.d karaf-service defaults
-----
-
-== Uninstall
-
-The `wrapper:install` provides the system commands to perform to uninstall the service/daemon).
-
-For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove the `karaf-service` script from the runlevel scripts:
-
-----
-rm /etc/init.d/karaf-service
-----
-
-You can remove the "Wrapper Service" installer after that:
-
-----
-karaf@root()> feature:uninstall service-wrapper
-----
-
-== Note for MacOS users
-
-On MacOS you can install the service for an user or for the system.
-
-If you want to add bin/org.apache.karaf.KARAF as user service move this file into ~/Library/LaunchAgents/:
-
-----
-mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
-----
-
-If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:
-
-----
-sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
-----
-
-Change owner and rights:
-
-----
-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
-----
-
-You can test your service:
-
-----
-launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
-launchctl start org.apache.karaf.KARAF
-launchctl stop org.apache.karaf.KARAF
-----
-
-Finally, after restart your session or system you can use launchctl command to start and stop your service.
-
-If you want to remove the service call:
-
-----
-launchctl remove org.apache.karaf.KARAF
-----
-
-== Configuration
-
-When using scripts in the Apache Karaf `bin` folder, you can using `bin/setenv` Unix script (`bin\setenv.bat` on Windows) as described in the [Start, stop, restart, connect|start-stop] section of the documentation.
-
-{warning:title=Warning}
-The `bin/setenv` Unix script (`bin\setenv.bat` on Windows) is not used by the Apache Karaf Service Wrapper.
-{warning}
-
-To configure Apache Karaf started by the Service Wrapper, you have to tune the `etc/karaf-wrapper.conf` file. If you provided the `name` option to the `wrapper:install` command, the file is `etc/karaf-yourname.conf`.
-
-In this file, you can configure the different environment variables used by Apache Karaf. The Service Wrapper installer automatically populate these variables for you during the installation (using `wrapper:install` command).
-For instance:
-
-* `set.default.JAVA_HOME` is the `JAVA_HOME` used to start Apache Karaf (populated during Service Wrapper installation).
-* `set.default.KARAF_HOME` is the location of your Apache Karaf installation (populated during Service Wrapper installation).
-* `set.default.KARAF_BASE` is the location of your Apache Karaf installation (populated during Service Wrapper installation).
-* `set.default.KARAF_DATA` is the location of the Apache Karaf data folder (populated during Service Wrapper installation).
-* `set.default.KARAF_ETC` is the location of the Apache Karaf etc folder (populated during Service Wrapper installation).
-* `wrapper.java.additional` is used to pass additional arguments to the Java command, indexed by the argument number. The next index to use is 11.
-* `wrapper.java.initmemory` is the initial JVM memory size (the `-Xms`). It's not set by default (JVM default).
-* `wrapper.java.maxmemory` is the maximum JVM memory size (the `-Xmx`). It's set to 512M by default.
-* `wrapper.logfile` is the location of the Service Wrapper log file. It's set to `%KARAF_DATA%/log/wrapper.log` by default.
-* `wrapper.logfile.loglevel` is the Service Wrapper log level. It's set to `INFO` by default.
-* `wrapper.logfile.maxsize` is the Service Wrapper log file maximum size (before rotation). It's set to `10m` (10MB) by default.
-* `wrapper.logfile.maxfiles` is the number of Service Wrapper log files created (and rotated). It's set to `5` by default.
-* `wrapper.syslog.loglevel` is the integration with Unix syslog daemon. By default, it's set to `none` meaning disabled.
-* `wrapper.ntservice.name` is Windows service specific and defines the Windows service name. It's set to the `name` option of the `wrapper:install` command, or `karaf` by default.
-* `wrapper.ntservice.displayname` is Windows service specific and defines the Windows service display name. It's set to the `display` option of the `wrapper:install` command, or `karaf` by default.
-* `wrapper.ntservice.description` is Windows service specific and defines the Windows service description. It's set to the `description` option of the `wrapper:install` command, or empty by default.
-* `wrapper.ntservice.starttype` is Windows service specific and defines if the Windows service is started automatically with the service, or just on demand. It's set to `AUTO_START` by default, and could be switch to `DEMAND_START`.
-
-This is a example of generated `etc/karaf-wrapper.conf` file:
-
-----
-# ------------------------------------------------------------------------
-# 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.0-SNAPSHOT
-set.default.KARAF_BASE=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT
-set.default.KARAF_DATA=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT/data
-set.default.KARAF_ETC=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-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
-----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/.livereload
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/.livereload b/manual/src/main/webapp/.livereload
deleted file mode 100644
index b185045..0000000
--- a/manual/src/main/webapp/.livereload
+++ /dev/null
@@ -1,19 +0,0 @@
-# Lines starting with pound sign (#) are ignored.
-
-# additional extensions to monitor
-#config.exts << 'haml'
-
-# exclude files with NAMES matching this mask
-#config.exclusions << '~*'
-# exclude files with PATHS matching this mask (if the mask contains a slash)
-#config.exclusions << '/excluded_dir/*'
-# exclude files with PATHS matching this REGEXP
-#config.exclusions << /somedir.*(ab){2,4}.(css|js)$/
-
-# reload the whole page when .js changes
-#config.apply_js_live = false
-# reload the whole page when .css changes
-#config.apply_css_live = false
-
-# wait 100ms for more changes before reloading a page
-#config.grace_period = 0.1
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/WEB-INF/scalate/layouts/default.scaml b/manual/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
deleted file mode 100644
index e4f22cd..0000000
--- a/manual/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
+++ /dev/null
@@ -1,116 +0,0 @@
--#
--# Copyright (C) 2009-2010 the original author or authors.
--# See the notice.md file distributed with this work for additional
--# information regarding copyright ownership.
--#
--# Licensed 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.
--#
-
--@ var body: String
--@ var title : String = "Apache Karaf ${karaf.version} Guides"
-- response.setContentType("text/html")
-
--# Only include the console if it's available and the engine is in dev mode.
-- val include_console = engine.isDevelopmentMode && engine.resourceLoader.exists("/org/fusesource/scalate/console/console_head.scaml")
-
-!!! Basic
-%html(lang="en")
- %head
- %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
- %meta(name="description" content="description goes here")
- %meta(name="keywords" content="keywords,goes,here")
- %meta(name="author" content="The Apache Karaf Team")
-
- - if (include_console)
- = include("/org/fusesource/scalate/console/console_head.scaml")
-
- %link(href={uri("/css/style.css")} rel="stylesheet" type="text/css")
- %link(href={uri("/css/pygmentize.css")} rel="stylesheet" type="text/css")
-
- - if (include_console)
- %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
-
- %title
- = title
-
- %body
- %table{:width => "100%", :cellpadding => "0", :cellspacing => "0"}
- %tr{:width => "100%"}
- %td#cell-0-0{:colspan => "2"}
-
- %td#cell-0-1
-
- %td#cell-0-2{:colspan => "2"}
-
- %tr{:width => "100%"}
- %td#cell-1-0
-
- %td#cell-1-1
-
- %td#cell-1-2
- %div{:style => "padding: 5px;"}
- #banner
- = include("/_banner.ssp")
- #top-menu
- %table{:border => "0", :cellpadding => "1", :cellspacing => "0", :width => "100%"}
- %tr
- %td
- %div{:align => "left"}
- %td
- %div{:align => "right"}
- = include("/_quicklinks.ssp")
- %td#cell-1-3
-
- %td#cell-1-4
-
- %tr{:width => "100%"}
- %td#cell-2-0{:colspan => "2"}
-
- %td#cell-2-1
- %table
- %tr{:height => "100%", :valign => "top"}
- %td{:height => "100%"}
- #wrapper-menu-page-right
- #wrapper-menu-page-top
- #wrapper-menu-page-bottom
- #menu-page
- = include("/_navigation.conf")
- %td{:height =>"100%", :width => "100%"}
- .wiki-content
- !~~ body
- %td#cell-2-2{:colspan => "2"}
-
- %tr{:width => "100%"}
- %td#cell-3-0
-
- %td#cell-3-1
-
- %td#cell-3-2
- #footer
- #site-footer
- © 2008-2014 The Apache Software Foundation
- %br
- Apache Karaf, Karaf, Apache, the Apache feather logo, and the Apache Karaf project logo are trademarks of The Apache Software Foundation.
- %td#cell-3-3
-
- %td#cell-3-4
-
- %tr{:width => "100%"}
- %td#cell-4-0{:colspan => "2"}
-
- %td#cell-4-1
-
- %td#cell-4-2{:colspan => "2"}
-
- - if (include_console)
- = include("/org/fusesource/scalate/console/console.scaml")
[18/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc b/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
new file mode 100644
index 0000000..8a6eb83
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/custom-distribution.adoc
@@ -0,0 +1,650 @@
+//
+// Licensed 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.
+//
+
+== Custom distributions
+
+As Karaf is an OSGi container, it's heavily used as as application and middleware kernel.
+
+You may wish to construct your own Karaf distribution preconfigured to your requirements.
+
+This custom distribution could contain:
+
+* branding to change the Karaf console look-and-feel
+* configuration files (in the etc folder) altered to your requirements
+* pre-packaged artifacts in the deploy folder
+* a pre-populated system repository (containing your own bundle and features descriptor)
+* renamed or specific scripts in the bin folder
+* system documentation files
+
+=== Maven assembly
+
+The recommended way to create a Karaf server assembly is to use the karaf-assembly packaging with the karaf-maven-plugin.
+This assembles a server from the maven dependencies in the project pom. After explanation of the configuration options
+we present an example.
+
+The Karaf project effectively uses this packaging to assemble the official Karaf distributions, but due to maven
+limitations we have to simulate rather than use the karaf-assembly packaging.
+
+This packaging creates tar.gz and zip archives containing the assembled server.
+They are identical except that zip archives don't unpack with appropriate unix file permissions for the scripts.
+
+==== Maven dependencies
+
+Maven dependencies in a karaf-assembly project can be feature repositories (classifier "features") or kar archives.
+Feature repositories are installed in the internal "system" Maven structured repository.
+Kar archives have their content unpacked on top of the server as well as contained feature repositories installed.
+
+The Maven scope of a dependency determines whether its feature repository is listed in the features service
+configuration file `etc/org.apache.karaf.features.cfg` `featuresRepositories` property:
+
+* compile (default): All the features in the repository (or for a kar repositories) will be installed into the
+`startup.properties`. The feature repo is not listed in the features service configuration file.
+* runtime: feature installation is controlled by `<startupFeature>`, `<bootFeature>`, and `<installedFeature>` elements
+in the karaf-maven-plugin configuration. The feature repo uri is listed in the features service configuration file.
+
+==== Plugin configuration
+
+Control how features are installed using these elements referring to features from installed feature repositories:
+
+* `<startupFeature>foo</startupFeature>` - This will result in the feature bundles being listed in startup.properties at
+the appropriate start level and the bundles being copied into the "system" internal repository.
+You can use feature_name or feature_name/feature_version formats.
+* `<bootFeature>bar</bootFeature>` - This will result in the feature name added to boot-features in the features
+service configuration file and all the bundles in the feature copied into the "system" internal repository.
+You can use feature_name or feature_name/feature_version formats.
+* `<installedFeature>baz</installedFeature>` - This will result in all the bundles in the feature being installed in
+the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories.
+You can use feature_name or feature_name/feature_version formats.
+
+==== Minimal Distribution Example
+
+This is the minimal assembly pom changed to use the packaging and annotated
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+...
+ </parent>
+
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf-minimal</artifactId>
+ <version>${project.version}</version>
+ <packaging>karaf-assembly</packaging>
+ <name>Apache Karaf :: Assemblies :: Minimal Distribution</name>
+
+ <dependencies>
+ <dependency>
+ <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>${project.version}</version>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>standard</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <!-- if you want to include resources in the distribution -->
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <!-- if you want to include resources in the distribution -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>process-resources</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- karaf-maven-plugin will call both assembly and archive goals -->
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- no startupFeatures -->
+ <bootFeatures>
+ <feature>standard</feature>
+ </bootFeatures>
+ <!-- no installedFeatures -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+==== Custom Distribution Example
+
+It's possible to specify feature versions using the name/version format.
+
+For instance, to pre-install Spring 4.0.7.RELEASE_1 feature in your custom distribution, you can use the following pom.xml:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>my.custom</groupId>
+ <artifactId>my.distribution</artifactId>
+ <version>1.0</version>
+ <packaging>karaf-assembly</packaging>
+
+ <dependencies>
+ <dependency>
+ <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <version>4.0.0</version>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>standard</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>spring</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <!-- if you want to include resources in the distribution -->
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <plugins>
+ <!-- if you want to include resources in the distribution -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>process-resources</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>4.0.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- no startupFeatures -->
+ <bootFeatures>
+ <feature>minimal</feature>
+ </bootFeatures>
+ <installedFeatures>
+ <feature>wrapper</feature>
+ <feature>spring/4.0.7.RELEASE_1</feature>
+ </installedFeatures>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+=== (deprecated old style) Maven assembly
+
+Basically a Karaf custom distribution involves:
+
+. Uncompressing a standard Karaf distribution in a given directory.
+. Populating the system repo with your features.
+. Populating the lib directory with your branding or other system bundle jar files.
+. Overriding the configuration files in the etc folder.
+
+These tasks could be performed using scripting, or more easily and portable, using Apache Maven and a set of Maven plugins.
+
+For instance, the Maven POM could look like:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <groupId>my.company</groupId>
+ <artifactId>mycustom-karaf</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+ <name>My Unix Custom Karaf Distribution</name>
+
+ <properties>
+ <karaf.version>${project.version}</karaf.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${karaf.version}</version>
+ <executions>
+ <execution>
+ <id>add-features-to-repo</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>features-add-to-repo</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
+ <descriptor>file:${project.basedir}/target/classes/my-features.xml</descriptor>
+ </descriptors>
+ <features>
+ <feature>my-feature</feature>
+ </features>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <!-- Define here the artifacts which should be considered in the assembly -->
+ <!-- For instance, the branding jar -->
+ <artifactItems>
+ <artifactItem>
+ <groupId>my.groupId</groupId>
+ <artifactId>my.branding.id</artifactId>
+ <version>1.0</version>
+ <outputDirectory>target/dependencies</outputDirectory>
+ <destFileName>mybranding.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- Uncompress the standard Karaf distribution -->
+ <id>unpack</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <type>tar.gz</type>
+ <outputDirectory>target/dependencies</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bin</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/descriptors/bin.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+The Maven POM will download the Karaf standard distribution and prepare resources to be processed by the Maven assembly plugin.
+
+Your Maven project structure should look like:
+
+* pom.xml: the previous POM file
+* src/main/descriptors/bin.xml: the assembly Maven plugin descriptor (see below)
+* src/main/filtered-resources: contains all resource files that have Maven property values to be filtered/replaced. Typically, this will include features descriptor and configuration files.
+* src/main/distribution: contains all raw files which will be copied as-is into your custom distribution.
+
+For instance, `src/main/filtered-resources` could contain:
+
+* `my-features.xml` where Maven properties will be replaced
+* `etc/org.apache.karaf.features.cfg` file containing your my-features descriptor:
+
+----
+#
+# Comma separated list of features repositories to register by default
+#
+featuresRepositories=mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features,mvn:my.groupId/my-features/${project.version}/xml/features
+
+#
+# Comma separated list of features to install at startup
+#
+featuresBoot=config,ssh,management,my-feature
+----
+
+The `src/main/distribution` contains all your custom Karaf configuration files and script, as, for examples:
+
+* etc/org.ops4j.pax.logging.cfg
+
+----
+# Root logger
+log4j.rootLogger=INFO, out, osgi:VmLogAppender
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j.appender.out.file=${karaf.home}/log/my-customer-distribution.log
+log4j.appender.out.append=true
+log4j.appender.out.maxFileSize=1MB
+log4j.appender.out.maxBackupIndex=10
+
+# Sift appender
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=my-custom
+log4j.appender.sift.appender=org.apache.log4j.FileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
+log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+----
+
+* etc/system.properties
+
+----
+#
+# The properties defined in this file will be made available through system
+# properties at the very beginning of the FAS boot process.
+#
+
+# Log level when the pax-logging service is not available
+# This level will only be used while the pax-logging service bundle
+# is not fully available.
+# To change log levels, please refer to the org.ops4j.pax.logging.cfg file
+# instead.
+org.ops4j.pax.logging.DefaultServiceLog.level=ERROR
+
+#
+# Name of this custom instance.
+#
+karaf.name=my-custom
+
+#
+# Default repository where bundles will be loaded from before using
+# other Maven repositories. For the full Maven configuration, see the
+# org.ops4j.pax.url.mvn.cfg file.
+#
+karaf.default.repository=system
+
+#
+# Location of a shell script that will be run when starting a shell
+# session. This script can be used to create aliases and define
+# additional commands.
+#
+karaf.shell.init.script=${karaf.home}/etc/shell.init.script
+
+#
+# Set this empty property to avoid errors when validating xml documents.
+#
+xml.catalog.files=
+
+#
+# Suppress the bell in the console when hitting backspace to many times
+# for example
+#
+jline.nobell=true
+
+#
+# Default port for the OSGi HTTP Service
+#
+org.osgi.service.http.port=8181
+
+#
+# Allow usage of ${custom.home} as an alias for ${karaf.home}
+#
+custom.home=${karaf.home}
+----
+* etc/users.properties
+----
+admin=admin,admin
+----
+* You can add a `etc/custom.properties`, it's a placeholder for any override you may need. For instance:
+----
+karaf.systemBundlesStartLevel=50
+obr.repository.url=http://svn.apache.org/repos/asf/servicemix/smx4/obr-repo/repository.xml
+org.osgi.framework.system.packages.extra = \
+ org.apache.karaf.branding; \
+ com.sun.org.apache.xalan.internal.xsltc.trax; \
+ com.sun.org.apache.xerces.internal.dom; \
+ com.sun.org.apache.xerces.internal.jaxp; \
+ com.sun.org.apache.xerces.internal.xni; \
+ com.sun.jndi.ldap
+----
+
+Now, we can "assemble" our custom distribution using the Maven assembly plugin. The Maven assembly plugin uses an
+assembly descriptor, configured in POM above to be `src/main/descriptors/bin.xml`:
+
+----
+<assembly>
+
+ <id>bin</id>
+
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+
+ <fileSets>
+
+ <!-- Expanded Karaf Standard Distribution -->
+ <fileSet>
+ <directory>target/dependencies/apache-karaf-${karaf.version}</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>**/demos/**</exclude>
+ <exclude>bin/**</exclude>
+ <exclude>etc/system.properties</exclude>
+ <exclude>etc/users.properties</exclude>
+ <exclude>etc/org.apache.karaf.features.cfg</exclude>
+ <exclude>etc/org.ops4j.pax.logging.cfg</exclude>
+ <exclude>LICENSE</exclude>
+ <exclude>NOTICE</exclude>
+ <exclude>README</exclude>
+ <exclude>RELEASE-NOTES</exclude>
+ <exclude>karaf-manual*.html</exclude>
+ <exclude>karaf-manual*.pdf</exclude>
+ </excludes>
+ </fileSet>
+
+ <!-- Copy over bin/* separately to get the correct file mode -->
+ <fileSet>
+ <directory>target/dependencies/apache-karaf-${karaf.version}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>bin/admin</include>
+ <include>bin/karaf</include>
+ <include>bin/start</include>
+ <include>bin/stop</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+
+ <!-- Copy over jar files -->
+ <fileSet>
+ <directory>target/dependencies</directory>
+ <includes>
+ <include>my-custom.jar</include>
+ </includes>
+ <outputDirectory>/lib/</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>src/main/distribution</directory>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>0644</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/classes/etc</directory>
+ <outputDirectory>/etc/</outputDirectory>
+ <lineEnding>unix</lineEnding>
+ <fileMode>0644</fileMode>
+ </fileSet>
+
+ <fileSet>
+ <directory>target/features-repo</directory>
+ <outputDirectory>/system</outputDirectory>
+ </fileSet>
+
+ </fileSets>
+
+ <files>
+ <file>
+ <source>${basedir}/target/dependencies/apache-karaf-${karaf.version}/bin/karaf</source>
+ <outputDirectory>/bin/</outputDirectory>
+ <destName>my-custom</destName>
+ <fileMode>0755</fileMode>
+ <lineEnding>unix</lineEnding>
+ </file>
+ <file>
+ <source>${basedir}/target/classes/features.xml</source>
+ <outputDirectory>/system/my.groupid/my-features/${project.version}</outputDirectory>
+ <destName>my-features-${project.version}-features.xml</destName>
+ <fileMode>0644</fileMode>
+ <lineEnding>unix</lineEnding>
+ </file>
+ </files>
+
+</assembly>
+----
+
+To build your custom Karaf distribution, just run:
+
+----
+mvn install
+----
+
+You will find your Karaf custom distribution tar.gz in the target directory.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/debugging.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/debugging.adoc b/manual/src/main/asciidoc/developer-guide/debugging.adoc
new file mode 100644
index 0000000..1664438
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/debugging.adoc
@@ -0,0 +1,199 @@
+//
+// Licensed 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.
+//
+
+== Troubleshooting, Debugging, Profiling, and Monitoring
+
+=== Troubleshooting
+
+==== Logging
+
+Logging is easy to control through the console, with commands grouped under _log_ shell. To learn about the available
+logging commands type:
+
+----
+karaf@root> log<tab>
+
+log:display log:display-exception log:get log:set
+karaf@root>
+----
+
+Typical usage is:
+
+. Use `log:set` to dynamically change the global log level
+. Execute the problematic operation
+. Use `log:display` (or `log:display-exception` to display the log
+
+==== Worst Case Scenario
+
+If you end up with a Karaf in a really bad state (i.e. you can not boot it anymore) or you just want to revert to a
+clean state quickly, you can safely remove the `data` directory just in the installation directory. This folder
+contains transient data and will be recreated if removed when you relaunch Karaf.
+You may also want to remove the files in the `deploy` folder to avoid them being automatically installed when Karaf
+is started the first time.
+
+=== Debugging
+
+Usually, the easiest way to debug Karaf or any application deployed onto it is to use remote debugging.
+Remote debugging can be easily activated by using the `debug` parameter on the command line.
+
+----
+> bin/karaf debug
+----
+
+or on Windows
+
+----
+> bin\karaf.bat debug
+----
+
+Another option is to set the `KARAF_DEBUG` environment variable to `TRUE`.
+
+This can be done using the following command on Unix systems:
+
+----
+export KARAF_DEBUG=true
+----
+
+On Windows, use the following command
+
+----
+set KARAF_DEBUG=true
+----
+
+Then, you can launch Karaf using the usual way:
+
+----
+bin/karaf
+----
+
+or
+
+----
+bin\karaf.bat
+----
+
+Last, inside your IDE, connect to the remote application (the default port to connect to is 5005).
+
+This option works fine when it is needed to debug a project deployed top of Apache Karaf. Nervertheless, you will be blocked
+if you would like to debug the server Karaf. In this case, you can change the following parameter suspend=y in the
+karaf.bat script file. That will cause the JVM to pause just before running main() until you attach a debugger then it
+will resume the execution. This way you can set your breakpoints anywhere in the code and you should hit them no matter
+how early in the startup they are.
+
+----
+export DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
+----
+
+and on Windows,
+
+----
+set DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
+----
+
+==== Debugging Environment Variables
+
+|===
+|Variable |Description |Default
+
+|KARAF_DEBUG
+|Set to TRUE to enable debugging.
+|
+
+|EXTRA_JAVA_OPTS
+|Java options append to JAVA_OPTS
+|
+
+|JAVA_DEBUG_OPTS
+|Java options to enable debuging.
+|Calculated based on the OS
+
+|JAVA_DEBUG_PORT
+|Port used by the debugger
+|5005
+|===
+
+=== Profiling
+
+==== jVisualVM
+
+You have to edit the `etc/config.properties` configuration file to add the jVisualVM package:
+
+----
+org.osgi.framework.bootdelegation=...,org.netbeans.lib.profiler.server
+----
+
+Run Karaf from the console, and you should now be able to connect using jVisualVM.
+
+==== YourKit
+
+You need a few steps to be able to profile Karaf using YourKit.
+
+The first one is to edit the `etc/config.properties` configuration file and add the following property:
+
+----
+org.osgi.framework.bootdelegation=...,com.yourkit.*
+----
+
+Then, set the `JAVA_OPTS` environment variable:
+
+----
+export JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
+----
+
+or, on Windows
+
+----
+set JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
+----
+
+Run Karaf from the console, and you should now be able to connect using YourKit standalone or from your favorite IDE.
+
+=== Monitoring
+
+Karaf uses JMX for monitoring and management of all Karaf components.
+
+The JMX connection could be:
+
+* local using the process id
+
+image:jconsole_connect.jpg[]
+
+* remote using the `rmiRegistryPort` property defined in `etc/org.apache.karaf.management.cfg` file.
+
+Using JMX, you can have a clean overview of the running Karaf instance:
+
+* A overview with graphics displaying the load in terms of thread, heap/GC, etc:
+
+image:jconsole_overview.jpg[]
+
+* A thread overview:
+
+image:jconsole_threads.jpg[]
+
+* A memory heap consumption, including "Perform GC" button:
+
+image:jconsole_memory.jpg[]
+
+* A complete JVM summary, with all number of threads, etc:
+
+image:jconsole_summary.jpg[]
+
+You can manage Karaf features like you are in the shell. For example, you have access to the Admin service MBean,
+allowing you to create, rename, destroy, change SSH port, etc. Karaf instances:
+
+image:jconsole_admin.jpg[]
+
+You can also manage Karaf features MBean to list, install, and uninstall Karaf features:
+
+image:jconsole_features.jpg[]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc b/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc
new file mode 100644
index 0000000..f41d8e4
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/dev-cdi.adoc
@@ -0,0 +1,15 @@
+//
+// Licensed 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.
+//
+
+== CDI
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/developer-commands.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/developer-commands.adoc b/manual/src/main/asciidoc/developer-guide/developer-commands.adoc
new file mode 100644
index 0000000..18437b4
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/developer-commands.adoc
@@ -0,0 +1,242 @@
+//
+// Licensed 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.
+//
+
+== Developer commands
+
+As you can see in the users guide, Apache Karaf is an enterprise ready OSGi container.
+
+It's also a container designed to simplify the life for developers and administrators to get details about the
+running container.
+
+=== Dump
+
+If you encounter issues like performance degradations, weird behaviour, it could be helpful to have a kind of snapshot
+about the current activity of the container.
+
+The `dev:dump-create` command creates a dump file containing:
+
+* the `bundles.txt` file contains the list of all OSGi bundles, with id, symbolic name, version, current status
+* the `features.txt` file contains the list of all features, including current status
+* the `environment.txt` file contains details about Apache Karaf, OSGi framework, Operating System, JVM, system
+ properties, threads count, classes loaded
+* the `memory.txt` file contains the status of the JVM memory at the dump time
+* the `heapdump.txt` file contains a memory heap dump, with all objects instances, space usage, etc.
+* the `threads.txt` file contains a thread dump, with all threads, waiting status, etc.
+* the `log` folder contains the `data/log` folder, with all log files.
+
+By default, the `dev:dump-create` command creates a zip file in the `KARAF_BASE` folder, with the timestamp of the
+dump creation:
+
+----
+karaf@root()> dev:dump-create
+Created dump zip: 2015-07-01_171434.zip
+----
+
+We can see the file generated in the `KARAF_BASE` folder:
+
+----
+$ cd /opt/apache-karaf-4.0.0
+$ ls -lh *.zip
+-rw-rw-r-- 1 user group 17M Jul 1 17:14 2015-07-01_171434.zip
+----
+
+You can specify the file name of the zip archive:
+
+----
+karaf@root()> dev:dump-create mydump.zip
+Diagnostic dump created.
+----
+
+Instead of a zip archive, you can create the dump (exploded) in a directory using the `-d` (`--directory`) option:
+
+----
+karaf@root()> dev:dump-create -d /tmp/mydump
+Diagnostic dump created.
+----
+
+=== Diagnostic
+
+It's not always easy for the developers to understand why a bundle is not active.
+
+It could be because the Activator failed, the Blueprint container start failed, etc.
+
+The `bundle:diag` command gives you details about a bundle is not active:
+
+----
+karaf@root()> bundle:diag
+Apache ServiceMix :: Bundles :: avro-ipc (81)
+---------------------------------------------
+Status: Installed
+Unsatisfied Requirements:
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=javax.servlet)(version>=2.5.0)(!(version>=3.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=javax.servlet.http)(version>=2.5.0)(!(version>=3.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.data)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.file)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.generic)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.io)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.reflect)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.specific)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.util)(version>=1.7.0)(!(version>=2.0.0)))
+[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity)
+[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.app)
+[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.context)
+[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.exception)
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.bootstrap)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.buffer)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel.group)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel.socket.nio)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.codec.frame)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.codec.oneone)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.execution)(version>=3.4.0)(!(version>=4.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty)(version>=6.1.0)(!(version>=7.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.bio)(version>=6.1.0)(!(version>=7.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.nio)(version>=6.1.0)(!(version>=7.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.servlet)(version>=6.1.0)(!(version>=7.0.0)))
+[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.resource)(version>=6.1.0)(!(version>=7.0.0)))
+----
+
+=== Dynamic import
+
+The `bundle:dynamic-import` command allows you to enable or disable the dynamic import of a given bundle:
+
+----
+karaf@root()> bundle:dynamic-import 50
+Enabling dynamic imports on bundle org.ops4j.pax.url.wrap [50]
+----
+
+The purpose of dynamic import is to allow a bundle to be wired up to packages that may not be knwon about in advance.
+When a class is requested, if it cannot be solved via the bundle's existing imports, the dynamic import allows other
+bundles to be considered for a wiring import to be added.
+
+The `bundle:dynamic-import` command allows or doesn't allow this behaviour.
+
+=== OSGi framework
+
+The `system:framework` command allows to display the current OSGi framework in use, and enable/disable debugging inside the OSGi framework.
+
+----
+karaf@root()> system:framework
+Current OSGi framework is felix
+karaf@root()> system:framework -debug
+Enabling debug for OSGi framework (felix)
+karaf@root()> system:framework -nodebug
+Disabling debug for OSGi framework (felix)
+----
+
+=== Stack traces printout
+
+The `shell:stack-traces-print` command prints the full stack trace when the execution of a command
+throws an exception.
+
+You can enable or disable this behaviour by passing true (to enable) or false (to disable) on the command on the fly:
+
+----
+karaf@root()> stack-traces-print
+Printing of stacktraces set to true
+karaf@root()> bundle:start
+java.lang.RuntimeException: Access to system bundle 0 denied. You can override with -f
+ at org.apache.karaf.bundle.command.BundlesCommand.assertNoSystemBundles(BundlesCommand.java:57)
+ at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:48)
+ at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:41)
+ at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
+ at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
+ at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
+ at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:601)
+ at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
+ at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
+ at org.apache.karaf.shell.console.commands.$BlueprintCommand14083304.execute(Unknown Source)
+ at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:601)
+ at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
+ at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
+ at org.apache.karaf.shell.console.commands.$BlueprintCommand14083304.execute(Unknown Source)
+ at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
+ at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
+ at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
+ at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
+ at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
+ at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
+ at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
+ at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:497)
+ at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:198)
+ at java.lang.Thread.run(Thread.java:722)
+ at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:118)
+ at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:109)
+ at java.security.AccessController.doPrivileged(Native Method)
+ at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)
+ at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:107)
+karaf@root()> stack-traces-print false
+Printing of stacktraces set to false
+karaf@root()> bundle:start
+Error executing command: Access to system bundle 0 denied. You can override with -f
+----
+
+=== Bundle tree
+
+The `bundle:tree-show` command shows the bundle dependency tree based on the wiring information of a given single bundle
+ID.
+
+----
+karaf@root()> bundle:tree-show 40
+Bundle org.ops4j.pax.url.wrap [40] is currently ACTIVE
+
+org.ops4j.pax.url.wrap [40]
++- org.ops4j.base.util.property [14]
++- org.ops4j.pax.url.commons [49]
+| +- org.ops4j.base.util.property [14]
+| +- org.ops4j.pax.logging.pax-logging-api [23]
+| +- org.ops4j.pax.swissbox.property [31]
+| | +- org.ops4j.base.util.property [14]
+| | +- org.ops4j.base.lang [41]
+| +- org.apache.felix.configadmin [43]
+| | +- org.ops4j.pax.logging.pax-logging-api [23]
+| +- org.ops4j.base.lang [41]
++- org.ops4j.pax.logging.pax-logging-api [23]
++- org.ops4j.pax.swissbox.bnd [25]
+| +- biz.aQute.bndlib [30]
+| | +- org.apache.servicemix.bundles.junit [36]
+| +- org.ops4j.pax.logging.pax-logging-api [23]
+| +- org.ops4j.base.lang [41]
++- org.apache.felix.configadmin [43]
++- org.ops4j.base.net [29]
+| +- org.ops4j.base.monitors [37]
+| +- org.ops4j.base.lang [41]
++- org.ops4j.base.lang [41]
+----
+
+=== Watch
+
+The `bundle:watch` command enables watching the local Maven repository for updates on bundles.
+If the bundle file changes on the Maven repository, Apache Karaf will automatically update the bundle.
+
+The `bundle:watch` allows you to configure a set of URLs to monitore. All bundles bundles whose location matches the
+given URL will be automatically updated. It avoids needing to manually update the bundles or even copy the bundle to the
+system folder.
+
+{warning}
+Only Maven based URLs and Maven SNAPSHOTs will actually be updated automatically.
+{warning}
+
+The following command:
+
+----
+karaf@root()> bundle:watch *
+----
+
+will monitor all bundles that have a location matching mvn:* and '-SNAPSHOT' in their URL.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/ds.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/ds.adoc b/manual/src/main/asciidoc/developer-guide/ds.adoc
new file mode 100644
index 0000000..bb34893
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/ds.adoc
@@ -0,0 +1,15 @@
+//
+// Licensed 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.
+//
+
+== Declarative Service (DS)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/extending.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/extending.adoc b/manual/src/main/asciidoc/developer-guide/extending.adoc
new file mode 100644
index 0000000..62c56a4
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/extending.adoc
@@ -0,0 +1,359 @@
+//
+// Licensed 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.
+//
+
+== Extending
+
+Apache Karaf is a very flexible container that you can extend very easily.
+
+=== Console
+
+In this section, you will see how to extend the console by adding your own command.
+
+We will leverage Apache Maven to create and build the OSGi bundle.
+This OSGi bundle will use Blueprint. We don't cover the details of OSGi bundle and Blueprint, see the specific
+sections for details.
+
+==== Create the Maven project
+
+To create the Maven project, we can:
+
+* use a Maven archetype
+* create by hand
+
+===== Using archetype
+
+The Maven Quickstart archetype can create an empty Maven project where you can put your project definition.
+
+You can directly use:
+
+----
+mvn archetype:create \
+ -DarchetypeArtifactId=maven-archetype-quickstart \
+ -DgroupId=org.apache.karaf.shell.samples \
+ -DartifactId=shell-sample-commands \
+ -Dversion=1.0-SNAPSHOT
+----
+
+It results to a ready to use project, including a `pom.xml`.
+
+You can also use Maven archetype in interactive mode. You will have to answer to some questions used to generate
+the project with the `pom.xml`:
+
+----
+mvn archetype:generate
+Choose a number: (1/2/3/4/5/6/7/.../32/33/34/35/36) 15: : 15
+Define value for groupId: : org.apache.karaf.shell.samples
+Define value for artifactId: : shell-sample-commands
+Define value for version: 1.0-SNAPSHOT: :
+Define value for package: : org.apache.karaf.shell.samples
+----
+
+==== By hand
+
+Alternatively, you can simply create the directory `shell-sample-commands` and create the `pom.xml` file inside it:
+
+----
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.karaf.shell.samples</groupId>
+ <artifactId>shell-sample-commands<artifactId>
+ <packaging>bundle</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>shell-sample-commmands</name>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${felix.plugin.version}</version>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ org.apache.felix.service.command,
+ org.apache.karaf.shell.commands,
+ org.apache.karaf.shell.console,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+==== Configuring for Java 6/7
+
+We are using annotations to define commands, so we need to ensure Maven will actually use JDK 1.6 or 1.7 to compile the jar.
+Just add the following snippet after the `dependencies` section.
+
+----
+<build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <target>1.6</target>
+ <source>1.6</source>
+ </configuration>
+ </plugin>
+ </plugins>
+</build>
+----
+
+==== Loading the project in your IDE
+
+We can use Maven to generate the needed files for your IDE:
+
+Inside the project, run the following command
+
+----
+mvn eclipse:eclipse
+----
+
+or
+
+----
+mvn idea:idea
+----
+
+The project files for your IDE should now be created. Just open the IDE and load the project.
+
+==== Creating a basic command class
+
+We can now create the command class `HelloShellCommand.java`
+
+----
+package org.apache.karaf.shell.samples;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Command(scope = "test", name = "hello", description="Says hello")
+@Service
+public class HelloShellCommand implements Action {
+
+ @Override
+ public Object execute() throws Exception {
+ System.out.println("Executing Hello command");
+ return null;
+ }
+}
+----
+
+==== Manifest
+
+In order for Karaf to find your command, you need to add the `Karaf-Commands=*` manifest header.
+
+This is usually done by modifying the maven bundle plugin configuration
+
+----
+<plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Karaf-Commands>*</Karaf-Commands>
+ </instructions>
+ </configuration>
+</plugin>
+----
+
+==== Compile
+
+Let's try to build the jar. Remove the test classes and sample classes if you used the artifact, then from the command line, run:
+
+----
+mvn install
+----
+
+The end of the maven output should look like:
+
+----
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+----
+
+==== Test
+
+Launch Apache Karaf and install your bundle:
+
+----
+karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
+----
+
+Let's try running the command:
+
+----
+karaf@root()> test:hello
+Executing Hello command
+----
+
+==== Command completer
+
+A completer allows you to automatically complete a command argument using <tab>. A completer is simply a bean which is
+injected to a command.
+
+Of course to be able to complete it, the command should require an argument.
+
+==== Command argument
+
+We add an argument to the HelloCommand:
+
+----
+package org.apache.karaf.shell.samples;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Command(scope = "test", name = "hello", description="Says hello")
+@Service
+public class HelloShellCommand implements Action {
+
+ @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
+ @Completion(SimpleNameCompleter.class)
+ String name = null;
+
+ @Override
+ public Object execute() throws Exception {
+ System.out.println("Hello " + name);
+ return null;
+ }
+}
+----
+
+==== Completer bean
+
+A completer is a bean which implements the Completer interface:
+
+----
+package org.apache.karaf.shell.samples;
+
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.CommandLine;
+import org.apache.karaf.shell.api.console.Completer;
+import org.apache.karaf.shell.api.console.Session;
+import org.apache.karaf.shell.support.completers.StringsCompleter;
+
+/**
+ * <p>
+ * A very simple completer.
+ * </p>
+ */
+@Service
+public class SimpleNameCompleter implements Completer {
+
+ public int complete(Session session, CommandLine commandLine, List<String> candidates) {
+ StringsCompleter delegate = new StringsCompleter();
+ delegate.getStrings().add("Mike");
+ delegate.getStrings().add("Eric");
+ delegate.getStrings().add("Jenny");
+ return delegate.complete(buffer, cursor, candidates);
+ }
+
+}
+----
+
+==== Completers for option values
+
+Quite often your commands will not have just arguments, but also options. You can provide completers for option values.
+The snippet below shows the HelloShellCommand with an option to specify what the greet message will be.
+
+----
+package org.apache.karaf.shell.samples;
+
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Command(scope = "test", name = "hello", description="Says hello")
+@Service
+public class HelloShellCommand implements Action {
+
+ @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
+ @Completion(SimpleNameCompleter.class)
+ String name = null;
+
+ @Option(name = "-g", aliases = "--greet", description = "The configuration pid", required = false, multiValued = false)
+ @Completion(GreetCompleter.class)
+ String greet = "Hello;
+
+ @Override
+ public Object execute() throws Exception {
+ System.out.println(greet + " " + name);
+ return null;
+ }
+}
+----
+
+==== Completers with state
+
+Some times we want to tune the behavior of the completer depending on the commands already executed, in the current shell
+or even the rest of the arguments that have been already passed to the command. Such example is the config:set-property
+command which will provide auto completion for only for the properties of the pid specified by a previously issued config:edit
+command or by the option --pid.
+
+The Session object provides map like methods for storing key/value pairs and can be used to put/get the state.
+The pre-parsed CommandLine objects allows you to check the previous arguments and options on the command line and to fine tune
+the behavior of the Completer.
+Those two objects are given to the Completer when calling the `complete` method.
+
+==== Test
+
+Launch a Karaf instance and run the following command to install the newly created bundle:
+
+----
+karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
+----
+
+Let's try running the command:
+
+----
+karaf@root> test:hello <tab>
+ one two three
+----
+
+=== WebConsole
+
+You can also extend the Apache Karaf WebConsole by providing and installing a webconsole plugin.
+
+A plugin is an OSGi bundle that register a Servlet as an OSGi service with some webconsole properties.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/github-contributions.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/github-contributions.adoc b/manual/src/main/asciidoc/developer-guide/github-contributions.adoc
new file mode 100644
index 0000000..de3c098
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/github-contributions.adoc
@@ -0,0 +1,81 @@
+//
+// Licensed 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.
+//
+
+== Github Contributions
+
+Some people prefer to make contributions to karaf source via github. If you are one of them, this is for you!
+
+=== Introduction
+
+Apache Karaf is available as a periodically replicated mirror on: https://github.com/apache/karaf
+
+=== Suggested Workflow
+
+. Make a fork of karaf repo github mirror
+. Do all your new work on your own karaf fork
+. When ready, file a Jira issue https://issues.apache.org/jira/browse/KARAF, attach the link to your github pull request, and ask for a review
+. One of karaf committers will discuss your pull request on github; and at some point your pull request will be accepted
+. When your pull request is accepted, squash it into a single commit and attach single patch file to the original jira, with ASF grant check box selected
+. Now pray to your favorite ASF committer to really accept the patch :-)
+. When your patch is committed to the svn, and you can verify it in the latest karaf snapshot, close your pull request on github
+
+=== License Reminder
+
+In order for your contributions to be accepted:
+
+* All files must contain ASL license grant header
+* You must select ASF grant check box when attaching patch to the jira
+
+=== How to Generate a One-File-Patch Via Throw-Away Branch
+
+Here is one way to generate squash of your commits:
+
+http://stackoverflow.com/questions/616556/how-do-you-squash-commits-into-one-patch-with-git-format-patch
+
+----
+#
+# 'archon' referers to karaf mirror
+# 'origin' referers to your own fork
+#
+
+# attach karaf mirror as remote, if not done yet
+git remote add archon https://github.com/apache/karaf
+
+# fetch latest karaf mirror
+git fetch archon
+
+# ensure you are on your fork trunk
+git checkout origin/trunk
+
+# kill previous patch delivery, if you had one
+git branch -D delivery
+
+# make new delivery throw-away branch, based on latest karaf mirror
+git branch delivery archon/trunk
+
+# use it
+git checkout delivery
+
+# squash all your local development into a single commit
+git merge --squash trunk
+
+# commit it to the delivery branch
+git commit -m "delivery"
+
+# generate a patch file against the mirror
+git format-patch archon/trunk
+
+----
+
+root of your Karaf source now contains a file named "0001-delivery.patch.txt" (please attach the .txt ending;this will allow commiters to open your patch directly in the browser and give it a short look there) which you should attach to your karaf jira, and ask to commit to the svn trunk
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc b/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
new file mode 100644
index 0000000..e4ed117
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/karaf-maven-plugin.adoc
@@ -0,0 +1,486 @@
+//
+// Licensed 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.
+//
+
+== Using the karaf-maven-plugin
+
+The Karaf Maven plugin allows you:
+
+* to work with Karaf features: validate a features descriptor, add features bundle into a repository, create a KAR archive from a features descriptor, etc.
+* to create Karaf commands help: it generates help from Karaf commands
+* to modify Karaf instances and create distributions
+
+=== Packaging
+
+The most generally useful features of the karaf-maven-plugin are exposed as packagings. To use the packagings the pom or an ancestor must configure the karaf-maven-plugin with extensions:
+
+----
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+----
+
+Then specify the packaging in your project as usual, e.g.
+
+----
+ <packaging>kar</packaging>
+----
+
+|===
+|Packaging |Description
+
+|feature
+|The feature packaging generates a features.xml descriptor using the `karaf:features-generate-descriptor`
+
+|kar
+|The kar packaging generates a features.xml descriptor using the `karaf:features-generate-descriptor` and then packages a kar using the `karaf:features-create-kar`
+
+|karaf-assembly
+|Assembles a Karaf server based on the features descriptors and kar files listed as Maven dependencies.
+|===
+
+=== Commands goals
+
+The `karaf-maven-plugin` is able to generate documentation for Karaf commands
+
+==== `karaf:commands-generate-help`
+
+The `karaf:commands-generate-help` goal generates documentation containing Karaf commands help.
+
+It looks for Karaf commands in the current project class loader and generates the help as displayed with the `--help`
+option in the Karaf shell console.
+
+===== Example
+
+The example below generates help for the commands in the current project:
+
+----
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>document-commands</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>commands-generate-help</goal>
+ </goals>
+ <configuration>
+ <targetFolder>${project.build.directory}/docbook/sources</targetFolder>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+===== Parameters
+
+|===
+|Name |Type |Description
+
+|`targetFolder`
+|`File`
+|The directory where the documentation output files are to be generated. Default value: ${project.build.directory}/docbkx/sources
+
+|`format`
+|`String`
+|The output format (docbx, asciidoc, or conf) of the commands documentation. Default value: docbx
+
+|`classLoader`
+|`String`
+|The class loader to use in loading the commands. Default value: ${project}
+|===
+
+=== Features and kar goals
+
+[NOTE]
+====
+You should use the features or kar packaging instead of these individual goals.
+====
+
+The `karaf-maven-plugin` provides several goals to help you create and validate features XML descriptors as well as leverage your features to create a custom Karaf distribution.
+
+==== `karaf:features-generate-descriptor`
+
+Except in unusual circumstances, use the `<packaging>feature</packaging>` to run this goal.
+
+The `karaf:features-generate-descriptor` goal generates a features XML file based on the Maven dependencies.
+By default, it will follow Maven transitive dependencies, stopping when it encounters bundles already present in features that are Maven dependencies.
+
+A record of the dependency tree search can be found in target/history/treeListing.txt.
+
+You can track dependency changes and warn or fail on change.
+
+===== Configuration
+
+Specify the packaging as a top level element
+
+----
+<packaging>feature</packaging>
+----
+
+You can supply a feature descriptor to extend in `src/main/feature/feature.xml`.
+
+|===
+|Parameter Name |Type |Description
+
+|aggregateFeatures
+|boolean (false)
+|Specifies processing of feature repositories that are (transitive) Maven dependencies.
+If false, all features in these repositories become dependencies of the generated feature.
+If true, all features in these repositories are copied into the generated feature repository.
+
+|startLevel
+|int
+|The start level for the bundles determined from Maven dependencies.
+This can be overridden by specifying the bundle in the source feature.xml with the desired startlevel.
+
+|includeTransitiveDependency
+|boolean (true)
+|Whether to follow Maven transitive dependencies.
+
+|checkDependencyChange
+|boolean (false)
+|Whether to record dependencies in `src/main/history/dependencies.xml` for change tracking.
+
+|warnOnDependencyChange
+|boolean (false)
+|whether to fail on changed dependencies (false, default) or warn in the build output (true).
+
+|logDependencyChanges
+|boolean (false)
+|If true, added and removed dependencies are shown in `target/history`.
+
+|overwriteChangedDependencies
+|boolean (false)
+|If true, the `src/main/history/dependencies.xml` file will be overwritten if it has changed.
+|===
+
+===== Example
+
+----
+<project>
+...
+ <packaging>feature</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache</groupId>
+ <artifactId>bundle1</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <startLevel>80</startLevel>
+ <aggregateFeatures>true</aggregateFeatures>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+==== `karaf:features-validate-descriptor`
+
+The `karaf:features-validate-descriptor` goal validates a features XML descriptor by checking if all the required imports
+for the bundles defined in the features can be matched to a provided export.
+
+By default, the plugin tries to add the Karaf core features (standard and enterprise) in the repositories set.
+It means that it's not required to explicitly define the Karaf features descriptor in the repository section of
+your features descriptor.
+
+===== Example
+
+The example below validates the features defined in the `target/features.xml` by checking all the imports and exports.
+It reads the definition for the packages that are exported by the system bundle from the `src/main/resources/config.properties` file.
+
+----
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>features-validate-descriptor</goal>
+ </goals>
+ <configuration>
+ <file>target/features.xml</file>
+ <karafConfig>src/main/resources/config.properties</karafConfig>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.4.3</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+===== Parameters
+
+|===
+|Name |Type |Description
+
+|`file`
+|`File`
+|The features XML descriptor file to validate. Default value: `${project.build.directory}/classes/features.xml`
+
+|`karafConfig`
+|`String`
+|The Karaf `config.properties` file to use during the validation process. Default value: `config.properties`
+
+|`jreVersion`
+|`String`
+|The JRE version that is used during the validation process. Default value: `jre-1.5`
+
+|`karafVersion`
+|`String`
+|The target Karaf version used to get the Karaf core features (standard and enterprise). Default is the version of the plugin
+
+|`repositories`
+|`String[]`
+|Additional features XML descriptors that will be used during the validation process
+|===
+
+==== `karaf:features-add-to-repository`
+
+Consider using the karaf-assembly packaging which makes it easy to assemble a custom distribution in one step instead
+of this individual goal.
+
+The `karaf:features-add-to-repository` goal adds all the required bundles for a given set of features into directory.
+You can use this goal to create a `/system` directory for building your own Karaf-based distribution.
+
+By default, the Karaf core features descriptors (standard and enterprise) are automatically included in the descriptors set.
+
+===== Example
+
+The example below copies the bundles for the `spring` and `war` features defined in the Karaf features XML descriptor
+into the `target/features-repo` directory.
+
+----
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+
+ <executions>
+ <execution>
+ <id>features-add-to-repo</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>features-add-to-repository</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>mvn:org.apache.karaf.features/standard/4.0.0/xml/features</descriptor>
+ <descriptor>mvn:my.groupid/my.artifactid/1.0.0/xml/features</descriptor>
+ </descriptors>
+ <features>
+ <feature>spring</feature>
+ <feature>war</feature>
+ <feature>my</feature>
+ </features>
+ <repository>target/features-repo</repository>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+===== Parameters
+
+|===
+|Name |Type |Description
+
+|`descriptors`
+|`String[]`
+|List of features XML descriptors where the features are defined
+
+|`features`
+|`String[]`
+|List of features that bundles should be copied to the repository directory
+
+|`repository`
+|`File`
+|The directory where the bundles will be copied by the plugin goal
+|===
+
+==== `karaf:create-kar`
+
+[NOTE]
+====
+Except in unusual circumstances, use the `<packaging>kar</packaging>` to run this goal.
+====
+
+The `karaf:kar` goal assembles a KAR archive from a features XML descriptor file, normally generated in the same project
+with the `karaf:features-generate-descriptor` goal.
+
+There are two important directories in a kar:
+
+* `repository/` contains a Maven structured repository of artifacts to be copied into the Karaf repository.
+The features descriptor and all the bundles mentioned in it are installed in this directory.
+* `resources/` contains other resources to be copied over the Karaf installation.
+
+Everything in `target/classes` is copied into the kar.
+Therefore resources you want installed into Karaf need to be in e.g. `src/main/resources/resources`.
+This choice is so other resources such as legal files from the maven-remote-resources-plugin can be included under
+META-INF in the kar, without getting installed into Karaf.
+
+===== Example
+
+----
+<project>
+...
+ <packaging>kar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <extensions>true</extensions>
+ <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+==== `karaf:install-kar`
+
+=== Instances and distributions goals
+
+[NOTE]
+====
+You should use the karaf-assembly packaging instead of this individual goal.
+====
+
+The `karaf-maven-plugin` helps you to build custom Karaf distributions or archives existing Karaf instances:
+
+==== `karaf:archive`
+
+[NOTE]
+====
+This goal is run as part of the karaf-assembly packaging.
+====
+
+The `karaf:archive` goal packages a Karaf instance archive from a given assembled instance.
+
+Both tar.gz and zip formats are generated in the destination folder.
+
+===== Example
+
+The example below create archives for the given Karaf instance:
+
+----
+<project>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <phase>package</phase>
+ <goals>
+ <goal>archive</goal>
+ </goals>
+ <configuration>
+ <destDir>${project.build.directory}</destDir>
+ <targetServerDirectory>${project.build.directory}/assembly</targetServerDirectory>
+ <targetFile>${project.file}</targetFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+----
+
+===== Parameters
+
+|===
+|Name |Type |Description
+
+|`destDir`
+|`File`
+| The target directory of the project. Default value: ${project.build.directory}
+
+|`targetServerDirectory`
+|`File`
+|The location of the server repository. Default value: ${project.build.directory}/assembly
+
+|`targetFile`
+|`File`
+|The target file to set as the project's artifact. Default value: ${project.file}
+|===
+
+==== `karaf:assembly`
+
+=== Run, client, deploy goals
+
+==== `karaf:run`
+
+==== `karaf:client`
+
+==== `karaf:deploy`
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/scripting.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/scripting.adoc b/manual/src/main/asciidoc/developer-guide/scripting.adoc
new file mode 100644
index 0000000..64dae18
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/scripting.adoc
@@ -0,0 +1,406 @@
+//
+// Licensed 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.
+//
+
+== Scripting
+
+In the console section of the users guide, we introduced the scripting support.
+
+=== Assignation
+
+You already know the first usage of scripting: execution of command.
+
+----
+karaf@root()> echo hello world
+hello world
+----
+
+You can also assign value to session variables:
+
+----
+karaf@root()> msg = "hello world"
+hello world
+----
+
+Once you have assigned a value to a variable, you can display this value using the "resolved" variable name:
+
+----
+karaf@root()> echo $msg
+hello world
+----
+
+The () are execution quotes (like the backquotes when you use bash on Unix).
+
+----
+karaf@root()> ($.context bundle 1) location
+mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/4.0.0
+----
+
+The `$.context` access the context variables in the current session.
+We access to the `bundle` variable (an array containing all bundles), and we want to display the bundle location for
+the bundle at the index 1 in the bundle array.
+
+=== Expressions
+
+The shell has a built-in expression parser. Expressions must be enclosed with the `%(...)` syntax.
+
+Examples:
+
+----
+karaf@root()> %(1+2)
+3
+karaf@root()> a = 0
+0
+karaf@root()> %(a+=1)
+1
+karaf@root()> %(a+=1)
+2
+karaf@root()> b=1
+1
+karaf@root()> %(SQRT(a^2 + b^2))
+1.7320508
+----
+
+==== Mathematical Operators
+
+|===
+|Operator |Description
+
+|+
+| Additive operator
+
+|-
+| Subtraction operator
+
+|*
+| Multiplication operator
+
+|/
+| Division operator
+
+|%
+| Remainder operator (Modulo)
+
+|^
+| Power operator
+|===
+
+==== Boolean Operators
+
+|===
+|Operator |Description
+
+|=
+| Equals
+
+|==
+| Equals
+
+|!=
+|Not equals
+
+|<>
+| Not equals
+
+|<
+| Less than
+
+|<=
+| Less than or equal to
+
+|>
+| Greater than
+
+|>=
+| Greater than or equal to
+
+|&&
+| Boolean and
+
+|\|\|
+|Boolean or
+|===
+
+==== Supported Functions
+
+|===
+|Function |Description
+
+|NOT(_expression_)
+|Boolean negation, 1 (means true) if the expression is not zero
+
+|IF(_condition_,_value_if_true_,_value_if_false_)
+|Returns one value if the condition evaluates to true or the other if it evaluates to false
+
+|RANDOM()
+|Produces a random number between 0 and 1
+
+|MIN(_e1_,_e2_)
+|Returns the smaller of both expressions
+
+|MAX(_e1_,_e2_)
+|Returns the bigger of both expressions
+
+|ABS(_expression_)
+|Returns the absolute (non-negative) value of the expression
+
+|ROUND(_expression_,precision)
+|Rounds a value to a certain number of digits, uses the current rounding mode
+
+|FLOOR(_expression_)
+|Rounds the value down to the nearest integer
+
+|CEILING(_expression_)
+|Rounds the value up to the nearest integer
+
+|LOG(_expression_)
+|Returns the natural logarithm (base e) of an expression
+
+|SQRT(_expression_)
+|Returns the square root of an expression
+
+|SIN(_expression_)
+|Returns the trigonometric sine of an angle (in degrees)
+
+|COS(_expression_)
+|Returns the trigonometric cosine of an angle (in degrees)
+
+|TAN(_expression_)
+|Returns the trigonometric tangens of an angle (in degrees)
+
+|SINH(_expression_)
+|Returns the hyperbolic sine of a value
+
+|COSH(_expression_)
+|Returns the hyperbolic cosine of a value
+
+|TANH(_expression_)
+|Returns the hyperbolic tangens of a value
+
+|RAD(_expression_)
+|Converts an angle measured in degrees to an approximately equivalent angle measured in radians
+
+|DEG(_expression_)
+|Converts an angle measured in radians to an approximately equivalent angle measured in degrees
+|===
+
+Functions names are case insensitive.
+
+==== Supported Constants
+
+|===
+|Constant |Description
+
+|PI
+|The value of _PI_, exact to 100 digits
+
+|TRUE
+|The value one
+
+|FALSE
+|The value zero
+|===
+
+=== List, maps, pipes and closures
+
+Using [], you can define array variable:
+
+----
+karaf@root()> list = [1 2 a b]
+1
+2
+a
+b
+
+----
+
+You can also create a map if you put variables assignation in the array:
+
+----
+karaf@root()> map = [Jan=1 Feb=2 Mar=3]
+Jan 1
+Feb 2
+Mar 3
+----
+
+Using the | character, you can pipe output from a command as an input to another one.
+
+For instance, you can access to the bundles context variables and send it as input to the grep command:
+
+----
+karaf@root()> ($.context bundles) | grep -i felix
+ 0|Active | 0|org.apache.felix.framework (4.2.1)
+ 21|Active | 11|org.apache.felix.fileinstall (3.2.6)
+ 43|Active | 10|org.apache.felix.configadmin (1.6.0)
+ 51|Active | 30|org.apache.felix.gogo.runtime (0.10.0)
+----
+
+You can assign name to script execution. It's what we use for alias:
+
+----
+karaf@root()> echo2 = { echo xxx $args yyy }
+echo xxx $args yyy
+karaf@root()> echo2 hello world
+xxx hello world yyy
+----
+
+=== Startup
+
+The `etc/shell.init.script` file is executed at startup in each shell session, allowing the definition of additional
+variables or aliases or even complex functions. It's like the bashrc or profile on Unix.
+
+=== Constants and variables
+
+Apache Karaf console provides a set of implicit constants and variables that you can use in your script.
+
+* `$.context` to access a bundle context
+* `$.variables` to access the list of defined variables
+* `$.commands` to access the list of defined commands
+
+The variables starting with a # that are defined as Function (such as closures) will be executed automatically:
+
+----
+karaf@root> \#inc = { var = "${var}i" ; $var }
+var = "${var}i" ; $var
+karaf@root> echo $inc
+i
+karaf@root> echo $inc
+ii
+karaf@root>
+----
+
+=== Built-in variables and commands
+
+Apache Karaf console provides built-in variable very useful for scripting:
+
+* `$args` retrieves the list of script parameters, given to the closure being executed
+* `$1 .. $999` retrieves the nth argument of the closure
+* `$it` (same as `$1`) is used in a loop to access the current iterator value
+
+Apache Karaf console provides commands for scripting:
+
+* `shell:if`
+* `shell:new`
+* `shell:each`
+* ...
+
+See the link:commands[full list of `shell` commands] for details.
+
+=== Leveraging existing Java capabilities (via reflection)
+
+Apache Karaf console supports loading and execution of Java classes.
+
+The `$karaf.lastException` implicit variable contains the latest Exception thrown.
+
+----
+karaf@root()> ($.context bundle) loadClass foo
+Error executing command: foo not found by org.apache.karaf.shell.console [17]
+karaf@root()> $karaf.lastException printStackTrace
+java.lang.ClassNotFoundException: foo not found by org.apache.karaf.shell.console [17]
+ at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
+ at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
+ at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
+ at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1723)
+ at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:926)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+ at java.lang.reflect.Method.invoke(Method.java:597)
+ at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
+ at org.apache.felix.gogo.runtime.Closure.executeMethod(Closure.java:527)
+ at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
+ at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
+ at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
+ at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
+ at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
+ at org.apache.karaf.shell.console.jline.Console.run(Console.java:166)
+ at java.lang.Thread.run(Thread.java:680)
+----
+
+It's possible to create objects to create commands "on the fly":
+
+----
+karaf@root()> addcommand system (($.context bundle) loadClass java.lang.System)
+karaf@root()> system:getproperty karaf.name
+root
+----
+
+It means that you can create object using the `new` directive, and call methods on the objects:
+
+----
+karaf@root> map = (new java.util.HashMap)
+karaf@root> $map put 0 0
+karaf@root> $map
+0 0
+----
+
+=== Examples
+
+The following examples show some scripts defined in `etc/shell.init.script`.
+
+The first example show a script to add a value into a configuration list:
+
+----
+#
+# Add a value at the end of a property in the given OSGi configuration
+#
+# For example:
+# > config-add-to-list org.ops4j.pax.url.mvn org.ops4j.pax.url.mvn.repositories http://scala-tools.org/repo-releases
+#
+config-add-to-list = {
+ config:edit $1 ;
+ a = (config:property-list | grep --color never $2 | tac) ;
+ b = (echo $a | grep --color never "\b$3\b" | tac) ;
+ if { ($b trim) isEmpty } {
+ if { $a isEmpty } {
+ config:property-set $2 $3
+ } {
+ config:property-append $2 ", $3"
+ } ;
+ config:update
+ } {
+ config:cancel
+ }
+}
+----
+
+This second example shows a script to wait for an OSGi service, up to a given timeout, and combine this script in
+other scripts:
+
+----
+#
+# Wait for the given OSGi service to be available
+#
+wait-for-service-timeout = {
+ _filter = $.context createFilter $1 ;
+ _tracker = shell:new org.osgi.util.tracker.ServiceTracker $.context $_filter null ;
+ $_tracker open ;
+ _service = $_tracker waitForService $2 ;
+ $_tracker close
+}
+#
+# Wait for the given OSGi service to be available with a timeout of 10 seconds
+#
+wait-for-service = {
+ wait-for-service-timeout $1 10000
+}
+#
+# Wait for the given command to be available with a timeout of 10 seconds
+# For example:
+# > wait-for-command dev watch
+#
+wait-for-command = {
+ wait-for-service "(&(objectClass=org.apache.felix.service.command.Function)(osgi.command.scope=$1)(osgi.command.function=$2))"
+}
+----
[19/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
KARAF-3679 - Switch documentation to asciidoc, close #65
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/3de05ae9
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3de05ae9
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3de05ae9
Branch: refs/heads/master
Commit: 3de05ae9a62e38535982977fe9987640321180db
Parents: 68186c4
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Tue Dec 29 15:14:29 2015 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Mon Jan 4 10:57:11 2016 +0100
----------------------------------------------------------------------
manual/pom.xml | 374 +----
manual/src/fallback/manual.html | 20 -
manual/src/fallback/manual.pdf | Bin 16576 -> 0 bytes
.../asciidoc/developer-guide/archetypes.adoc | 378 +++++
.../asciidoc/developer-guide/blueprint.adoc | 15 +
.../main/asciidoc/developer-guide/branding.adoc | 241 +++
.../main/asciidoc/developer-guide/connect.adoc | 96 ++
.../developer-guide/creating-bundles.adoc | 213 +++
.../developer-guide/custom-distribution.adoc | 650 +++++++
.../asciidoc/developer-guide/debugging.adoc | 199 +++
.../main/asciidoc/developer-guide/dev-cdi.adoc | 15 +
.../developer-guide/developer-commands.adoc | 242 +++
.../src/main/asciidoc/developer-guide/ds.adoc | 15 +
.../asciidoc/developer-guide/extending.adoc | 359 ++++
.../developer-guide/github-contributions.adoc | 81 +
.../developer-guide/karaf-maven-plugin.adoc | 486 ++++++
.../asciidoc/developer-guide/scripting.adoc | 406 +++++
.../developer-guide/security-framework.adoc | 842 ++++++++++
.../main/asciidoc/developer-guide/services.adoc | 15 +
.../asciidoc/developer-guide/writing-tests.adoc | 370 ++++
manual/src/main/asciidoc/images/asf-logo.png | Bin 0 -> 4735 bytes
manual/src/main/asciidoc/images/bg.png | Bin 0 -> 244 bytes
.../src/main/asciidoc/images/bg02-blue-left.png | Bin 0 -> 1068 bytes
.../main/asciidoc/images/bg02-blue-right.png | Bin 0 -> 1114 bytes
.../asciidoc/images/bg02-white-left-nogr.png | Bin 0 -> 951 bytes
.../asciidoc/images/bg02-white-right-nogr.png | Bin 0 -> 958 bytes
manual/src/main/asciidoc/images/big-bullet.png | Bin 0 -> 285 bytes
manual/src/main/asciidoc/images/deployer.png | Bin 0 -> 51372 bytes
.../src/main/asciidoc/images/jconsole_admin.jpg | Bin 0 -> 65713 bytes
.../main/asciidoc/images/jconsole_connect.jpg | Bin 0 -> 38238 bytes
.../main/asciidoc/images/jconsole_features.jpg | Bin 0 -> 63879 bytes
.../main/asciidoc/images/jconsole_memory.jpg | Bin 0 -> 64714 bytes
.../main/asciidoc/images/jconsole_overview.jpg | Bin 0 -> 72287 bytes
.../main/asciidoc/images/jconsole_summary.jpg | Bin 0 -> 119430 bytes
.../main/asciidoc/images/jconsole_threads.jpg | Bin 0 -> 62860 bytes
manual/src/main/asciidoc/images/karaf-logo.png | Bin 0 -> 20682 bytes
manual/src/main/asciidoc/images/karaf.png | Bin 0 -> 21494 bytes
manual/src/main/asciidoc/images/karaf2.png | Bin 0 -> 21494 bytes
.../main/asciidoc/images/left-box-bottom.png | Bin 0 -> 588 bytes
.../src/main/asciidoc/images/left-box-right.png | Bin 0 -> 213 bytes
.../src/main/asciidoc/images/left-box-top.png | Bin 0 -> 466 bytes
manual/src/main/asciidoc/index.adoc | 137 ++
manual/src/main/asciidoc/overview.adoc | 51 +
manual/src/main/asciidoc/quick-start.adoc | 181 ++
manual/src/main/asciidoc/update-notes.adoc | 171 ++
manual/src/main/asciidoc/user-guide/cdi.adoc | 75 +
.../asciidoc/user-guide/configugration.adoc | 384 +++++
.../src/main/asciidoc/user-guide/console.adoc | 460 +++++
.../src/main/asciidoc/user-guide/deployers.adoc | 235 +++
.../user-guide/directory-structure.adoc | 41 +
manual/src/main/asciidoc/user-guide/ejb.adoc | 91 +
.../src/main/asciidoc/user-guide/failover.adoc | 255 +++
manual/src/main/asciidoc/user-guide/http.adoc | 74 +
.../main/asciidoc/user-guide/installation.adoc | 167 ++
.../src/main/asciidoc/user-guide/instances.adoc | 390 +++++
manual/src/main/asciidoc/user-guide/jdbc.adoc | 224 +++
manual/src/main/asciidoc/user-guide/jms.adoc | 318 ++++
manual/src/main/asciidoc/user-guide/jndi.adoc | 224 +++
manual/src/main/asciidoc/user-guide/jpa.adoc | 44 +
manual/src/main/asciidoc/user-guide/jta.adoc | 120 ++
manual/src/main/asciidoc/user-guide/kar.adoc | 298 ++++
manual/src/main/asciidoc/user-guide/log.adoc | 607 +++++++
.../main/asciidoc/user-guide/monitoring.adoc | 287 ++++
manual/src/main/asciidoc/user-guide/obr.adoc | 373 ++++
.../main/asciidoc/user-guide/provisioning.adoc | 685 ++++++++
manual/src/main/asciidoc/user-guide/remote.adoc | 424 +++++
.../src/main/asciidoc/user-guide/security.adoc | 584 +++++++
.../main/asciidoc/user-guide/start-stop.adoc | 439 +++++
manual/src/main/asciidoc/user-guide/tuning.adoc | 159 ++
manual/src/main/asciidoc/user-guide/urls.adoc | 60 +
.../main/asciidoc/user-guide/webconsole.adoc | 61 +
.../main/asciidoc/user-guide/webcontainer.adoc | 292 ++++
.../src/main/asciidoc/user-guide/wrapper.adoc | 409 +++++
.../asciidoc/users-guide/adociguration.adoc | 365 ----
manual/src/main/asciidoc/users-guide/cdi.adoc | 102 --
.../src/main/asciidoc/users-guide/console.adoc | 427 -----
.../main/asciidoc/users-guide/deployers.adoc | 286 ----
.../users-guide/directory-structure.adoc | 35 -
manual/src/main/asciidoc/users-guide/ejb.adoc | 94 --
.../main/asciidoc/users-guide/enterprise.adoc | 35 -
.../src/main/asciidoc/users-guide/failover.adoc | 243 ---
.../src/main/asciidoc/users-guide/features.adoc | 64 -
manual/src/main/asciidoc/users-guide/http.adoc | 74 -
manual/src/main/asciidoc/users-guide/index.adoc | 77 -
.../main/asciidoc/users-guide/installation.adoc | 145 --
.../main/asciidoc/users-guide/instances.adoc | 379 -----
manual/src/main/asciidoc/users-guide/jdbc.adoc | 226 ---
manual/src/main/asciidoc/users-guide/jms.adoc | 304 ----
manual/src/main/asciidoc/users-guide/jndi.adoc | 219 ---
manual/src/main/asciidoc/users-guide/jpa.adoc | 40 -
manual/src/main/asciidoc/users-guide/jta.adoc | 119 --
manual/src/main/asciidoc/users-guide/kar.adoc | 304 ----
manual/src/main/asciidoc/users-guide/log.adoc | 565 -------
.../main/asciidoc/users-guide/migration.adoc | 66 -
.../main/asciidoc/users-guide/monitoring.adoc | 273 ---
manual/src/main/asciidoc/users-guide/obr.adoc | 373 ----
.../users-guide/provisioning-schema.adoc | 46 -
.../src/main/asciidoc/users-guide/remote.adoc | 423 -----
.../src/main/asciidoc/users-guide/security.adoc | 583 -------
.../main/asciidoc/users-guide/start-stop.adoc | 433 -----
.../src/main/asciidoc/users-guide/tuning.adoc | 159 --
.../src/main/asciidoc/users-guide/update.adoc | 19 -
manual/src/main/asciidoc/users-guide/urls.adoc | 58 -
.../main/asciidoc/users-guide/webconsole.adoc | 62 -
.../main/asciidoc/users-guide/webcontainer.adoc | 289 ----
.../src/main/asciidoc/users-guide/wrapper.adoc | 388 -----
manual/src/main/webapp/.livereload | 19 -
.../WEB-INF/scalate/layouts/default.scaml | 116 --
.../webapp/WEB-INF/scalate/layouts/print.ssp | 817 ---------
manual/src/main/webapp/WEB-INF/web.xml | 50 -
manual/src/main/webapp/_banner.ssp | 14 -
manual/src/main/webapp/_navigation.conf | 56 -
manual/src/main/webapp/_quicklinks.ssp | 8 -
manual/src/main/webapp/css/pygmentize.css | 134 --
manual/src/main/webapp/css/scalate/console.css | 71 -
manual/src/main/webapp/css/style.css | 1588 ------------------
.../webapp/developers-guide/archetypes.conf | 360 ----
.../main/webapp/developers-guide/branding.conf | 222 ---
.../main/webapp/developers-guide/connect.conf | 82 -
.../developers-guide/creating-bundles.conf | 198 ---
.../developers-guide/custom-distribution.conf | 625 -------
.../main/webapp/developers-guide/debugging.conf | 162 --
.../developers-guide/developer-commands.conf | 228 ---
.../main/webapp/developers-guide/extending.conf | 340 ----
.../developers-guide/github-contributions.conf | 73 -
.../src/main/webapp/developers-guide/index.conf | 18 -
...raf-maven-plugin-commands-generate-help.conf | 41 -
...maven-plugin-features-add-to-repository.conf | 52 -
.../karaf-maven-plugin-features-create-kar.conf | 33 -
...ven-plugin-features-generate-descriptor.conf | 58 -
...ven-plugin-features-validate-descriptor.conf | 50 -
...af-maven-plugin-instance-create-archive.conf | 43 -
.../developers-guide/karaf-maven-plugin.conf | 70 -
.../main/webapp/developers-guide/scripting.conf | 305 ----
.../developers-guide/security-framework.conf | 695 --------
.../main/webapp/developers-guide/services.conf | 1 -
.../webapp/developers-guide/writing-tests.conf | 328 ----
manual/src/main/webapp/images/asf-logo.png | Bin 4735 -> 0 bytes
manual/src/main/webapp/images/bg.png | Bin 244 -> 0 bytes
.../src/main/webapp/images/bg02-blue-left.png | Bin 1068 -> 0 bytes
.../src/main/webapp/images/bg02-blue-right.png | Bin 1114 -> 0 bytes
.../main/webapp/images/bg02-white-left-nogr.png | Bin 951 -> 0 bytes
.../webapp/images/bg02-white-right-nogr.png | Bin 958 -> 0 bytes
manual/src/main/webapp/images/big-bullet.png | Bin 285 -> 0 bytes
manual/src/main/webapp/images/deployer.png | Bin 51372 -> 0 bytes
.../src/main/webapp/images/jconsole_admin.jpg | Bin 65713 -> 0 bytes
.../src/main/webapp/images/jconsole_connect.jpg | Bin 38238 -> 0 bytes
.../main/webapp/images/jconsole_features.jpg | Bin 63879 -> 0 bytes
.../src/main/webapp/images/jconsole_memory.jpg | Bin 64714 -> 0 bytes
.../main/webapp/images/jconsole_overview.jpg | Bin 72287 -> 0 bytes
.../src/main/webapp/images/jconsole_summary.jpg | Bin 119430 -> 0 bytes
.../src/main/webapp/images/jconsole_threads.jpg | Bin 62860 -> 0 bytes
manual/src/main/webapp/images/karaf-logo.png | Bin 20682 -> 0 bytes
manual/src/main/webapp/images/karaf.png | Bin 21494 -> 0 bytes
manual/src/main/webapp/images/karaf2.png | Bin 21494 -> 0 bytes
.../src/main/webapp/images/left-box-bottom.png | Bin 588 -> 0 bytes
.../src/main/webapp/images/left-box-right.png | Bin 213 -> 0 bytes
manual/src/main/webapp/images/left-box-top.png | Bin 466 -> 0 bytes
manual/src/main/webapp/index.conf | 11 -
manual/src/main/webapp/manual.conf | 87 -
manual/src/main/webapp/overview.conf | 37 -
manual/src/main/webapp/quick-start.conf | 162 --
manual/src/main/webapp/update-notes.conf | 126 --
manual/src/main/webapp/users-guide/cdi.conf | 61 -
.../main/webapp/users-guide/configuration.conf | 368 ----
manual/src/main/webapp/users-guide/console.conf | 443 -----
.../src/main/webapp/users-guide/deployers.conf | 223 ---
.../webapp/users-guide/directory-structure.conf | 25 -
manual/src/main/webapp/users-guide/ejb.conf | 80 -
.../src/main/webapp/users-guide/enterprise.conf | 21 -
.../src/main/webapp/users-guide/failover.conf | 230 ---
.../src/main/webapp/users-guide/features.conf | 52 -
manual/src/main/webapp/users-guide/http.conf | 60 -
manual/src/main/webapp/users-guide/index.conf | 30 -
.../main/webapp/users-guide/installation.conf | 128 --
.../src/main/webapp/users-guide/instances.conf | 365 ----
manual/src/main/webapp/users-guide/jdbc.conf | 210 ---
manual/src/main/webapp/users-guide/jms.conf | 300 ----
manual/src/main/webapp/users-guide/jndi.conf | 205 ---
manual/src/main/webapp/users-guide/jpa.conf | 26 -
manual/src/main/webapp/users-guide/jta.conf | 105 --
manual/src/main/webapp/users-guide/kar.conf | 284 ----
manual/src/main/webapp/users-guide/log.conf | 551 ------
.../src/main/webapp/users-guide/monitoring.conf | 265 ---
manual/src/main/webapp/users-guide/obr.conf | 359 ----
.../webapp/users-guide/provisioning-schema.conf | 46 -
.../main/webapp/users-guide/provisioning.conf | 670 --------
manual/src/main/webapp/users-guide/remote.conf | 409 -----
.../src/main/webapp/users-guide/security.conf | 569 -------
.../src/main/webapp/users-guide/start-stop.conf | 419 -----
manual/src/main/webapp/users-guide/tuning.conf | 145 --
manual/src/main/webapp/users-guide/update.conf | 5 -
manual/src/main/webapp/users-guide/urls.conf | 43 -
.../src/main/webapp/users-guide/webconsole.conf | 48 -
.../main/webapp/users-guide/webcontainer.conf | 275 ---
manual/src/main/webapp/users-guide/wrapper.conf | 395 -----
pom.xml | 4 -
197 files changed, 12973 insertions(+), 22338 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/pom.xml
----------------------------------------------------------------------
diff --git a/manual/pom.xml b/manual/pom.xml
index 9e9b119..90fccc8 100644
--- a/manual/pom.xml
+++ b/manual/pom.xml
@@ -23,117 +23,11 @@
<artifactId>manual</artifactId>
<name>Apache Karaf :: Manual</name>
- <packaging>war</packaging>
-
- <properties>
- <must-succeed>false</must-succeed>
- <manual.dir>${project.build.directory}/manual</manual.dir>
- <manual>${manual.dir}/manual-${project.version}</manual>
- <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
- <jetty-port>8080</jetty-port>
- <jetty-war-dir>${project.build.directory}/webapp/</jetty-war-dir>
- <scalate.version>1.4.0</scalate.version>
- <wikitext.version>1.3</wikitext.version>
- <scalate.editor>${env.SCALATE_EDITOR}</scalate.editor>
- <scalate.mode>production</scalate.mode>
- <scalate.workdir>${project.build.directory}/scalateWorkDir</scalate.workdir>
- <karaf.version>${project.version}</karaf.version>
- <maven.wagon.version>1.0-beta-6</maven.wagon.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.fusesource.scalate</groupId>
- <artifactId>scalate-wikitext</artifactId>
- <version>${scalate.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-library</artifactId>
- <version>2.8.1</version>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-compiler</artifactId>
- <version>2.8.1</version>
- </dependency>
- </dependencies>
+ <packaging>pom</packaging>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <configuration>
- <useDefaultDelimiters>false</useDefaultDelimiters>
- <delimiters>
- <delimiter>${*}</delimiter>
- </delimiters>
- </configuration>
- <executions>
- <execution>
- <id>filter</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/webapp</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/webapp</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/webapp</source>
- </sources>
- </configuration>
- </execution>
- <!--
- <execution>
- <id>attach-artifacts</id>
- <phase>install</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${manual}.html</file>
- <type>html</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- -->
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${project.version}</version>
@@ -145,8 +39,8 @@
<goal>commands-generate-help</goal>
</goals>
<configuration>
- <format>conf</format>
- <targetFolder>${project.build.directory}/webapp/commands/</targetFolder>
+ <format>asciidoc</format>
+ <targetFolder>${project.build.directory}/generated-docs/commands/</targetFolder>
<classLoader>plugin</classLoader>
</configuration>
</execution>
@@ -306,90 +200,32 @@
</dependency>
</dependencies>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>${project.build.directory}/webapp/</directory>
- </resource>
- </webResources>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>7.1.5.v20100705</version>
- <configuration>
- <!-- When editing the conf files, you can comment this line to run
- mvn jetty:run
- to have a live web site
- -->
- <webAppSourceDirectory>${jetty-war-dir}</webAppSourceDirectory>
-
- <systemProperties>
- <systemProperty>
- <name>scalate.editor</name>
- <value>${scalate.editor}</value>
- </systemProperty>
- <systemProperty>
- <name>scalate.workdir</name>
- <value>${scalate.workdir}</value>
- </systemProperty>
- <systemProperty>
- <name>scalate.mode</name>
- <value>${scalate.mode}</value>
- </systemProperty>
- </systemProperties>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.4.0</version>
+ <groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctor-maven-plugin</artifactId>
+ <version>1.5.2</version>
<executions>
<execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
+ <id>output-html</id>
+ <phase>generate-resources</phase>
<goals>
- <goal>manifest</goal>
+ <goal>process-asciidoc</goal>
</goals>
+ <configuration>
+ <sourceHighlighter>coderay</sourceHighlighter>
+ <backend>html5</backend>
+ <attributes>
+ <toc />
+ <linkcss>false</linkcss>
+ <doctype>book</doctype>
+ </attributes>
+ </configuration>
</execution>
</executions>
<configuration>
- <supportedProjectTypes>
- <supportedProjectType>jar</supportedProjectType>
- <supportedProjectType>bundle</supportedProjectType>
- <supportedProjectType>war</supportedProjectType>
- </supportedProjectTypes>
- <instructions>
- <Import-Package>
- javax.servlet,
- javax.servlet.http,
- javax.servlet.jsp;resolution:=optional,
- javax.servlet.jsp.el;resolution:=optional,
- org.apache.commons.logging;resolution:=optional;provider=paxlogging,
- org.apache.commons.logging.impl;resolution:=optional;provider=paxlogging,
- org.apache.log4j;resolution:=optional;provider=paxlogging,
- org.apache.log4j.spi;resolution:=optional;provider=paxlogging,
- org.apache.log4j.xml;resolution:=optional;provider=paxlogging,
- org.slf4j;resolution:=optional;provider=paxlogging,
- org.slf4j.helpers;resolution:=optional;provider=paxlogging,
- org.slf4j.spi;resolution:=optional;provider=paxlogging,
- org.osgi.framework,
- javax.swing.tree,
- org.osgi.service.packageadmin
- </Import-Package>
- <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
- <Embed-Directory>WEB-INF/lib</Embed-Directory>
- <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
- <Embed-Transitive>true</Embed-Transitive>
- <Web-ContextPath>/karaf-doc</Web-ContextPath>
- </instructions>
+ <sourceDirectory>src/main/asciidoc</sourceDirectory>
+ <headerFooter>true</headerFooter>
+ <imagesDir>../resources/images</imagesDir>
</configuration>
</plugin>
<plugin>
@@ -397,107 +233,17 @@
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.0-beta-2</version>
<configuration>
- <checkinComment>[scm-publish] Updating main site with Karaf manual</checkinComment>
+ <checkinComment>[scm-publish] Updating main site with Karaf documentation</checkinComment>
<pubScmUrl>scm:svn:https://svn.apache.org/repos/asf/karaf/site/production/manual/latest</pubScmUrl>
- <content>${project.build.directory}/sitegen</content>
+ <content>${project.build.directory}/generated-docs</content>
</configuration>
</plugin>
</plugins>
</build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.fusesource.scalate</groupId>
- <artifactId>maven-scalate-plugin</artifactId>
- <version>${scalate.version}</version>
- </plugin>
- </plugins>
- </reporting>
-
<profiles>
<profile>
- <id>live</id>
- <properties>
- <jetty-war-dir>${basedir}/src/main/webapp/</jetty-war-dir>
- <scalate.mode>development</scalate.mode>
- </properties>
- </profile>
- <profile>
- <id>scalate-manual</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.fusesource.scalate</groupId>
- <artifactId>maven-scalate-plugin</artifactId>
- <version>${scalate.version}</version>
- <executions>
- <execution>
- <id>generate-htmls</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>sitegen-no-fork</goal>
- </goals>
- <configuration>
- <warSourceDirectory>${project.build.directory}/webapp</warSourceDirectory>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <remoteServerId>people.apache.org</remoteServerId>
- <remoteServerUrl>scp://people.apache.org/www/karaf.apache.org/manual/${karaf.version}
- </remoteServerUrl>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh</artifactId>
- <version>${maven.wagon.version}</version>
- </dependency>
- <dependency>
- <groupId>org.fusesource.wikitext</groupId>
- <artifactId>confluence-core</artifactId>
- <version>${wikitext.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>create-manual</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <mkdir dir="${manual.dir}" />
- <move file="${project.build.directory}/sitegen/manual.html" tofile="${manual}.html" />
- <echo message="Generating PDF using Prince XML (http://www.princexml.com/)" />
- <exec executable="prince">
- <arg value="${manual}.html" />
- <arg value="${manual}.pdf" />
- <arg value="--log" />
- <arg value="${project.build.directory}/prince.log" />
- </exec>
- <attachartifact file="${manual}.html" type="html" />
- <attachartifact file="${manual}.pdf" type="pdf" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>pdf-manual</id>
+ <id>pdf</id>
<build>
<plugins>
<plugin>
@@ -512,85 +258,25 @@
</goals>
<configuration>
<tasks>
- <mkdir dir="${manual.dir}" />
- <move file="${project.build.directory}/sitegen/manual.html" tofile="${manual}.html" />
+ <mkdir dir="target" />
+ <copy file="${project.build.directory}/generated-docs/index.html" tofile="target/documentation.html" />
<echo message="Generating PDF using Prince XML (http://www.princexml.com/)" />
<exec executable="prince">
- <arg value="${manual}.html" />
- <arg value="${manual}.pdf" />
+ <arg value="target/documentation.html" />
+ <arg value="target/documentation.pdf" />
<arg value="--log" />
<arg value="${project.build.directory}/prince.log" />
</exec>
+ <attachartifact file="target/documentation.html" type="html"/>
+ <attachartifact file="target/documentation.pdf" type="pdf"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>install</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${manual}.pdf</file>
- <type>pdf</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</profile>
- <profile>
- <id>asciidoc</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.asciidoctor</groupId>
- <artifactId>asciidoctor-maven-plugin</artifactId>
- <version>1.5.2</version>
- <executions>
- <execution>
- <id>output-html</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>process-asciidoc</goal>
- </goals>
- <configuration>
- <sourceHighlighter>coderay</sourceHighlighter>
- <backend>html5</backend>
- <attributes>
- <toc />
- <linkcss>false</linkcss>
- <doctype>book</doctype>
- </attributes>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <sourceDirectory>src/main/asciidoc</sourceDirectory>
- <headerFooter>true</headerFooter>
- <imagesDir>../resources/images</imagesDir>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>release</id>
- <properties>
- <must-succeed>true</must-succeed>
- </properties>
- </profile>
</profiles>
</project>
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/fallback/manual.html
----------------------------------------------------------------------
diff --git a/manual/src/fallback/manual.html b/manual/src/fallback/manual.html
deleted file mode 100644
index 4aa3dbd..0000000
--- a/manual/src/fallback/manual.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-
- 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.
--->
-<div class="wiki-content">
- Unable to generate manual.
-</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/fallback/manual.pdf
----------------------------------------------------------------------
diff --git a/manual/src/fallback/manual.pdf b/manual/src/fallback/manual.pdf
deleted file mode 100644
index 72f3d80..0000000
Binary files a/manual/src/fallback/manual.pdf and /dev/null differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/archetypes.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/archetypes.adoc b/manual/src/main/asciidoc/developer-guide/archetypes.adoc
new file mode 100644
index 0000000..3584338
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/archetypes.adoc
@@ -0,0 +1,378 @@
+//
+// Licensed 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.
+//
+
+== Archetypes
+
+Karaf provides archetypes to easily create commands, manage features or repository and create a kar archive.
+This section describes each of them and explain How to use it.
+
+=== Create a command (karaf-command-archetype)
+
+This archetype creates a Maven skeleton project that you will use to develop new Karaf commands.
+
+==== Command line
+
+Using the command line, we can create our project:
+
+----
+mvn archetype:generate \
+ -DarchetypeGroupId=org.apache.karaf.archetypes \
+ -DarchetypeArtifactId=karaf-command-archetype \
+ -DarchetypeVersion=4.0.0 \
+ -DgroupId=com.mycompany \
+ -DartifactId=com.mycompany.command \
+ -Dversion=1.0-SNAPSHOT \
+ -Dpackage=com.mycompany.package
+----
+
+==== Additional parameters
+
+During the maven creation process, additional questions will be asked on the console :
+
+* Define value for property 'command': the name of the command (list, add-item, ...)
+* Define value for property 'description': provide a description of the command that you want to create.
+This description will be displayed in the Karaf console when the parameter --help is used
+* Define value for property 'scope': this value represents the family name to which the command belongs
+(features, osgi, admin, jaas, ...)
+
+==== Result of Maven command execution
+
+----
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-command-archetype:4.0.0] found in catalog local
+[INFO] Using property: groupId = com.mycompany
+[INFO] Using property: artifactId = com.mycompany.command
+[INFO] Using property: version = 1.0-SNAPSHOT
+[INFO] Using property: package = com.mycompany.package
+Define value for property 'command': : list
+Define value for property 'description': : List sample command
+Define value for property 'scope': : my
+Confirm properties configuration:
+groupId: com.mycompany
+artifactId: com.mycompany.command
+version: 1.0-SNAPSHOT
+package: com.mycompany.package
+command: list
+description: List sample command
+scope: my
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: karaf-command-archetype:4.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.command
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: scope, Value: my
+[INFO] Parameter: description, Value: List sample command
+[INFO] Parameter: command, Value: list
+[INFO] Parameter: artifactId, Value: com.mycompany.command
+[WARNING] Don't override file /com.mycompany.command/pom.xml
+[INFO] project created from Archetype in dir: /com.mycompany.command
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 27.204s
+[INFO] Finished at: Mon Dec 19 09:38:49 CET 2011
+[INFO] Final Memory: 7M/111M
+[INFO] ------------------------------------------------------------------------
+----
+
+Next, you can import your project in Eclipse/IntelliJ and developp the Karaf command.
+
+=== Create an OSGi bundle (karaf-bundle-archetype)
+
+This archetype creates a Maven skeleton to create an OSGi bundle, including a bundle Activator (a special callback
+class for bundle start/stop).
+
+==== Command line
+
+Using the command line, we can create our project:
+
+----
+mvn archetype:generate \
+ -DarchetypeGroupId=org.apache.karaf.archetypes \
+ -DarchetypeArtifactId=karaf-bundle-archetype \
+ -DarchetypeVersion=4.0.0 \
+ -DgroupId=com.mycompany \
+ -DartifactId=com.mycompany.bundle \
+ -Dversion=1.0-SNAPSHOT \
+ -Dpackage=com.mycompany.package
+----
+
+==== Result of Maven command execution
+
+----
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-bundle-archetype:4.0.0] found in catalog local
+[INFO] Using property: groupId = com.mycompany
+[INFO] Using property: artifactId = com.mycompany.bundle
+[INFO] Using property: version = 1.0-SNAPSHOT
+[INFO] Using property: package = com.mycompany.package
+Confirm properties configuration:
+groupId: com.mycompany
+artifactId: com.mycompany.bundle
+version: 1.0-SNAPSHOT
+package: com.mycompany.package
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: karaf-bundle-archetype:4.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.bundle
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.bundle
+[INFO] project created from Archetype in dir: /com.mycompany.bundle
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 7.895s
+[INFO] Finished at: Mon Dec 19 11:41:44 CET 2011
+[INFO] Final Memory: 8M/111M
+[INFO] ------------------------------------------------------------------------
+----
+
+=== Create an OSGi blueprint bundle (karaf-blueprint-archetype)
+
+This archetype creates a Maven skeleton project to create an OSGi blueprint bundle, including a sample bean exposed as
+an OSGi service in the blueprint XML descriptor.
+
+==== Command line
+
+Using the command line, we can create our project:
+
+----
+mvn archetype:generate \
+ -DarchetypeGroupId=org.apache.karaf.archetypes \
+ -DarchetypeArtifactId=karaf-blueprint-archetype \
+ -DarchetypeVersion=4.0.0 \
+ -DgroupId=com.mycompany \
+ -DartifactId=com.mycompany.blueprint \
+ -Dversion=1.0-SNAPSHOT \
+ -Dpackage=com.mycompany.blueprint
+----
+
+==== Result of Maven command execution
+
+----
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-blueprint-archetype:4.0.0] found in catalog local
+[INFO] Using property: groupId = com.mycompany
+[INFO] Using property: artifactId = com.mycompany.blueprint
+[INFO] Using property: version = 1.0-SNAPSHOT
+[INFO] Using property: package = com.mycompany.package
+Confirm properties configuration:
+groupId: com.mycompany
+artifactId: com.mycompany.blueprint
+version: 1.0-SNAPSHOT
+package: com.mycompany.package
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: karaf-blueprint-archetype:4.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.blueprint
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.blueprint
+[INFO] project created from Archetype in dir: /com.mycompany.blueprint
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 1:06:36.741s
+[INFO] Finished at: Mon Dec 19 13:04:43 CET 2011
+[INFO] Final Memory: 7M/111M
+[INFO] ------------------------------------------------------------------------
+----
+
+=== Create a features XML (karaf-feature-archetype)
+
+This archetype creates a Maven skeleton project which create a features XML file, using the dependencies that you define
+in the POM.
+
+==== Command line
+
+Using the command line, we can create our project:
+
+----
+mvn archetype:generate \
+ -DarchetypeGroupId=org.apache.karaf.archetypes \
+ -DarchetypeArtifactId=karaf-feature-archetype \
+ -DarchetypeVersion=4.0.0 \
+ -DgroupId=my.company \
+ -DartifactId=my.company.feature \
+ -Dversion=1.0-SNAPSHOT \
+ -Dpackage=my.company.package
+----
+
+==== Result of maven command execution
+
+----
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-feature-archetype:4.0.0] found in catalog local
+[INFO] Using property: groupId = com.mycompany
+[INFO] Using property: artifactId = com.mycompany.feature
+[INFO] Using property: version = 1.0-SNAPSHOT
+[INFO] Using property: package = com.mycompany.package
+Confirm properties configuration:
+groupId: com.mycompany
+artifactId: com.mycompany.feature
+version: 1.0-SNAPSHOT
+package: com.mycompany.package
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: karaf-feature-archetype:4.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.feature
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.feature
+[INFO] project created from Archetype in dir: /com.mycompany.feature
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 7.262s
+[INFO] Finished at: Mon Dec 19 13:20:00 CET 2011
+[INFO] Final Memory: 7M/111M
+[INFO] ------------------------------------------------------------------------
+----
+
+=== Create a KAR file (karaf-kar-archetype)
+
+This archetype creates a Maven skeleton project including a features XML sample, used to generate a KAR file.
+
+==== Command line
+
+Using the command line, we can create our project:
+
+----
+mvn archetype:generate \
+ -DarchetypeGroupId=org.apache.karaf.archetypes \
+ -DarchetypeArtifactId=karaf-kar-archetype \
+ -DarchetypeVersion=4.0.0 \
+ -DgroupId=com.mycompany \
+ -DartifactId=com.mycompany.kar \
+ -Dversion=1.0-SNAPSHOT \
+ -Dpackage=com.mycompany.package
+----
+
+==== Result of maven command execution
+
+----
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-kar-archetype:4.0.0] found in catalog local
+[INFO] Using property: groupId = com.mycompany
+[INFO] Using property: artifactId = com.mycompany.kar
+[INFO] Using property: version = 1.0-SNAPSHOT
+[INFO] Using property: package = com.mycompany.package
+Confirm properties configuration:
+groupId: com.mycompany
+artifactId: com.mycompany.kar
+version: 1.0-SNAPSHOT
+package: com.mycompany.package
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: karaf-kar-archetype:4.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.kar
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
+[INFO] Parameter: package, Value: com.mycompany.package
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.mycompany
+[INFO] Parameter: artifactId, Value: com.mycompany.kar
+[INFO] project created from Archetype in dir: /com.mycompany.kar
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 7.465s
+[INFO] Finished at: Mon Dec 19 13:30:15 CET 2011
+[INFO] Final Memory: 8M/157M
+[INFO] ------------------------------------------------------------------------
+----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/blueprint.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/blueprint.adoc b/manual/src/main/asciidoc/developer-guide/blueprint.adoc
new file mode 100644
index 0000000..88abccc
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/blueprint.adoc
@@ -0,0 +1,15 @@
+//
+// Licensed 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.
+//
+
+== Blueprint
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/branding.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/branding.adoc b/manual/src/main/asciidoc/developer-guide/branding.adoc
new file mode 100644
index 0000000..da2cff8
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/branding.adoc
@@ -0,0 +1,241 @@
+//
+// Licensed 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.
+//
+
+== Branding
+
+=== Console
+
+You can "brand" the Apache Karaf console.
+
+By branding, it means that you can define your own:
+
+* the welcome message (motd or Message Of The Day) displayed when you start the console
+* the prompt displayed to the users
+
+There are 2 ways of branding the Karaf console:
+
+. adding a branding.properties file to etc
+. creating a branding bundle.
+
+=== Adding a branding.properties file to etc
+
+Create a `etc/branding.properties` file similar to:
+
+----
+welcome = \
+\u001B[36m __ __ ____ \u001B[0m\r\n\
+\u001B[36m / //_/____ __________ _/ __/ \u001B[0m\r\n\
+\u001B[36m / ,< / __ `/ ___/ __ `/ /_ \u001B[0m\r\n\
+\u001B[36m / /| |/ /_/ / / / /_/ / __/ \u001B[0m\r\n\
+\u001B[36m /_/ |_|\\__,_/_/ \\__,_/_/ \u001B[0m\r\n\
+\r\n\
+\u001B[1m Apache Karaf\u001B[0m (4.0.0)\r\n\
+\r\n\
+Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\r\n\
+ and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\r\n\
+Hit '\u001B[1m<ctrl-d>\u001B[0m' or '\u001B[1mosgi:shutdown\u001B[0m' to shutdown Karaf.\r\n
+
+prompt = \u001B[1m${USER}@${APPLICATION}\u001B[0m>
+----
+
+Start Karaf and you will see your branded Karaf console.
+
+=== Branding bundle
+
+At startup, Apache Karaf is looking for a bundle which exports the `org.apache.karaf.branding` package, containing
+a `branding.properties` file.
+
+Basically, a branding bundle is a very simple bundle, just containing a `org/apache/karaf/branding/branding.properties`
+file.
+
+It's easy to create such branding bundle using Apache Maven.
+
+The following `pom.xml` creates a branding bundle:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>your.group.id</groupId>
+ <artifactId>your.branding.artifact.id</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>Your Branding Bundle Name</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId}</bundle-SymbolicName>
+ <Import-Package>*</Import-Package>
+ <Private-Package>!*</Private-Package>
+ <Export-Package>
+ org.apache.karaf.branding
+ </Export-Package>
+ <Spring-Context>*;public-context:=false</Spring-Context>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+You can put your `branding.properties` file in the project resources (`src/main/resources/org/apache/karaf/branding/branding.properties`):
+
+----
+welcome = This is my Karaf brand\r\n
+prompt = Hey ${USER}>
+----
+
+For instance, the default Apache Karaf branding properties file contains:
+
+----
+welcome = \
+\u001B[36m __ __ ____ \u001B[0m\r\n\
+\u001B[36m / //_/____ __________ _/ __/ \u001B[0m\r\n\
+\u001B[36m / ,< / __ `/ ___/ __ `/ /_ \u001B[0m\r\n\
+\u001B[36m / /| |/ /_/ / / / /_/ / __/ \u001B[0m\r\n\
+\u001B[36m /_/ |_|\\__,_/_/ \\__,_/_/ \u001B[0m\r\n\
+\r\n\
+\u001B[1m Apache Karaf\u001B[0m (${project.version})\r\n\
+\r\n\
+Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\r\n\
+ and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\r\n\
+Hit '\u001B[1m<ctrl-d>\u001B[0m' or type '\u001B[1msystem:shutdown\u001B[0m' or '\u001B[1mlogout\u001B[0m' to shutdown Karaf.\r\n
+----
+
+As you can see, the `branding.properties` contains two properties:
+
+* welcome is the welcome message displayed when you start Apache Karaf console.
+* prompt is the string used to display the console prompt. This string supports variables:
+** ${USER` defines the user name of the prompt. Caveat -- the user name is presently static and hardcoded to "karaf",
+however you can override here with your own static user name.
+** $`APPLICATION` defines the Karaf instance name.
+
+As you can see, both strings support ASCII escaped format. For instance \u001B[1m switches the foreground in bold
+and \u001B[0m switch back to normal.
+
+Some examples of customized prompt examples follow:
+
+----
+# Define a user with fancy colors
+prompt = \u001B[36mmy-karaf-user\u001B[0m\u001B[1m@\u001B[0m\u001B[34m${APPLICATION}\u001B[0m>
+----
+
+----
+# Static sober prompt
+prompt = my-user@my-karaf>
+----
+
+=== Installing the branding bundle
+
+Thanks to the `pom.xml`, we can use `mvn` to build the branding bundle:
+
+----
+mvn install
+----
+
+You just have to drop the file in the `lib` directory:
+
+----
+cp branding.jar /opt/apache-karaf-4.0.0/lib/karaf-branding.jar
+----
+
+You can now start Apache Karaf to see your branded console.
+
+=== WebConsole
+
+It's also possible to brand the Apache Karaf WebConsole.
+
+You have to create a bundle, fragment of the Apache Karaf WebConsole.
+
+This WebConsole branding bundle contains a `META-INF/webconsole.properties` containing branding properties:
+
+----
+#
+# This file contains branding properties to overwrite the default
+# branding of the Apache Felix Web Console when deployed in an
+# Apache Karaf application.
+
+
+webconsole.brand.name = My Web Console
+
+webconsole.product.name = My Karaf
+webconsole.product.url = http://karaf.apache.org/
+webconsole.product.image = /res/karaf/imgs/logo.png
+
+webconsole.vendor.name = The Apache Software Foundation
+webconsole.vendor.url = http://www.apache.org
+webconsole.vendor.image = /res/karaf/imgs/logo.png
+
+webconsole.favicon = /res/karaf/imgs/favicon.ico
+webconsole.stylesheet = /res/karaf/ui/webconsole.css
+
+----
+
+The bundle also provides the css stylesheet and images defined in this properties file.
+
+As for console, you can use the following `pom.xml` to create the WebConsole branding bundle:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>my.group.id</groupId>
+ <artifactId>branding</artifactId>
+ <packaging>bundle</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-DocURL>http://felix.apache.org/site/apache-karaf.html</Bundle-DocURL>
+ <Fragment-Host>org.apache.karaf.webconsole.console;bundle-version="[3,4)"</Fragment-Host>
+ <Export-Package>!*</Export-Package>
+ <Import-Package>
+ javax.servlet;version=2.4,
+ javax.servlet.http;version=2.4,
+ !org.apache.felix.webconsole*,
+ org.apache.aries.blueprint,
+ org.osgi.service.blueprint.container,
+ org.osgi.service.blueprint.reflect,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+With the `webconsole` feature installed, you can install this bundle (using `bundle:install` or by editing the
+`etc/startup.properties`), you will see the WebConsole with your branding.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/connect.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/connect.adoc b/manual/src/main/asciidoc/developer-guide/connect.adoc
new file mode 100644
index 0000000..98881bf
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/connect.adoc
@@ -0,0 +1,96 @@
+//
+// Licensed 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.
+//
+
+== Programmatically connect
+
+As described in the users guide, Apache Karaf supports remote access to both the console (by embedding a SSHd server) and
+the management layer.
+
+=== To the console
+
+You can write a Apache Karaf remote console client in Java (or other language).
+
+Accessing to a remote Apache Karaf console means writing a SSH client. This SSH client can be in pure Java or in
+another language.
+
+For instance, the `bin/client` script starts a SSH client written in Java.
+
+The following code is a simple code to create a SSH client:
+
+----
+import org.apache.sshd.ClientChannel;
+import org.apache.sshd.ClientSession;
+import org.apache.sshd.SshClient;
+import org.apache.sshd.client.future.ConnectFuture;
+
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+ String host = "localhost";
+ int port = 8101;
+ String user = "karaf";
+ String password = "karaf";
+
+ SshClient client = null;
+ try {
+ client = SshClient.setUpDefaultClient();
+ client.start();
+ ConnectFuture future = client.connect(host, port);
+ future.await();
+ ClientSession session = future.getSession();
+ session.authPassword(user, password);
+ ClientChannel channel = session.createChannel("shell");
+ channel.setIn(System.in);
+ channel.setOut(System.out);
+ channel.setErr(System.err);
+ channel.open();
+ channel.waitFor(ClientChannel.CLOSED, 0);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ System.exit(1);
+ } finally {
+ try {
+ client.stop();
+ } catch (Throwable t) { }
+ }
+ System.exit(0);
+ }
+
+}
+----
+
+=== To the management layer
+
+The Apache Karaf management layer uses JMX. Apache Karaf embeds a JMX MBeanServer that you can use remotely.
+
+In order to use the MBeanServer remotely, you have to write a JMX client.
+
+The following example shows a simple JMX client stopping Apache Karaf remotely via the JMX layer:
+
+----
+javax.management.*;
+
+public class Main {
+
+ public static void main(String[] args) throws Exception {
+ JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root");
+ JMXConnector connector = JMXConnectorFactory.connect(url, null);
+ MBeanServerConnection mbeanServer = connector.getMBeanServerConnection();
+ ObjectName systemMBean = new ObjectName("org.apache.karaf:type=system,name=karaf-root");
+ mbeanServer.invoke(systemMBean, "halt", null, null);
+ connector.close();
+ }
+
+}
+----
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc b/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
new file mode 100644
index 0000000..2388968
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/creating-bundles.adoc
@@ -0,0 +1,213 @@
+//
+// Licensed 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.
+//
+
+== Basic bundle creation using the Felix maven-bundle-plugin
+
+Create a bundle instead of a normal jar by using a Maven POM file like this:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>my.groupId</groupId>
+ <artifactId>my.bundle</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>My Bundle</name>
+ <description>My bundle short description</description>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.4.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ ...
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+=== Add extended information to bundles
+
+Karaf supports a OSGI-INF/bundle.info file in a bundle.
+This file is extended description of the bundle.
+It supports ASCII character declarations (for adding color, formatting, etc) and some simple Wiki syntax.
+
+Simply add a `src/main/resources/OSGI-INF/bundle.info` file containing, for instance:
+
+----
+== SYNOPSIS
+ ${project.description}
+
+== DESCRIPTION
+ Long description of your bundle, including usage, etc.
+
+==SEE ALSO
+ [http://yourside\]
+ [http://yourside/docs\]
+----
+
+You can display this extended information using:
+
+----
+root@karaf> bundles:info
+----
+
+=== Wiki Syntax
+
+Karaf supports some simple wiki syntax in bundle info files:
+
+----
+==, ===, ... : Headings
+* : Enumerations
+[http://....] : links
+----
+
+== Creating bundles for non OSGi third party dependencies
+
+=== Dynamically wrapping jars
+
+Karaf supports the wrap: protocol execution.
+
+It allows for directly deploying third party dependencies, like Apache Commons Lang:
+
+----
+root@karaf> bundles:install wrap:mvn:commons-lang/commons-lang/2.4
+----
+
+The wrap protocol creates a bundle dynamically using the bnd. Confiugurations can be added in the wrap URL:
+
+* from the shell
+
+----
+root@karaf> bundles:install 'wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&Bundle-Version=2.4'
+----
+
+* from features.xml
+
+----
+<bundle>wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&Bundle-Version=2.4</bundle>
+----
+
+=== Statically bundling jars
+
+You can also create a wrap bundle for a third party dependency.
+This bundle is simply a Maven POM that shades an existing jar and package into a jar bundle.
+
+For instance, to create an OSGi bundle that wraps Apache Commons Lang, simply define the following Maven POM:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>osgi.commons-lang</groupId>
+ <artifactId>osgi.commons-lang</artifactId>
+ <version>2.4</version>
+ <packaging>bundle</packaging>
+ <name>commons-lang OSGi Bundle</name>
+ <description>This OSGi bundle simply wraps commons-lang-2.4.jar artifact.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>commons-lang:commons-lang</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>commons-lang:commons-lang</artifact>
+ <excludes>
+ <exclude>**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+ <createDependencyReducedPom>true</createDependencyReducedPom>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Export-Package></Export-Package>
+ <Import-Package></Import-Package>
+ <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+ <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders>
+ </instructions>
+ <unpackBundle>true</unpackBundle>
+ </configuration>
+ </plugin>
+ </build>
+
+</project>
+----
+
+The resulting OSGi bundle can now be deployed directly:
+
+----
+root@karaf> bundles:install -s mvn:osgi.commons-lang/osgi.commons-lang/2.4
+----
\ No newline at end of file
[12/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/adociguration.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/adociguration.adoc b/manual/src/main/asciidoc/users-guide/adociguration.adoc
deleted file mode 100644
index c66a538..0000000
--- a/manual/src/main/asciidoc/users-guide/adociguration.adoc
+++ /dev/null
@@ -1,365 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Configuration
-
-== Files
-
-Apache Karaf stores and loads all configuration in files located in the `etc` folder.
-
-By default, the `etc` folder is located relatively to the `KARAF_BASE` folder. You can define another location
-using the `KARAF_ETC` variable.
-
-Each configuration is identified by a ID (the ConfigAdmin PID). The configuration files name follows the `pid.cfg`
-name convention.
-
-For instance, `etc/org.apache.karaf.shell.cfg` means that this file is the file used by the configuration with
-`org.apache.karaf.shell` as PID.
-
-A configuration file is a properties file containing key/value pairs:
-
-----
-property=value
-----
-
-In Apache Karaf, a configuration is PID with a set of properties attached.
-
-Apache Karaf automatically loads all `*.cfg` files from the `etc` folder.
-
-You can configure the behaviour of the configuration files using some dedicated properties in the
-`etc/config.properties` configuration file:
-
-----
-...
-#
-# Configuration FileMonitor properties
-#
-felix.fileinstall.enableConfigSave = true
-felix.fileinstall.dir = ${karaf.etc}
-felix.fileinstall.filter = .*\\.cfg
-felix.fileinstall.poll = 1000
-felix.fileinstall.noInitialDelay = true
-felix.fileinstall.log.level = 3
-...
-----
-
-* `felix.fileinstall.enableConfigSave` flush back in the configuration file the changes performed directly on the
-configuration service (ConfigAdmin). If `true`, any change (using `config:*` commands, MBeans, OSGi service) is
-persisted back in the configuration false. Default is `true`.
-* `felix.fileinstall.dir` is the directory where Apache Karaf is looking for configuration files. Default is `${karaf.etc`}
-meaning the value of the `KARAF_ETC` variable.
-* `felix.fileinstall.filter` is the file name pattern used to load only some configuration files. Only files matching
-the pattern will be loaded. Default value is `.*\\.cfg` meaning *.cfg files.
-* `felix.fileinstall.poll` is the polling interval (in milliseconds). Default value is `1000` meaning that Apache
-Karaf "re-loads" the configuration files every second.
-* `felix.fileinstall.noInitialDelay` is a flag indicating if the configuration file polling starts as soon as Apache
-Karaf starts or wait for a certain time. If `true`, Apache Karaf polls the configuration files as soon as the configuration
-service starts.
-* `felix.fileinstall.log.level` is the log message verbosity level of the configuration polling service. More
-this value is high, more verbose the configuration service is.
-
-You can change the configuration at runtime by directly editiing the configuration file.
-
-You can also do the same using the `config:*` commands or the ConfigMBean.
-
-== `config:*` commands
-
-Apache Karaf provides a set of commands to manage the configuration.
-
-=== `config:list`
-
-`config:list` displays the list of all configurations available, or the properties in a given configuration (PID).
-
-Without the `query` argument, the `config:list` command display all configurations, with PID, attached bundle and
-properties defined in the configuration:
-
-----
-karaf@root()> config:list
-----------------------------------------------------------------
-Pid: org.apache.karaf.service.acl.command.system.start-level
-BundleLocation: mvn:org.apache.karaf.shell/org.apache.karaf.shell.console/3.0.0
-Properties:
- service.guard = (&(osgi.command.scope=system)(osgi.command.function=start-level))
- * = *
- start-level = admin # admin can set any start level, including < 100
- start-level[/[^0-9]*/] = viewer # viewer can obtain the current start level
- execute[/.*/,/[^0-9]*/] = viewer # viewer can obtain the current start level
- execute = admin # admin can set any start level, including < 100
- service.pid = org.apache.karaf.service.acl.command.system.start-level
- start-level[/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
- execute[/.*/,/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-...
-----
-
-The `query` argument accepts a query using a LDAP syntax.
-
-For instance, you can display details on one specific configuration using the following filter:
-
-----
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-=== `config:edit`
-
-`config:edit` is the first command to do when you want to change a configuration. `config:edit` command put you
-in edition mode for a given configuration.
-
-For instance, you can edit the `org.apache.karaf.log` configuration:
-
-----
-karaf@root()> config:edit org.apache.karaf.log
-----
-
-The `config:edit` command doesn't display anything, it just puts you in configuration edit mode. You are now ready
-to use other config commands (like `config:property-append`, `config:property-delete`, `config:property-set`, ...).
-
-If you provide a configuration PID that doesn't exist yet, Apache Karaf will create a new configuration (and so a new
-configuration file) automatically.
-
-All changes that you do in configuration edit mode are store in your console session: the changes are not directly
-applied in the configuration. It allows you to "commit" the changes (see `config:update` command) or "rollback" and
-cancel your changes (see `config:cancel` command).
-
-=== `config:property-list`
-
-The `config:property-list` lists the properties for the currently edited configuration.
-
-Assuming that you edited the `org.apache.karaf.log` configuration, you can do:
-
-----
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-=== `config:property-set`
-
-The `config:property-set` command update the value of a given property in the currently edited configuration.
-
-For instance, to change the value of the `size` property of previously edited `org.apache.karaf.log` configuration,
-you can do:
-
-----
-karaf@root()> config:property-set size 1000
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 1000
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-If the property doesn't exist, the `config:property-set` command creates the property.
-
-You can use `config:property-set` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
-
-----
-karaf@root()> config:property-set -p org.apache.karaf.log size 1000
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 1000
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-{warning}
-Using the `pid` option, you bypass the configuration commit and rollback mechanism.
-{warning}
-
-=== `config:property-append`
-
-The `config:property-append` is similar to `config:property-set` command, but instead of completely replacing the
-property value, it appends a string at the end of the property value.
-
-For instance, to add 1 at the end of the value of the `size` property in `org.apache.karaf.log` configuration
-(and so have 5001 for the value instead of 500), you can do:
-
-----
-karaf@root()> config:property-append size 1
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 5001
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-Like the `config:property-set` command, if the property doesn't exist, the `config:property-set` command creates
-the property.
-
-You can use the `config:property-append` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
-
-----
-karaf@root()> config:property-append -p org.apache.karaf.log size 1
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 5001
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-{warning}
-Using the `pid` option, you bypass the configuration commit and rollback mechanism.
-{warning}
-
-=== `config:property-delete`
-
-The `config:property-delete` command delete a property in the currently edited configuration.
-
-For instance, you previously added a `test` property in `org.apache.karaf.log` configuration. To delete this `test`
-property, you do:
-
-----
-karaf@root()> config:property-set test test
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
- test = test
-karaf@root()> config:property-delete test
-karaf@root()> config:property-list
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-You can use the `config:property-delete` command outside the configuration edit mode, by specifying the `-p` (for configuration pid) option:
-
-----
-karaf@root()> config:property-delete -p org.apache.karaf.log test
-----
-
-=== `config:update` and `config:cancel`
-
-When you are in the configuration edit mode, all changes that you do using `config:property*` commands are stored in "memory"
-(actually in the console session).
-
-Thanks to that, you can "commit" your changes using the `config:update` command. The `config:update` command will
-commit your changes, update the configuration, and (if possible) update the configuration files.
-
-For instance, after changing `org.apache.karaf.log` configuration with some `config:property*` commands, you have
-to commit your change like this:
-
-----
-karaf@root()> config:edit org.apache.karaf.log
-karaf@root()> config:property-set test test
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
- test = test
-----
-
-On the other hand, if you want to "rollback" your changes, you can use the `config:cancel` command. It will cancel all
-changes that you did, and return of the configuration state just before the `config:edit` command. The `config:cancel`
-exits from the edit mode.
-
-For instance, you added the test property in the `org.apache.karaf.log` configuration, but it was a mistake:
-
-----
-karaf@root()> config:edit org.apache.karaf.log
-karaf@root()> config:property-set test test
-karaf@root()> config:cancel
-karaf@root()> config:list "(service.pid=org.apache.karaf.log)"
-----------------------------------------------------------------
-Pid: org.apache.karaf.log
-BundleLocation: mvn:org.apache.karaf.log/org.apache.karaf.log.core/3.0.0
-Properties:
- service.pid = org.apache.karaf.log
- size = 500
- pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
- felix.fileinstall.filename = file:/opt/apache-karaf-3.0.0/etc/org.apache.karaf.log.cfg
-----
-
-=== `config:delete`
-
-The `config:delete` command completely delete an existing configuration. You don't have to be in edit mode to delete
-a configuration.
-
-For instance, you added `my.config` configuration:
-
-----
-karaf@root()> config:edit my.config
-karaf@root()> config:property-set test test
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=my.config)"
-----------------------------------------------------------------
-Pid: my.config
-BundleLocation: null
-Properties:
- service.pid = my.config
- test = test
-----
-
-You can delete the `my.config` configuration (including all properties in the configuration) using the `config:delete`
-command:
-
-----
-karaf@root()> config:delete my.config
-karaf@root()> config:list "(service.pid=my.config)"
-karaf@root()>
-----
-
-== JMX ConfigMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the configurations: the ConfigMBean.
-
-The ConfigMBean object name is: `org.apache.karaf:type=config,name=*`.
-
-=== Attributes
-
-The `Configs` attribute is a list of all configuration PIDs.
-
-=== Operations
-
-* `listProperties(pid)` returns the list of properties (property=value formatted) for the configuration `pid`.
-* `deleteProperty(pid, property)` deletes the `property` from the configuration `pid`.
-* `appendProperty(pid, property, value)` appends `value` at the end of the value of the `property` of the configuration `pid`.
-* `setProperty(pid, property, value)` sets `value` for the value of the `property` of the configuration `pid`.
-* `delete(pid)` deletes the configuration identified by the `pid`.
-* `create(pid)` creates an empty (without any property) configuration with `pid`.
-* `update(pid, properties)` updates a configuration identified with `pid` with the provided `properties` map.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/cdi.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/cdi.adoc b/manual/src/main/asciidoc/users-guide/cdi.adoc
deleted file mode 100644
index 43b3123..0000000
--- a/manual/src/main/asciidoc/users-guide/cdi.adoc
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// Licensed 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.
-//
-
-= CDI
-
-This section described how to add support of CDI, and embed a CDI container in Apache Karaf. It doesn't describe
-how to develop CDI applications. See the developer guide for that.
-
-== Pax CDI
-
-Apache Karaf supports different CDI containers by using Pax CDI.
-
-Pax CDI is pre-referenced in Apache Karaf. To register the Pax CDI features, you can do:
-
-----
-karaf@root()> feature:repo-add pax-cdi
-----
-
-This command will register the latest pax-cdi features.
-
-You can see now a set of new CDI features available:
-
-----
-karaf@root()> feature:list|grep -i cdi
-openwebbeans | 1.2.1 | | | enterprise-4.0.0-SNAPSHOT | Apache OpenWebBeans CDI container support
-weld | 2.1.1.Final | | | enterprise-4.0.0-SNAPSHOT | JBoss Weld CDI container support
-pax-cdi | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Provide CDI support
-pax-cdi-1.1 | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Provide CDI 1.1 support
-pax-cdi-1.2 | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Provide CDI 1.2 support
-pax-cdi-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld CDI support
-pax-cdi-1.1-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld CDI 1.1 support
-pax-cdi-1.2-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld CDI 1.2 support
-pax-cdi-openwebbeans | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | OpenWebBeans CDI support
-pax-cdi-web | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Web CDI support
-pax-cdi-1.1-web | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Web CDI 1.1 support
-pax-cdi-1.2-web | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Web CDI 1.2 support
-pax-cdi-web-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld Web CDI support
-pax-cdi-1.1-web-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld Web CDI 1.1 support
-pax-cdi-1.2-web-weld | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | Weld Web CDI 1.2 support
-pax-cdi-web-openwebbeans | 0.8.0 | | | org.ops4j.pax.cdi-0.8.0 | OpenWebBeans Web CDI support
-deltaspike-core | 1.0.0 | | | org.ops4j.pax.cdi-0.8.0 | Apache Deltaspike core support
-deltaspike-jpa | 1.0.0 | | | org.ops4j.pax.cdi-0.8.0 | Apache Deltaspike jpa support
-----
-
-{warning}
-Starting from Apache Karaf 3.0.1, the `feature:repo-add pax-cdi` command is no more required.
-Pax CDI features are now automatically included in the Apache Karaf enterprise features.
-{warning}
-
-== CDI Containers
-
-Thanks to Pax CDI, Apache Karaf supports multiple CDI implementation versions, and different CDI containers.
-
-You just have to install the feature corresponding to the CDI container and version that you want to use.
-
-=== Apache OpenWebBeans
-
-Apache Karaf provides a ready to use feature for Apache OpenWebBeans.
-
-The `openwebbeans` feature automatically install the Pax CDI features and the Apache OpenWebBeans bundles:
-
-----
-karaf@root()> feature:install openwebbeans
-----
-
-{warning}
-With Apache Karaf 3.0.0, don't forget to register the pax-cdi features repository first with:
-
-----
-karaf@root()> feature:repo-add pax-cdi
-----
-{warning}
-
-=== JBoss Weld CDI container
-
-Apache Karaf provides a ready to use feature for JBoss Weld.
-
-The `weld` feature automatically install the Pax CDI features and the JBoss Weld bundles:
-
-----
-karaf@root()> feature:install weld
-----
-
-{warning}
-With Apache Karaf 3.0.0, don't forget to register the pax-cdi features repository first with:
-
-----
-karaf@root()> feature:repo-add pax-cdi
-----
-{warning}
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/console.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/console.adoc b/manual/src/main/asciidoc/users-guide/console.adoc
deleted file mode 100644
index 92a6531..0000000
--- a/manual/src/main/asciidoc/users-guide/console.adoc
+++ /dev/null
@@ -1,427 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Using the console
-
-== Available commands
-
-To see a list of the available commands in the console, you can use the `help`:
-
-----
-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
-...
-----
-
-You have the list of all commands with a short description.
-
-You can use the tab key to get a quick list of all commands:
-
-----
-karaf@root()> Display all 280 possibilities? (y or n)
-...
-----
-
-== Subshell and completion mode
-
-The commands have a scope and a name. For instance, the command `feature:list` has `feature` as scope, and `list` as name.
-
-Karaf "groups" the commands by scope. Each scope form a subshell.
-
-You can directly execute a command with its full qualified name (scope:name):
-
-----
-karaf@root()> feature:list
-...
-----
-
-or enter in a subshell and type the command contextual to the subshell:
-
-----
-karaf@root()> feature
-karaf@root(feature)> list
-----
-
-You can note that you enter in a subshell directly by typing the subshell name (here `feature`). You can "switch" directly from a subshell to another:
-
-----
-karaf@root()> feature
-karaf@root(feature)> bundle
-karaf@root(bundle)>
-----
-
-The prompt displays the current subshell between ().
-
-The `exit` command goes to the parent subshell:
-
-----
-karaf@root()> feature
-karaf@root(feature)> exit
-karaf@root()>
-----
-
-The completion mode defines the behaviour of the tab key and the help command.
-
-You have three different modes available:
-
-* GLOBAL
-* FIRST
-* SUBSHELL
-
-You can define your default completion mode using the completionMode property in `etc/org.apache.karaf.shell.cfg` file. By default, you have:
-
-----
-completionMode = GLOBAL
-----
-
-You can also change the completion mode “on the fly” (while using the Karaf shell console) using the `shell:completion` command:
-
-----
-karaf@root()> shell:completion
-GLOBAL
-karaf@root()> shell:completion FIRST
-karaf@root()> shell:completion
-FIRST
-----
-
-`shell:completion` can inform you about the current completion mode used. You can also provide the new completion mode that you want.
-
-GLOBAL completion mode is the default one in Karaf 3.0.0 (mostly for transition purpose).
-
-GLOBAL mode doesn’t really use subshell: it’s the same behavior as in previous Karaf versions.
-
-When you type the tab key, whatever in which subshell you are, the completion will display all commands and all aliases:
-
-----
-karaf@root()> <TAB>
-karaf@root()> Display all 273 possibilities? (y or n)
-...
-karaf@root()> feature
-karaf@root(feature)> <TAB>
-karaf@root(feature)> Display all 273 possibilities? (y or n)
-----
-
-FIRST completion mode is an alternative to the GLOBAL completion mode.
-
-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).
-However, if you type the tab key when you are in a subshell, the completion will display only the commands of the current subshell:
-
-----
-karaf@root()> shell:completion FIRST
-karaf@root()> <TAB>
-karaf@root()> Display all 273 possibilities? (y or n)
-...
-karaf@root()> feature
-karaf@root(feature)> <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)> <TAB>
-karaf@root(log)>
-clear display exception-display get log set tail
-----
-
-SUBSHELL completion mode is the real subshell mode.
-
-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.
-Once you are in a subshell, if you type the TAB key, the completion displays the commands of the current subshell:
-
-----
-karaf@root()> shell:completion SUBSHELL
-karaf@root()> <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)> <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)> <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
-----
-
-== Unix like environment
-
-Karaf console provides a full Unix like environment.
-
-=== Help or man
-
-We already saw the usage of the `help` command to display all commands available.
-
-But you can also use the `help` command to get details about a command or
-the `man` command which is an alias to the `help` command.
-You can also use another form to get the command help, by using the `--help` option to the command.
-
-So these commands
-
-----
-karaf@root()> help feature:list
-karaf@root()> man feature:list
-karaf@root()> feature:list --help
-----
-
-All produce the same help output:
-----
-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
-
-----
-
-=== Completion
-
-When you type the tab key, Karaf tries to complete:
-
-* subshell
-* commands
-* aliases
-* command arguments
-* command options
-
-=== Alias
-
-An alias is another name associated to a given command.
-
-The `shell:alias` command creates a new alias. For instance, to create the `list-installed-features` alias to the actual
-`feature:list -i` command, you can do:
-
-----
-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
-----
-
-At login, the Apache Karaf console reads the `etc/shell.init.script` file where you can create your aliases.
-It's similar to a bashrc or profile file on Unix.
-
-----
-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 } ;
-----
-
-You can see here the aliases available by default:
-
-* `ld` is a short form to display log (alias to `log:display` command)
-* `lde` is a short form to display exceptions (alias to `log:exception-display` command)
-* `la` is a short form to list all bundles (alias to `bundle:list -t 0` command)
-* `ls` is a short form to list all services (alias to `service:list` command)
-* `cl` is a short form to list all configurations (alias to `config:list` command)
-* `halt` is a short form to shutdown Apache Karaf (alias to `system:shutdown -h -f` command)
-* `help` is a short form to display help (alias to `*:help` command)
-* `man` is the same as help (alias to `help` command)
-* `log:list` displays all loggers and level (alias to `log:get ALL` command)
-
-You can create your own aliases in the `etc/shell.init.script` file.
-
-=== Key binding
-
-Like on most Unix environment, Karaf console support some key bindings:
-
-* the arrows key to navigate in the commands history
-* CTRL-D to logout/shutdown Karaf
-* CTRL-R to search previously executed command
-* CTRL-U to remove the current line
-
-=== Pipe
-
-You can pipe the output of one command as input to another one. It's a pipe, using the | character:
-
-----
-karaf@root()> feature:list | grep -i war
-war | 3.0.0 | | standard-3.0.0 | Turn Karaf as a full WebContainer
-----
-
-=== Grep, more, find, ...
-
-Karaf console provides some core commands similar to Unix environment:
-
-* `shell:head` displays the first line of the input
-* `shell:source` executes commands contained in a script
-* `shell:alias` creates an alias to an existing command
-* `shell:history` prints the commands history
-* `shell:cat` displays the content of a file or URL
-* `shell:if` allows you to use conditions (if, then, else blocks) in script
-* `shell:tac` captures stdin and returns it as a string
-* `shell:clear` clears the current console display
-* `shell:info` prints various information about the current Karaf instance
-* `shell:tail` displays the last lines of the input
-* `shell:completion` displays or change the current completion mode
-* `shell:java` executes a Java application
-* `shell:threads` prints the current thread
-* `shell:date` displays the current date (optionally using a format)
-* `shell:watch` periodically executes a command and refresh the output
-* `shell:each` executes a closure on a list of arguments
-* `shell:env` displays or sets the value of a shell session variable
-* `shell:more` is a file pager
-* `shell:wc` prints newline, words, and byte counts for each file
-* `shell:echo` echoes and prints arguments to stdout
-* `shell:new` creates a new Java object
-* `shell:edit` calls a text editor on the current file or URL
-* `shell:printf` formats and prints arguments
-* `shell:exec` executes a system command
-* `shell:sleep` sleeps for a bit then wakes up
-* `shell:grep` prints lines matching the given pattern
-* `shell:sort` writes sorted concatenation of all files to stdout
-
-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.
-So you can use 'head' instead of 'shell:head'
-
-Again, you can find details and all options of these commands using `help` command or `--help` option.
-
-=== Scripting
-
-The Apache Karaf Console supports a complete scripting language, similar to bash or csh on Unix.
-
-The `each` (`shell:each`) command can iterate in a list:
-
-----
-karaf@root()> list = [1 2 3]; each ($list) { echo $it }
-1
-2
-3
-----
-
-You can create the list yourself (as in the previous example), or some commands can return a list too.
-
-We can note that the console created a "session" variable with the name `list` that you can access with `$list`.
-
-The `$it` variable is an implicit one corresponding to the current object (here the current iterated value from the
-list).
-
-When you create a list with `[]`, Apache Karaf console creates a Java ArrayList. It means that you can use methods
-available in the ArrayList objects (like get or size for instance):
-
-----
-karaf@root()> list = ["Hello" world]; echo ($list get 0) ($list get 1)
-Hello world
-----
-
-We can note here that calling a method on an object is directly using `(object method argument)`.
-Here `($list get 0)` means `$list.get(0)` where `$list` is the ArrayList.
-
-The `class` notation will display details about the object:
-
-----
-karaf@root()> $list class
-...
-ProtectionDomain ProtectionDomain null
- null
- <no principals>
- java.security.Permissions@6521c24e (
- ("java.security.AllPermission" "<all permissions>" "<all actions>")
-)
-
-
-Signers null
-SimpleName ArrayList
-TypeParameters [E]
-----
-
-You can "cast" a variable to a given type.
-
-----
-karaf@root()> ("hello world" toCharArray)
-[h, e, l, l, o, , w, o, r, l, d]
-----
-
-If it fails, you will see the casting exception:
-
-----
-karaf@root()> ("hello world" toCharArray)[0]
-Error executing command: [C cannot be cast to [Ljava.lang.Object;
-----
-
-You can "call" a script using the `shell:source` command:
-
-----
-karaf@root> shell:source script.txt
-True!
-----
-
-where `script.txt` contains:
-
-----
-foo = "foo"
-if { $foo equals "foo" } {
- echo "True!"
-}
-----
-
-{warning}
-The spaces are important when writing script.
-For instance, the following script is not correct:
-
-----
-if{ $foo equals "foo" } ...
-----
-
-and will fail with:
-
-----
-karaf@root> shell:source script.txt
-Error executing command: Cannot coerce echo "true!"() to any of []
-----
-
-because a space is missing after the `if` statement.
-{warning}
-
-As for the aliases, you can create init scripts in the `etc/shell.init.script` file.
-You can also named you script with an alias. Actually, the aliases are just scripts.
-
-See the Scripting section of the developers guide for details.
-
-== Security
-
-The Apache Karaf console supports a Role Based Access Control (RBAC) security mechanism. It means that depending of
-the user connected to the console, you can define, depending of the user's groups and roles, the permission to execute
-some commands, or limit the values allowed for the arguments.
-
-Console security is detailed in the [Security section|security] of this user guide.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/deployers.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/deployers.adoc b/manual/src/main/asciidoc/users-guide/deployers.adoc
deleted file mode 100644
index 34403ff..0000000
--- a/manual/src/main/asciidoc/users-guide/deployers.adoc
+++ /dev/null
@@ -1,286 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Deployers
-
-The following picture describes the architecture of the deployers.
-
-!/images/deployer.png!
-
-Apache Karaf polls the `deploy` folder for new files.
-
-You can configure the location of the `deploy` folder, and the polling behaviour in the `etc/org.apache.felix.fileinstall-deploy.cfg`
-configuration file:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-felix.fileinstall.dir = ${karaf.base}/deploy
-felix.fileinstall.tmpdir = ${karaf.data}/generated-bundles
-felix.fileinstall.poll = 1000
-felix.fileinstall.start.level = 80
-felix.fileinstall.active.level = 80
-----
-
-* `felix.fileinstall.dir` defines the location of the `deploy` folder. Default value is `KARAF_BASE/deploy`.
-* `felix.fileinstall.tmpdir` defines a temporary folder where the deployers store their files. Default value is `KARAF_DATA/generated-bundles`.
-* `felix.fileinstall.poll` defines the polling interval (in milliseconds). Default value is 1 second.
-
-When Apache Karaf polls a file from the `deploy` folder, it "delegates" the file handling to a deployer.
-
-By default, Apache Karaf provides a set of deployers:
-
-* Blueprint deployer is able to handle Blueprint XML files.
-* Spring deployer is able to handle Spring XML files.
-* Features deployer is able to handle Apache Karaf features XML files (see [Provisioning section|provisioning] for details).
-* KAR deployer is able to handle KAR files (see [KAR section|kar] for details).
-* Wrap deployer is able to handle non-OSGi jar files and turns it as OSGi bundles "on the fly".
-* Optionally, WAR deployer (if you install the war feature) is able to handle WAR files.
-
-== Blueprint deployer
-
-The Blueprint deployer is able to handle plain Blueprint XML configuration files.
-
-The Blueprint deployer is able to transform "on the fly" any Blueprint XML file into valid OSGi bundle.
-
-The generated OSGi MANIFEST will contain the following headers:
-
-----
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Import-Package: [required packages]
-DynamicImport-Package: *
-----
-
-The `name` and `version` of the file are extracted using a heuristic that will match common patterns.
-
-For example `my-config-1.0.1.xml` will lead to `name = my-config` and `version = 1.0.1`.
-
-The default imported packages are extracted from the spring file definition and includes all classes referenced directly.
-
-If you need to customize the generated manifest, you can do so by including an xml element in your blueprint configuration:
-
-{code:lang=xml}
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
- Require-Bundle= my-bundle
- </manifest>
-----
-
-== Spring deployer
-
-The Spring deployer is similar to the Blueprint deployer.
-
-The Spring deployer is able to deploy Spring XML files.
-
-Like the Blueprint deployer, the generated OSGi MANIFEST will contain the following headers:
-
-----
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Spring-Context: *;publish-context:=false;create-asynchronously:=true
-Import-Package: [required packages]
-DynamicImport-Package: *
-----
-
-If you need to customize the generated manifest, you can do so by including a XML element in your Spring configuration:
-
-{code:lang=xml}
-<spring:beans ...>
- <manifest xmlns="http://karaf.apache.org/xmlns/deployer/spring/v1.0.0">
- Require-Bundle= my-bundle
- </manifest>
-----
-
-== Features deployer
-
-See the [Provisioning section|provisioning] for details.
-
-== KAR deployer
-
-See the [KAR section|kar] for details.
-
-== War deployer
-
-The installation of the WAR feature enables a WAR deployer.
-
-It means that with the war feature installed, Apache Karaf is a complete OSGi WebContainer (like Tomcat) where
-you can deploy WAB (WebApplication Bundle) or pure WAR (WebApplication aRchive).
-
-You can install the war feature with:
-
-----
-karaf@root()> feature:install -v war
-Installing feature war 3.0.0
-Installing feature pax-war 3.0.5
-Installing feature pax-http-whiteboard 3.0.5
-Installing feature pax-http 3.0.5
-Installing feature pax-jetty 8.1.14.v20131031
-Found installed bundle: org.apache.servicemix.specs.activation-api-1.1 [81]
-Found installed bundle: org.apache.geronimo.specs.geronimo-servlet_3.0_spec [82]
-Found installed bundle: javax.mail [83]
-Found installed bundle: org.apache.geronimo.specs.geronimo-jta_1.1_spec [84]
-Found installed bundle: org.apache.geronimo.specs.geronimo-annotation_1.1_spec [85]
-Found installed bundle: org.apache.geronimo.specs.geronimo-jaspic_1.0_spec [86]
-Found installed bundle: org.apache.servicemix.bundles.asm [87]
-Found installed bundle: org.eclipse.jetty.aggregate.jetty-all-server [88]
-Checking configuration file mvn:org.ops4j.pax.web/pax-web-features/3.0.5/xml/jettyconfig
-Installing bundle mvn:org.ops4j.base/ops4j-base-lang/1.4.0
-Found installed bundle: org.ops4j.pax.swissbox.core [89]
-Found installed bundle: org.ops4j.pax.swissbox.optional.jcl [90]
-Found installed bundle: org.apache.xbean.bundleutils [91]
-Found installed bundle: org.apache.xbean.asm-shaded [92]
-Found installed bundle: org.apache.xbean.reflect [93]
-Found installed bundle: org.apache.xbean.finder-shaded [94]
-Found installed bundle: org.ops4j.pax.web.pax-web-api [95]
-Found installed bundle: org.ops4j.pax.web.pax-web-spi [96]
-Found installed bundle: org.ops4j.pax.web.pax-web-runtime [97]
-Found installed bundle: org.ops4j.pax.web.pax-web-jetty [98]
-Found installed bundle: org.ops4j.pax.web.pax-web-jsp [99]
-Found installed bundle: org.ops4j.pax.web.pax-web-extender-whiteboard [100]
-Installing bundle mvn:org.ops4j.pax.web/pax-web-jsp/3.0.5
-Found installed bundle: org.ops4j.pax.web.pax-web-extender-war [101]
-Installing bundle mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/3.0.5
-Found installed bundle: org.ops4j.pax.web.pax-web-deployer [102]
-Found installed bundle: org.ops4j.pax.url.war [103]
-Found installed bundle: org.ops4j.pax.url.commons [104]
-Found installed bundle: org.ops4j.pax.swissbox.pax-swissbox-bnd [105]
-Found installed bundle: org.ops4j.pax.swissbox.property [106]
-Installing bundle mvn:org.ops4j.base/ops4j-base-net/1.4.0
-Installing bundle mvn:org.ops4j.base/ops4j-base-lang/1.4.0
-Installing bundle mvn:org.ops4j.base/ops4j-base-monitors/1.4.0
-Installing bundle mvn:org.ops4j.base/ops4j-base-util-property/1.4.0
-Found installed bundle: biz.aQute.bndlib [107]
-Found installed bundle: org.apache.karaf.web.core [108]
-Found installed bundle: org.apache.karaf.web.command [109]
-----
-
-We can note that the Pax Web deployer (WAR deployer) has been started:
-
-----
-...
-Found installed bundle: org.ops4j.pax.web.pax-web-deployer [102]
-...
-----
-
-The WAR deployer supports:
-
-* WAB files
-* WAR files
-* exploded WAR (as a directory named `*.war`).
-
-The only requirement of the WAR deployer is that the archive contains the `WEB-INF/web.xml` file.
-
-== Wrap deployer
-
-The wrap deployer allows you to "hot deploy" non-OSGi jar files ("classical" jar files) from the deploy folder.
-
-The wrap deployer creates "on the fly" an OSGi bundle with a non-OSGi jar file.
-
-The wrap deployer looks for jar files in the deploy folder. A jar file is considered as non-OSGi if the MANIFEST doesn't
-contain the `Bundle-SymbolicName` and `Bundle-Version` attributes, or if there is no MANIFEST at all.
-
-The wrap deployer "transforms" non-OSGi jar file into an OSGi bundle.
-
-The wrap deployer tries to populate the Bundle-SymbolicName and Bundle-Version extracted from the jar file path.
-
-For example, if you simply copy commons-lang-2.3.jar (which is not an OSGi bundle) into the deploy folder, you
-will see:
-
-----
-karaf@root()> la|grep -i commons-lang
-80 | Active | 80 | 2.3 | commons-lang
-----
-
-If you take a look on the commons-lang headers, you can see that the bundle exports all packages with optional resolution
-and that `Bundle-SymbolicName` and `Bundle-Version` have been populated:
-
-----
-karaf@root()> bundle:headers 80
-
-commons-lang (80)
------------------
-Specification-Title = Commons Lang
-Tool = Bnd-2.1.0.20130426-122213
-Specification-Version = 2.3
-Specification-Vendor = Apache Software Foundation
-Implementation-Version = 2.3
-Generated-By-Ops4j-Pax-From = wrap:file:/opt/apache-karaf-3.0.0/deploy/commons-lang-2.3.jar$Bundle-SymbolicName=commons-lang&Bundle-Version=2.3
-Implementation-Vendor-Id = org.apache
-Created-By = 1.7.0_21 (Oracle Corporation)
-Implementation-Title = Commons Lang
-Manifest-Version = 1.0
-Bnd-LastModified = 1386339925753
-X-Compile-Target-JDK = 1.1
-Originally-Created-By = 1.3.1_09-85 ("Apple Computer, Inc.")
-Ant-Version = Apache Ant 1.6.5
-Package = org.apache.commons.lang
-X-Compile-Source-JDK = 1.3
-Extension-Name = commons-lang
-Implementation-Vendor = Apache Software Foundation
-
-Bundle-Name = commons-lang
-Bundle-SymbolicName = commons-lang
-Bundle-Version = 2.3
-Bundle-ManifestVersion = 2
-
-Export-Package =
- org.apache.commons.lang;uses:=org.apache.commons.lang.exception,
- org.apache.commons.lang.builder,
- org.apache.commons.lang.enum,
- org.apache.commons.lang.enums,
- org.apache.commons.lang.exception,
- org.apache.commons.lang.math,
- org.apache.commons.lang.mutable,
- org.apache.commons.lang.text,
- org.apache.commons.lang.time,
- org,
- org.apache,
- org.apache.commons
-
-----
-
-You can specify some MANIFEST headers by specifying the headers as URL parameters.
-
-In the URL parameters, you can specify the headers using the '$' character and '&' to separate the different headers.
-For instance:
-
-----
-karaf@root()> bundle:install -s 'wrap:mvn:jboss/jbossall-client/4.2.3.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.2.3.GA&Export-Package=org.jboss.remoting;version="4.2.3.GA",\!*'
-----
-
-When defined in a features.xml file, it's necessary to escape any ampersands and quotes, or use a CDATA tag:
-
-{code:lang=xml}
-<bundle>wrap:mvn:jboss/jbossall-client/4.3.2.GA/$Bundle-SymbolicName=jbossall-client&Bundle-Version=4.3.2.GA&Export-Package=org.jboss.remoting;version="4.3.2.GA",!*</bundle>
-----
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/directory-structure.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/directory-structure.adoc b/manual/src/main/asciidoc/users-guide/directory-structure.adoc
deleted file mode 100644
index 35f35cf..0000000
--- a/manual/src/main/asciidoc/users-guide/directory-structure.adoc
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Directory structure
-
-The directory layout of a Karaf installation is as follows:
-
-* `/bin`: control scripts to start, stop, login, ...
-* `/etc`: configuration files
-* `/data`: working directory
-** `/cache`: OSGi framework bundle cache
-** `/generated-bundles`: temporary folder used by the deployers
-** `/log`: log files
-* `/deploy`: hot deploy directory
-* `/instances`: directory containing [instances|instances]
-* `/lib`: directory for additional libraries
-** `/lib/ext`: directory for JRE extensions
-** `/lib/endorsed`: directory for endorsed libraries
-** `/lib/boot`: directory for system libraries
-* `/system`: OSGi bundles repository, laid out as a Maven 2 repository
-
-TIP: The `data` folder contains all the working and temporary files for Karaf.
-If you want to restart from a clean state, you can wipe out this directory, which has the same effect as
-[using the clean option|start-stop#Starting Karaf from clean].
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/ejb.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/ejb.adoc b/manual/src/main/asciidoc/users-guide/ejb.adoc
deleted file mode 100644
index 57b742a..0000000
--- a/manual/src/main/asciidoc/users-guide/ejb.adoc
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// Licensed 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.
-//
-
-= EJB
-
-This section describes how to add support of EJB in Apache Karaf. It doesn't describe how to develop EJB applications.
-See the developer guide for that.
-
-== Apache OpenEJB
-
-Apache Karaf doesn't provide "native" support of EJB (Enterprise Java Beans).
-
-Apache OpenEJB provides EJB support for Apache Karaf by providing a set of features.
-
-You have to update some Karaf configuration to have full OpenEJB support.
-
-First, in the `etc/system.properties`, you have to append the following properties:
-
-----
-...
-#
-# OpenEJB scanner
-#
-openejb.deployments.classpath.exclude=bundle:*
-openejb.deployments.classpath.filter.descriptors=true
-----
-
-Due to some OpenEJB version constraint, you also have to update the `etc/jre.properties` by changing the version of
-the `javax.xml.namespace` package, and remove the version of the `javax.annotation` package (provided by Geronimo
-Annotation API spec bundle, used by OpenEJB):
-
-----
-...
-javax.annotation, \
-javax.annotation.processing, \
-...
-javax.xml.namespace;version="1.0.0", \
-...
-----
-
-It enables the OpenEJB bundles scanning, looking for EJBs.
-
-After starting/restart Karaf to take these changes, we can install the OpenEJB feature:
-
-----
-karaf@root()> feature:repo-add openejb
-----
-
-By default, the `feature:repo-add openejb` command will install the latest OpenEJB version available.
-
-You can specify a target version using the `version` argument:
-
-----
-karaf@root()> feature:repo-add openejb 4.5.2
-----
-
-Now, you have a set of new OpenEJB features available in your Apache Karaf container:
-
-----
-karaf@root()> la
-...
-openejb-core | 4.5.2 | | openejb-features |
-openejb-server | 4.5.2 | | openejb-features |
-openejb-cxf | 4.5.2 | | openejb-features |
-openejb-rest | 4.5.2 | | openejb-features |
-openejb-soap | 4.5.2 | | openejb-features |
-----
-
-You can add EJB support installing the `openejb-core` feature:
-
-----
-karaf@root()> feature:install openejb-core
-----
-
-== Apache KarafEE
-
-A custom distribution of Apache Karaf embedding OpenEJB is available in the Apache TomEE project.
-
-The name of this custom distribution is KarafEE:
-
-[https://svn.apache.org/repos/asf/tomee/karafee/]
-
-However, this project is now "deprecated", and all resources from KarafEE will move directly in Apache Karaf soon.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/enterprise.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/enterprise.adoc b/manual/src/main/asciidoc/users-guide/enterprise.adoc
deleted file mode 100644
index a8c54c1..0000000
--- a/manual/src/main/asciidoc/users-guide/enterprise.adoc
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Enterprise
-
-Apache Karaf provides a set of enterprise class features.
-
-These features are not installed by default, you have to install yourself depending of your needs.
-
-The enterprise features available are:
-
-* [Http Service|http] provide basic OSGi HttpServices
-* [WebContainer (JSP/Servlet)|webcontainer] providing a complete JSP/Servlet support. These feature turns Apache Karaf as a complete
- web container where you can deploy web application (as you can do in Apache Tomcat, or other JEE application servers).
-* [Naming (JNDI)|jndi] providing a complete Java Naming and Directory Interface support. Apache Karaf provides a complete
- JNDI "server" (context) where you can create name to identify Objects (especially OSGi services).
-* [Transaction (JTA)|jta] providing a complete transaction manager as an OSGi service.
-* [DataSources (JDBC)|jdbc] providing useful OSGi service, console commands, and MBean to manipulate JDBC datasources and perform database operations.
-* [MOM (JMS)|jms] providing useful OSGi service, console commands, and MBean to manipulate JMS connection factories and perform messaging operations.
-* [Persistence (JPA)|jpa] providing ready to use JPA engines and entity manager as an OSGi service.
-* [EJB|ejb] adding EJB support in Apache Karaf.
-* [CDI|cdi] providing ready to use CDI containers in Apache Karaf.
-* [HA/failover and cluster|failover] providing active/passive or active/active topologies with multiple Apache Karaf instances.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/failover.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/failover.adoc b/manual/src/main/asciidoc/users-guide/failover.adoc
deleted file mode 100644
index 4bbee89..0000000
--- a/manual/src/main/asciidoc/users-guide/failover.adoc
+++ /dev/null
@@ -1,243 +0,0 @@
-//
-// Licensed 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.
-//
-
-= HA/failover and cluster
-
-Apache Karaf natively provides a failover mechanism. It uses a kind of master/slave topology where one instance is active
-and the others are in standby.
-
-If you are looking for cluster of Apache Karaf instances (active/active), [Apache Karaf Cellar|http://karaf.apache.org/index/subprojects/cellar.html] is a solution.
-
-Karaf provides failover capability using either a simple lock file or a JDBC locking mechanism.
-In both cases, a container-level lock system allows bundles to be preloaded into the slave Karaf instance in order to provide faster failover performance.
-
-== HA/failover (active/passive)
-
-The Apache Karaf failover capability uses a lock system.
-
-This container-level lock system allows bundles installed on the master to be preloaded on the slave, in order to provide faster failover performance.
-
-Two types of lock are supported:
-
-* filesystem lock
-* database lock
-
-When a first instance starts, if the lock is available, it takes the lock and become the master.
-If a second instance starts, it tries to acquire the lock. As the lock is already hold by the master, the instance becomes
-a slave, in standby mode (not active). A slave periodically check if the lock has been released or not.
-
-=== Filesystem lock
-
-The Apache Karaf instances share a lock on the filesystem. It means that the filesystem storing the lock has to be accessible
-to the different instances (using SAN, NFS, ...).
-
-The configuration of the lock system has to be defined in the `etc/system.properties` file, on each instance (master/slave):
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.SimpleFileLock
-karaf.lock.dir=<PathToLockFileDirectory>
-karaf.lock.delay=10000
-----
-
-* `karaf.lock` property enables the the HA/failover mechanism
-* `karaf.lock.class` property contains the class name providing the lock implementation. Here, we use the filesystem lock.
-* `karaf.lock.dir` property contains the location where the lock will be written. All instances have to share the same lock.
-* `karaf.lock.delay` property is the interval period (in milliseconds) to check if the lock has been released or not.
-
-=== Database lock
-
-It's not always possible and easy to have a shared filesystem between multiple Apache Karaf instances.
-
-Instead of sharing a filesystem, Apache Karaf supports sharing a database.
-
-The master instance holds the lock by locking a table in the database. If the master loses the lock, a waiting slave
-gains access to the locking table, acquire the lock on the table and starts.
-
-The database lock uses JDBC (Java DataBase Connectivity). To use database locking, you have to:
-
-* copy the JDBC driver in the `lib/ext` folder on each instance. The JDBC driver to use is the one corresponding to the
- database used for the locking system.
-* update `etc/system.properties` file on each instance:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.DefaultJDBCLock
-karaf.lock.level=50
-karaf.lock.delay=10000
-karaf.lock.jdbc.url=jdbc:derby://dbserver:1527/sample
-karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-----
-
-* `karaf.lock` property enabled the HA/failover mechanism
-* `karaf.lock.class` property contains the class name providing the lock implementation. The `org.apache.karaf.main.DefaultJDBCLock`
- is the most generic database lock system implementation. Apache Karaf supports lock system for specific databases (see later for details).
-* `karaf.lock.level` property is the container-level locking (see later for details).
-* `karaf.lock.delay` property is the interval period (in milliseconds) to check if the lock has been released or not.
-* `karaf.lock.jdbc.url` property contains the JDBC URL to the database (derby in this example).
-* `karaf.lock.jdbc.driver` property contains the class name of the JDBC driver to use (derby in this example).
-* `karaf.lock.jdbc.user` property contains the username to use to connect to the database.
-* `karaf.lock.jdbc.password` property contains the password to use to connet to the database.
-* `karaf.lock.jdbc.table` property contains the database table to use for the lock.
-
-{warning}
-Apache Karaf won't start if the JDBC driver is not present in the `lib/ext` folder.
-{warning}
-
-{warning}
-The `sample` database will be created automatically if it does not exist.
-{warning}
-
-{warning}
-If the connection to the database is lost, the master instance tries to gracefully shutdown, allowing a slave instance to
-become the master when the database is back. The former master instance will required a manual restart.
-{warning}
-
-h4. Lock on Oracle
-
-Apache Karaf supports Oracle database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.OracleJDBCLock`:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.OracleJDBCLock
-karaf.lock.jdbc.url=jdbc:oracle:thin:@hostname:1521:XE
-karaf.lock.jdbc.driver=oracle.jdbc.OracleDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-----
-
-The Oracle JDBC driver file (`ojdbc*.jar`) has to be copied in the `lib/ext` folder.
-
-{warning}
-The `karaf.lock.jdbc.url` property contains a JDBC URL which requires an active SID. It means that you must manually create the Oracle
-database instance first before using the lock mechanism.
-{warning}
-
-h4. Lock on Derby
-
-Apache Karaf supports Apache Derby database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.DerbyJDBCLock`:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.DerbyJDBCLock
-karaf.lock.jdbc.url=jdbc:derby://127.0.0.1:1527/dbname
-karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-----
-
-The Derby JDBC driver file name has to be copied in the `lib/ext` folder.
-
-h4.Lock on MySQL
-
-Apache Karaf supports MySQL database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.MySQLJDBCLock`:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.MySQLJDBCLock
-karaf.lock.jdbc.url=jdbc:mysql://127.0.0.1:3306/dbname
-karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-----
-
-The MySQL JDBC driver file name has to be copied in `lib/ext` folder.
-
-h4. Lock on PostgreSQL
-
-Apache Karaf supports PostgreSQL database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.PostgreSQLJDBCLock`:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.PostgreSQLJDBCLock
-karaf.lock.jdbc.url=jdbc:postgresql://127.0.0.1:1527/dbname
-karaf.lock.jdbc.driver=org.postgresql.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=0
-----
-
-The PostgreSQL JDBC driver file has to be copied in the `lib/ext` folder.
-
-h4. Lock on Microsoft SQLServer
-
-Apache Karaf supports Microsoft SQLServer database for locking. The lock implementation class name to use is `org.apache.karaf.main.lock.SQLServerJDBCLock`:
-
-----
-karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.lock.SQLServerJDBCLock
-karaf.lock.level=50
-karaf.lock.delay=10000
-karaf.lock.jdbc.url=jdbc:jtds:sqlserver://127.0.0.1;databaseName=sample
-karaf.lock.jdbc.driver=net.sourceforge.jtds.jdbc.Driver
-karaf.lock.jdbc.user=user
-karaf.lock.jdbc.password=password
-karaf.lock.jdbc.table=KARAF_LOCK
-karaf.lock.jdbc.clustername=karaf
-karaf.lock.jdbc.timeout=30
-----
-
-The JTDS JDBC driver file has to be copied in the `lib/ext` folder.
-
-=== Container-level locking
-
-Apache Karaf supports container-level locking. It allows bundles to be preloaded into the slave instance.
-Thanks to that, switching to a slave instance is very fast as the slave instance already contains all required bundles.
-
-The container-level locking is supported in both filesystem and database lock mechanisms.
-
-The container-level locking uses the `karaf.lock.level` property:
-
-----
-karaf.lock.level=50
-----
-
-The `karaf.lock.level` property tells the Karaf instance how far up the boot process to bring the OSGi container.
-All bundles with an ID equals or lower to this start level will be started in that Karaf instance.
-
-As reminder, the bundles start levels are specified in `etc/startup.properties`, in the `url=level` format.
-
-|| Level || Behavior ||
-| 1 | A 'cold' standby instance. Core bundles are not loaded into container. Slaves will wait until lock acquired to start server. |
-| <50 | A 'hot' standby instance. Core bundles are loaded into the container. Slaves will wait until lock acquired to start user level bundles. The console will be accessible for each slave instance at this level. |
-| >50 | This setting is not recommended as user bundles will end up being started. |
-
-{warning}
-Using 'hot' standby means that the slave instances are running and bind some ports. So, if you use master and slave instances on the same machine, you have
-to update the slave configuration to bind the services (ssh, JMX, etc) on different port numbers.
-{warning}
-
-== Cluster (active/active)
-
-Apache Karaf doesn't natively support cluster. By cluster, we mean several active instances, synchronized with each other.
-
-However, [Apache Karaf Cellar|http://karaf.apache.org/index/subprojects/cellar.html] can be installed to provide cluster support.
-
-See the [Apache Karaf Cellar website|http://karaf.apache.org/index/subprojects/cellar.html] for details.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/features.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/features.adoc b/manual/src/main/asciidoc/users-guide/features.adoc
deleted file mode 100644
index b3cde46..0000000
--- a/manual/src/main/asciidoc/users-guide/features.adoc
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Features
-
-== Standard Features
-
-* *Hot deployment*: simply drop a file in the `deploy` directory, Apache Karaf will detect the type of the file and
- try to deploy it.
-* *Complete Console*: Apache Karaf provides a complete Unix-like console where you can completely manage the container.
-* *Dynamic Configuration*: Apache Karaf provides a set of command dedicated for the management of the configuration files.
- All configuration files are centralized in the `etc` folder. Any change in a configuration file is taken on the fly.
-* *Advanced Logging System*: Apache Karaf supports a large set of Logging framework (slf4j, log4j, etc). Whatever the
- logging framework you use, Apache Karaf centralizes the configuration in one file.
-* *Provisioning*: Apache Karaf supports a large set of URL where you can install your application (Maven repository, HTTP,
- file, etc). It also provides the concept of "Karaf Feature" which is a way to describe your application.
-* *Management*: Apache Karaf is an enterprise-ready container, providing a lot of management indicators and operations
- via JMX.
-* *Remote*: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also
- accessible remotely.
-* *Security*: Apache Karaf provides a complete security framework (based on JAAS), and providing RBAC (Role-Based Access
- Control) mechanism for console and JMX.
-* *Instances*: multiple instances of Apache Karaf can be managed directly from a main instance (root).
-* *OSGi frameworks*: Apache Karaf is not tight to one OSGi framework. By default, Apache Karaf runs with Apache Felix
- Framework, but you can easily switch to Equinox (just change on property in a configuration file).
-
-!/images/karaf.png!
-
-== Enterprise features
-
-* WebContainer (JSP/Servlet support, including WAR archive deployment support)
-* Naming (JNDI)
-* Transaction (JTA)
-* DataSources (JDBC)
-* MOM (JMS)
-* Persistence (JPA)
-* EJB
-* CDI
-* HA/failover and cluster
-
-== External Features
-
-As a very extend-able container, OpenSource and commercial projects provide "native" support of Apache Karaf.
-
-We can mention (this list is not exhaustive):
-
-* [Apache ActiveMQ|http://activemq.apache.org/osgi-integration.html]
-* [Apache Camel|http://camel.apache.org/karaf.html]
-* [Apache CXF|http://cxf.apache.org]
-* [JClouds|http://www.jclouds.org/documentation/userguide/karaf/]
-* [Apache Wicket|http://team.ops4j.org/wiki/display/paxwicket/Install+Pax+Wicket]
-* ...
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/http.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/http.adoc b/manual/src/main/asciidoc/users-guide/http.adoc
deleted file mode 100644
index 4a30d80..0000000
--- a/manual/src/main/asciidoc/users-guide/http.adoc
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Http Service
-
-The Karaf http feature enables the Pax Web implementation of the OSGi HTTPService.
-
-== Installing the HTTP feature
-
-----
-root@karaf> feature:install http
-----
-
-Test the HTTP service is up by pointing your browser to [http://localhost:8080/].
-
-== Configuring the HTTPService
-
-By default the HTTPService listens on port 8181 you can change the port by creating a file `etc/org.ops4j.pax.web.cfg` with the following content:
-
-----
-org.osgi.service.http.port=8080
-----
-
-or by typing:
-----
-root@karaf> config:property-set -p org.ops4j.pax.web org.osgi.service.http.port 8080
-----
-
-If the http feature is already installed the change will take effect immediately.
-
-== Registering a servlet with the HttpService manually
-
-See [Apache Felix HTTP Service|http://felix.apache.org/site/apache-felix-http-service.html].
-
-== Using the Pax Web whiteboard extender
-
-The Pax Web whiteboard extender is an enhancement of the http feature. So use the following command to install:
-
-----
-root@karaf> feature:install http-whiteboard
-----
-
-The [Pax Web whiteboard|http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard] extender listens to services
-of interface type HttpServlet and Filter.
-It will register each of these interfaces with the HttpService and remove them as soon as the service goes down.
-So it is much more convenient than registering with the HttpService directly.
-
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <service interface="javax.servlet.http.HttpServlet">
- <service-properties>
- <entry key="alias" value="/myservlet"/>
- </service-properties>
- <bean id="myServlet" class="com.example.MyServlet"/>
- </service>
-</blueprint>
-----
-
-The above snippet publishes the Servlet MyServlet on http://localhost:8080/myServlet.
-
-Please keep in mind that the Whiteboard pattern for Servlets is not standardized and only works with Pax Web.
-
-For commands take a look at the command section in the [webcontainer|webcontainer] chapter.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/index.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/index.adoc b/manual/src/main/asciidoc/users-guide/index.adoc
deleted file mode 100644
index 1169960..0000000
--- a/manual/src/main/asciidoc/users-guide/index.adoc
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// Licensed 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.
-//
-
-Users Guide
-===========
-Apache Software Foundation
-:doctype: book
-:toc: left
-:toclevels: 3
-:toc-position: left
-:toc-title: Apache Karaf
-:numbered:
-
-include::users-guide/installation.adoc[]
-
-include::users-guide/directory-structure.adoc[]
-
-include::users-guide/start-stop.adoc[]
-
-include::users-guide/wrapper.adoc[]
-
-include::users-guide/console.adoc[]
-
-include::users-guide/remote.adoc[]
-
-include::users-guide/log.adoc[]
-
-include::users-guide/configuration.adoc[]
-
-include::users-guide/urls.adoc[]
-
-include::users-guide/provisioning.adoc[]
-
-include::users-guide/deployers.adoc[]
-
-include::users-guide/kar.adoc[]
-
-include::users-guide/instances.adoc[]
-
-include::users-guide/security.adoc[]
-
-include::users-guide/obr.adoc[]
-
-include::users-guide/enterprise.adoc[]
-
-include::users-guide/webcontainer.adoc[]
-
-include::users-guide/jndi.adoc[]
-
-include::users-guide/jta.adoc[]
-
-include::users-guide/jms.adoc[]
-
-include::users-guide/jpa.adoc[]
-
-include::users-guide/ejb.adoc[]
-
-include::users-guide/cdi.adoc[]
-
-include::users-guide/failover.adoc[]
-
-include::users-guide/monitoring.adoc[]
-
-include::users-guide/webconsole.adoc[]
-
-include::users-guide/tuning.adoc[]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/installation.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/installation.adoc b/manual/src/main/asciidoc/users-guide/installation.adoc
deleted file mode 100644
index 42a7a2b..0000000
--- a/manual/src/main/asciidoc/users-guide/installation.adoc
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Installation
-
-:doctype: book
-:toc: left
-:toclevels: 3
-:toc-position: left
-:toc-title: Apache Karaf
-:numbered:
-
-
-Apache Karaf is a lightweight container, very easy to install and administer, on both Unix and Windows platforms.
-
-== Requirements
-
-Storage: ::
-
-* 50 MB of free disk space for the Apache Karaf binary distribution.
-
-Operating Systems: ::
-
-* Windows: Windows 8, Windows 7, Windows 2003, Windows Vista, Windows XP SP2, Windows 2000.
-* Unix: RedHat Enterprise Linux, Debian, SuSE/OpenSuSE, CentOS, Fedora, Ubuntu, MacOS, AIX, HP-UX, Solaris, any Unix platform that supports Java.
-
-Environment: ::
-
-* Java SE 1.7.x or greater ([http://www.oracle.com/technetwork/java/javase/]).
-* The Java SE "bin" directory has to be in the `PATH` environment variable, or the `JAVA_HOME` environment variable must be set to point to the directory where the Java SE distribution is installed.
-
-== Using Apache Karaf binary distributions
-
-Apache Karaf is available in two distributions, and in either a "tar.gz" or "zip" format.
-
-The "default" distribution is a "ready to use" distribution, with everything provided in the distribution archive.
-
-The "minimal" distribution is like many minimal distributions for other applications.
-Only the core layer is provided, and most of the features and bundles are downloaded from the Internet at bootstrap.
-This means that the Apache Karaf minimal distribution requires an Internet connection to fully install itself. Once the "minimal" distribution fully installs, it provides all the same features as the "default" distribution.
-
-=== Installation on Windows platform
-
-. From a browser, navigate to [http://karaf.apache.org/index/community/download.html].
-. Download Apache Karaf binary distribution in the zip format: `apache-karaf-n.n.n.zip` (like `apache-karaf-4.0.1.zip`).
-. Extract the files from the zip file into a directory of your choice (where `KARAF_HOME` points to).
-Note: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
-. Apache Karaf is now installed.
-
-[TIP]
-====
-Handy Hint::
-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 _start \-> startup_ that executes
-`subst S: "C:\your very % problematic path!\KARAF"`
-so your Karaf root directory is S: --- which works for sure and is short to type.
-====
-
-=== Installation on Unix platforms
-
-. From a browser, navigate to [http://karaf.apache.org/index/community/download.html].
-. Download Apache Karaf binary distribution in the tar.gz format: `apache-karaf-n.n.n.tar.gz` (like `apache-karaf-4.0.1.tar.gz`).
-. Extract the files from the tar.gz file into a directory of your choice (where `KARAF_HOME` points to). For example:
-----
-gunzip apache-karaf-n.n.n.tar.gz
-tar xvf apache-karaf-n.n.n.tar
-----
-
-or
-----
-tar xvzf apache.karaf-n.n.n.tar.gz
-----
-Note: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
-. Apache Karaf is now installed.
-
-== Post-Installation steps
-
-Apache Karaf uses Java, so it has to be able to find the "java" executable. No matter what platform you're on, this is done by either putting the "bin" directory of the Java SE distribution into the `PATH` environment variable, or by setting the `JAVA_HOME` environment variable to point to the root of the Java SE distribution.
-
-By default, all Apache Karaf files are available in one directory: the `KARAF_HOME`.
-
-You can define your own directory layout, by using some Karaf environment variables:
-
-* `KARAF_DATA` is the location of the data folder, where Karaf stores temporary files.
-* `KARAF_ETC` is the location of the etc folder, where Karaf stores configuration files.
-* `KARAF_BASE` is the Karaf base folder. By default `KARAF_BASE` is the same as `KARAF_HOME`.
-
-== Building from Sources
-
-If you intend to build Apache Karaf from the sources, the requirements are a bit different:
-
-Storage: ::
-
-* 500 MB of free disk space for the Apache Karaf source, the Maven build outputs, and the external dependencies downloaded by Maven.
-
-Environment: ::
-
-* Java SE Development Kit 1.7.x or greater ([http://www.oracle.com/technetwork/java/javase/]).
-* Apache Maven 3.0.3 (or newer) ([http://maven.apache.org/download.html]).
-
-=== Building on Windows platform
-
-. You can get the Apache Karaf sources from:
-* the sources distribution `apache-karaf-n.n.n-src.zip` available at [http://karaf.apache.org/index/community/download.html]. Extract the files in the directory of your choice.
-* by checkout of the git repository:
-----
-git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
-----
-. Use Apache Maven to build Apache Karaf:
-----
-mvn clean install
-----
-Note: you can speed up the build by bypassing the unit and integration tests:
-----
-mvn clean install -DskipTests
-----
-. You can find the built binary distribution in `assemblies\apache-karaf\target\apache-karaf-n.n.n.zip`. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.
-
-=== Building on Unix platforms
-
-. You can get the Apache Karaf sources from:
-* the sources distribution `apache-karaf-n.n.n-src.tar.gz` available at [http://karaf.apache.org/index/community/download.html]. Extract the files in the directory of your choice.
-* by checkout of the git repository:
-----
-git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
-----
-. Use Apache Maven to build Apache Karaf:
-----
-mvn clean install
-----
-Note: you can speed up the build by bypassing the unit and integration tests:
-----
-mvn clean install -DskipTests
-----
-. You can find the built binary distribution in `assemblies/apache-karaf/target/apache-karaf-n.n.n.tar.gz`. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.
[07/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/branding.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/branding.conf b/manual/src/main/webapp/developers-guide/branding.conf
deleted file mode 100644
index c0f16aa..0000000
--- a/manual/src/main/webapp/developers-guide/branding.conf
+++ /dev/null
@@ -1,222 +0,0 @@
-h1. Branding
-
-h2. Console
-
-You can "brand" the Apache Karaf console.
-
-By branding, it means that you can define your own:
-
-* the welcome message (motd or Message Of The Day) displayed when you start the console
-* the prompt displayed to the users
-
-There are 2 ways of branding the Karaf console: (1) adding a branding.properties file to etc, and (2) creating a branding bundle.
-
-h2. Adding a branding.properties file to etc
-
-Create a {{etc/branding.properties}} file similar to:
-
-{{code}}
-welcome = \
-\u001B[36m __ __ ____ \u001B[0m\r\n\
-\u001B[36m / //_/____ __________ _/ __/ \u001B[0m\r\n\
-\u001B[36m / ,< / __ `/ ___/ __ `/ /_ \u001B[0m\r\n\
-\u001B[36m / /| |/ /_/ / / / /_/ / __/ \u001B[0m\r\n\
-\u001B[36m /_/ |_|\\__,_/_/ \\__,_/_/ \u001B[0m\r\n\
-\r\n\
-\u001B[1m Apache Karaf\u001B[0m (4.0.0)\r\n\
-\r\n\
-Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\r\n\
- and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\r\n\
-Hit '\u001B[1m<ctrl-d>\u001B[0m' or '\u001B[1mosgi:shutdown\u001B[0m' to shutdown Karaf.\r\n
-
-prompt = \u001B[1m${USER}@${APPLICATION}\u001B[0m>
-{{code}}
-
-Start Karaf and you will see your branded Karaf console.
-
-h2. Branding bundle
-
-At startup, Apache Karaf is looking for a bundle which exports the {{org.apache.karaf.branding}} package, containing
-a {{branding.properties}} file.
-
-Basically, a branding bundle is a very simple bundle, just containing a {{org/apache/karaf/branding/branding.properties}}
-file.
-
-It's easy to create such branding bundle using Apache Maven.
-
-The following {{pom.xml}} creates a branding bundle:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>your.group.id</groupId>
- <artifactId>your.branding.artifact.id</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <name>Your Branding Bundle Name</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.4.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</bundle-SymbolicName>
- <Import-Package>*</Import-Package>
- <Private-Package>!*</Private-Package>
- <Export-Package>
- org.apache.karaf.branding
- </Export-Package>
- <Spring-Context>*;public-context:=false</Spring-Context>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-You can put your {{branding.properties}} file in the project resources ({{src/main/resources/org/apache/karaf/branding/branding.properties}}):
-
-{code}
-welcome = This is my Karaf brand\r\n
-prompt = Hey ${USER}>
-{code}
-
-For instance, the default Apache Karaf branding properties file contains:
-
-{code}
-welcome = \
-\u001B[36m __ __ ____ \u001B[0m\r\n\
-\u001B[36m / //_/____ __________ _/ __/ \u001B[0m\r\n\
-\u001B[36m / ,< / __ `/ ___/ __ `/ /_ \u001B[0m\r\n\
-\u001B[36m / /| |/ /_/ / / / /_/ / __/ \u001B[0m\r\n\
-\u001B[36m /_/ |_|\\__,_/_/ \\__,_/_/ \u001B[0m\r\n\
-\r\n\
-\u001B[1m Apache Karaf\u001B[0m (${project.version})\r\n\
-\r\n\
-Hit '\u001B[1m<tab>\u001B[0m' for a list of available commands\r\n\
- and '\u001B[1m[cmd] --help\u001B[0m' for help on a specific command.\r\n\
-Hit '\u001B[1m<ctrl-d>\u001B[0m' or type '\u001B[1msystem:shutdown\u001B[0m' or '\u001B[1mlogout\u001B[0m' to shutdown Karaf.\r\n
-{code}
-
-As you can see, the {{branding.properties}} contains two properties:
-* welcome is the welcome message displayed when you start Apache Karaf console.
-* prompt is the string used to display the console prompt. This string supports variables:
-** ${USER}} defines the user name of the prompt. Caveat -- the user name is presently static and hardcoded to "karaf",
-however you can override here with your own static user name.
-** ${{APPLICATION}} defines the Karaf instance name.
-
-As you can see, both strings support ASCII escaped format. For instance \u001B[1m switches the foreground in bold
-and \u001B[0m switch back to normal.
-
-Some examples of customized prompt examples follow:
-
-{code}
-# Define a user with fancy colors
-prompt = \u001B[36mmy-karaf-user\u001B[0m\u001B[1m@\u001B[0m\u001B[34m${APPLICATION}\u001B[0m>
-{code}
-
-{code}
-# Static sober prompt
-prompt = my-user@my-karaf>
-{code}
-
-h2. Installing the branding bundle
-
-Thanks to the {{pom.xml}}, we can use {{mvn}} to build the branding bundle:
-{code}
-mvn install
-{code}
-
-You just have to drop the file in the {{lib}} directory:
-
-{code}
-cp branding.jar /opt/apache-karaf-4.0.0/lib/karaf-branding.jar
-{code}
-
-You can now start Apache Karaf to see your branded console.
-
-h2. WebConsole
-
-It's also possible to brand the Apache Karaf WebConsole.
-
-You have to create a bundle, fragment of the Apache Karaf WebConsole.
-
-This WebConsole branding bundle contains a {{META-INF/webconsole.properties}} containing branding properties:
-
-{code}
-#
-# This file contains branding properties to overwrite the default
-# branding of the Apache Felix Web Console when deployed in an
-# Apache Karaf application.
-
-
-webconsole.brand.name = My Web Console
-
-webconsole.product.name = My Karaf
-webconsole.product.url = http://karaf.apache.org/
-webconsole.product.image = /res/karaf/imgs/logo.png
-
-webconsole.vendor.name = The Apache Software Foundation
-webconsole.vendor.url = http://www.apache.org
-webconsole.vendor.image = /res/karaf/imgs/logo.png
-
-webconsole.favicon = /res/karaf/imgs/favicon.ico
-webconsole.stylesheet = /res/karaf/ui/webconsole.css
-
-{code}
-
-The bundle also provides the css stylesheet and images defined in this properties file.
-
-As for console, you can use the following {{pom.xml}} to create the WebConsole branding bundle:
-
-{code}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>my.group.id</groupId>
- <artifactId>branding</artifactId>
- <packaging>bundle</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.4.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-DocURL>http://felix.apache.org/site/apache-karaf.html</Bundle-DocURL>
- <Fragment-Host>org.apache.karaf.webconsole.console;bundle-version="[3,4)"</Fragment-Host>
- <Export-Package>!*</Export-Package>
- <Import-Package>
- javax.servlet;version=2.4,
- javax.servlet.http;version=2.4,
- !org.apache.felix.webconsole*,
- org.apache.aries.blueprint,
- org.osgi.service.blueprint.container,
- org.osgi.service.blueprint.reflect,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-With the {{webconsole}} feature installed, you can install this bundle (using {{bundle:install}} or by editing the
-{{etc/startup.properties}}), you will see the WebConsole with your branding.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/connect.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/connect.conf b/manual/src/main/webapp/developers-guide/connect.conf
deleted file mode 100644
index 5afdf7c..0000000
--- a/manual/src/main/webapp/developers-guide/connect.conf
+++ /dev/null
@@ -1,82 +0,0 @@
-h1. Programmatically connect
-
-As described in the users guide, Apache Karaf supports remote access to both the console (by embedding a SSHd server) and
-the management layer.
-
-h2. To the console
-
-You can write a Apache Karaf remote console client in Java (or other language).
-
-Accessing to a remote Apache Karaf console means writing a SSH client. This SSH client can be in pure Java or in
-another language.
-
-For instance, the {{bin/client}} script starts a SSH client written in Java.
-
-The following code is a simple code to create a SSH client:
-
-{code:lang=java}
-import org.apache.sshd.ClientChannel;
-import org.apache.sshd.ClientSession;
-import org.apache.sshd.SshClient;
-import org.apache.sshd.client.future.ConnectFuture;
-
-public class Main {
-
- public static void main(String[] args) throws Exception {
- String host = "localhost";
- int port = 8101;
- String user = "karaf";
- String password = "karaf";
-
- SshClient client = null;
- try {
- client = SshClient.setUpDefaultClient();
- client.start();
- ConnectFuture future = client.connect(host, port);
- future.await();
- ClientSession session = future.getSession();
- session.authPassword(user, password);
- ClientChannel channel = session.createChannel("shell");
- channel.setIn(System.in);
- channel.setOut(System.out);
- channel.setErr(System.err);
- channel.open();
- channel.waitFor(ClientChannel.CLOSED, 0);
- } catch (Throwable t) {
- t.printStackTrace();
- System.exit(1);
- } finally {
- try {
- client.stop();
- } catch (Throwable t) { }
- }
- System.exit(0);
- }
-
-}
-{code}
-
-h2. To the management layer
-
-The Apache Karaf management layer uses JMX. Apache Karaf embeds a JMX MBeanServer that you can use remotely.
-
-In order to use the MBeanServer remotely, you have to write a JMX client.
-
-The following example shows a simple JMX client stopping Apache Karaf remotely via the JMX layer:
-
-{code:lang=java}
-javax.management.*;
-
-public class Main {
-
- public static void main(String[] args) throws Exception {
- JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root");
- JMXConnector connector = JMXConnectorFactory.connect(url, null);
- MBeanServerConnection mbeanServer = connector.getMBeanServerConnection();
- ObjectName systemMBean = new ObjectName("org.apache.karaf:type=system,name=karaf-root");
- mbeanServer.invoke(systemMBean, "halt", null, null);
- connector.close();
- }
-
-}
-{code}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/creating-bundles.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/creating-bundles.conf b/manual/src/main/webapp/developers-guide/creating-bundles.conf
deleted file mode 100644
index da0546c..0000000
--- a/manual/src/main/webapp/developers-guide/creating-bundles.conf
+++ /dev/null
@@ -1,198 +0,0 @@
-h1. Basic bundle creation using the Felix maven-bundle-plugin
-
-Create a bundle instead of a normal jar by using a pom file like this:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>my.groupId</groupId>
- <artifactId>my.bundle</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>My Bundle</name>
- <description>My bundle short description</description>
-
- <build>
- <resources>
- <resource>
- <directory>${project.basedir}/src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.4.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- ...
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-h2. Add extended information to bundles
-
-Karaf supports a OSGI-INF/bundle.info file in a bundle. This file is extended description of the bundle. It supports ASCII character declarations (for adding color, formatting, etc) and some simple Wiki syntax.
-
-Simply add a src/main/resources/OSGI-INF/bundle.info file containing, for instance:
-
-{code}
-h1. SYNOPSIS
- ${project.description}
-
-h1. DESCRIPTION
- Long description of your bundle, including usage, etc.
-
-h1.SEE ALSO
- [http://yourside\]
- [http://yourside/docs\]
-{code}
-
-You can display this extended information using:
-
-{code}
-root@karaf> bundles:info
-{code}
-
-h2. Wiki Syntax
-
-Karaf supports some simple wiki syntax in bunde info files:
-{code}
-h1., h2., ... : Headings
-* : Enumerations
-[http://....] : links
-{code}
-
-h1. Creating bundles for non OSGi third party dependencies
-
-
-h2. Dynamically wrapping jars
-
-Karaf supports the wrap: protocol execution.
-
-It allows for directly deploying third party dependencies, like Apache Commons Lang:
-
-{code}
-root@karaf> bundles:install wrap:mvn:commons-lang/commons-lang/2.4
-{code}
-
-The wrap protocol creates a bundle dynamically using the bnd. Confiugurations can be added in the wrap URL:
-
-from the shell
-{code}
-root@karaf> bundles:install 'wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&Bundle-Version=2.4'
-{code}
-
-from features.xml
-{code}
-<bundle>wrap:mvn:commons-lang/commons-lang/2.4$Bundle-SymbolicName=commons-lang&Bundle-Version=2.4</bundle>
-{code}
-
-h2. Statically bundling jars
-
-You can also create a wrap bundle for a third party dependency.
-This bundle is simply a Maven POM that shades an existing jar and package into a jar bundle.
-
-For instance, to create an OSGi bundle that wraps Apache Commons Lang, simply define the following Maven POM:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>osgi.commons-lang</groupId>
- <artifactId>osgi.commons-lang</artifactId>
- <version>2.4</version>
- <packaging>bundle</packaging>
- <name>commons-lang OSGi Bundle</name>
- <description>This OSGi bundle simply wraps commons-lang-2.4.jar artifact.</description>
-
- <dependencies>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.4</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
- <build>
- <defaultGoal>install</defaultGoal>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <includes>
- <include>commons-lang:commons-lang</include>
- </includes>
- </artifactSet>
- <filters>
- <filter>
- <artifact>commons-lang:commons-lang</artifact>
- <excludes>
- <exclude>**</exclude>
- </excludes>
- </filter>
- </filters>
- <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
- <createDependencyReducedPom>true</createDependencyReducedPom>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.1.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Export-Package></Export-Package>
- <Import-Package></Import-Package>
- <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
- <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Embed-Dependency</_removeheaders>
- </instructions>
- <unpackBundle>true</unpackBundle>
- </configuration>
- </plugin>
- </build>
-
-</project>
-{code}
-
-The resulting OSGi bundle can now be deployed directly:
-
-{code}
-root@karaf> bundles:install -s mvn:osgi.commons-lang/osgi.commons-lang/2.4
-{code}
-
-Some more information is available at [http://gnodet.blogspot.com/2008/09/id-like-to-talk-bit-about-third-party.html], [http://blog.springsource.com/2008/02/18/creating-osgi-bundles/] and [http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html].
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/custom-distribution.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/custom-distribution.conf b/manual/src/main/webapp/developers-guide/custom-distribution.conf
deleted file mode 100644
index 7a27b5f..0000000
--- a/manual/src/main/webapp/developers-guide/custom-distribution.conf
+++ /dev/null
@@ -1,625 +0,0 @@
-
-
-h1. Custom distributions
-
-As Karaf is an OSGi container, it's heavily used as as application and middleware kernel.
-
-You may wish to construct your own Karaf distribution preconfigured to your requirements.
-This custom distribution could contain:
-- branding to change the Karaf console look-and-feel
-- configuration files (in the etc folder) altered to your requirements
-- pre-packaged artifacts in the deploy folder
-- a pre-populated system repository (containing your own bundle and features descriptor)
-- renamed or specific scripts in the bin folder
-- system documentation files
-
-h2. Maven assembly
-
-The recommended way to create a Karaf server assembly is to use the karaf-assembly packaging with the karaf-maven-plugin. This assembles a server from the maven dependencies in the project pom. After explanation of the configuration options we present an example. The Karaf project effectively uses this packaging to assemble the official Karaf distributions, but due to maven limitations we have to simulate rather than use the karaf-assembly packaging.
-
-This packaging creates tar.gz and zip archives containing the assembled server. They are identical except that zip archives don't unpack with appropriate unix file permissions for the scripts.
-
-h3. Maven dependencies
-Maven dependencies in a karaf-assembly project can be feature repositories (classifier "features") or kar archives. Feature repositories are installed in the internal "system" Maven structured repository. Kar archives have their content unpacked on top of the server as well as contained feature repositories installed.
-
-The Maven scope of a dependency determines whether its feature repository is listed in the features service configuration file etc/org.apache.karaf.features.cfg featuresRepositories property:
-
-compile (default): All the features in the repository (or for a kar repositories) will be installed into the startup.properties. The feature repo is not listed in the features service configuration file.
-
-runtime: feature installation is controlled by <startupFeature>, <bootFeature>, and <installedFeature> elements in the karaf-maven-plugin configuration. The feature repo uri is listed in the features service configuration file.
-
-h3. Plugin configuration
-
-Control how features are installed using these elements referring to features from installed feature repositories:
-
-* <startupFeature>foo</startupFeature> This will result in the feature bundles being listed in startup.properties at the appropriate start level and the bundles being copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats.
-
-* <bootFeature>bar</bootFeature> This will result in the feature name added to boot-features in the features service configuration file and all the bundles in the feature copied into the "system" internal repository. You can use feature_name or feature_name/feature_version formats.
-
-* <installedFeature>baz</installedFeature> This will result in all the bundles in the feature being installed in the "system" internal repository. Therefore at runtime the feature may be installed without access to external repositories. You can use feature_name or feature_name/feature_version formats.
-
-h3. Minimal Distribution Example
-
-This is the minimal assembly pom changed to use the packaging and annotated
-
-{code}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
-...
- </parent>
-
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf-minimal</artifactId>
- <version>${project.version}</version>
- <packaging>karaf-assembly</packaging>
- <name>Apache Karaf :: Assemblies :: Minimal Distribution</name>
-
- <dependencies>
- <dependency>
- <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>framework</artifactId>
- <version>${project.version}</version>
- <type>kar</type>
- </dependency>
- <dependency>
- <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>standard</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <build>
- <!-- if you want to include resources in the distribution -->
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/filtered-resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
-
- <plugins>
- <!-- if you want to include resources in the distribution -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>process-resources</id>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- karaf-maven-plugin will call both assembly and archive goals -->
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <!-- no startupFeatures -->
- <bootFeatures>
- <feature>standard</feature>
- </bootFeatures>
- <!-- no installedFeatures -->
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
-{code}
-
-h3. Custom Distribution Example
-
-It's possible to specify feature versions using the name/version format.
-
-For instance, to pre-install Spring 4.0.7.RELEASE_1 feature in your custom distribution, you can use the following pom.xml:
-
-{code}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>my.custom</groupId>
- <artifactId>my.distribution</artifactId>
- <version>1.0</version>
- <packaging>karaf-assembly</packaging>
-
- <dependencies>
- <dependency>
- <!-- scope is compile so all features (there is only one) are installed into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>framework</artifactId>
- <version>4.0.0</version>
- <type>kar</type>
- </dependency>
- <dependency>
- <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>standard</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg file, and features will installed into the system directory if specify in the plugin configuration -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>spring</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <build>
- <!-- if you want to include resources in the distribution -->
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/filtered-resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
-
- <plugins>
- <!-- if you want to include resources in the distribution -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>process-resources</id>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>4.0.0</version>
- <extensions>true</extensions>
- <configuration>
- <!-- no startupFeatures -->
- <bootFeatures>
- <feature>minimal</feature>
- </bootFeatures>
- <installedFeatures>
- <feature>wrapper</feature>
- <feature>spring/4.0.7.RELEASE_1</feature>
- </installedFeatures>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
-{code}
-
-h2. (deprecated old style) Maven assembly
-
-Basically a Karaf custom distribution involves:
-1. Uncompressing a standard Karaf distribution in a given directory.
-2. Populating the system repo with your features.
-3. Populating the lib directory with your branding or other system bundle jar files.
-4. Overriding the configuration files in the etc folder.
-
-These tasks could be performed using scripting, or more easily and portable, using Apache Maven and a set of Maven plugins.
-
-For instance, the Maven POM could look like:
-
-{code}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <groupId>my.company</groupId>
- <artifactId>mycustom-karaf</artifactId>
- <version>1.0</version>
- <packaging>pom</packaging>
- <name>My Unix Custom Karaf Distribution</name>
-
- <properties>
- <karaf.version>${project.version}</karaf.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <version>${karaf.version}</version>
- <type>tar.gz</type>
- </dependency>
- <dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <version>${karaf.version}</version>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>${project.basedir}/src/main/filtered-resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>filter</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>features-maven-plugin</artifactId>
- <version>${karaf.version}</version>
- <executions>
- <execution>
- <id>add-features-to-repo</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>add-features-to-repo</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
- <descriptor>file:${project.basedir}/target/classes/my-features.xml</descriptor>
- </descriptors>
- <features>
- <feature>my-feature</feature>
- </features>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <!-- Define here the artifacts which should be considered in the assembly -->
- <!-- For instance, the branding jar -->
- <artifactItems>
- <artifactItem>
- <groupId>my.groupId</groupId>
- <artifactId>my.branding.id</artifactId>
- <version>1.0</version>
- <outputDirectory>target/dependencies</outputDirectory>
- <destFileName>mybranding.jar</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <execution>
- <!-- Uncompress the standard Karaf distribution -->
- <id>unpack</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <type>tar.gz</type>
- <outputDirectory>target/dependencies</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>bin</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>src/main/descriptors/bin.xml</descriptor>
- </descriptors>
- <appendAssemblyId>false</appendAssemblyId>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-The Maven POM will download the Karaf standard distribution and prepare resources to be processed by the Maven assembly plugin.
-
-Your Maven project structure should look like:
-
-* pom.xml: the previous POM file
-* src/main/descriptors/bin.xml: the assembly Maven plugin descriptor (see below)
-* src/main/filtered-resources: contains all resource files that have Maven property values to be filtered/replaced. Typically, this will include features descriptor and configuration files.
-* src/main/distribution: contains all raw files which will be copied as-is into your custom distribution.
-
-For instance, {{src/main/filtered-resources}} could contain:
-* {{my-features.xml}} where Maven properties will be replaced
-* {{etc/org.apache.karaf.features.cfg}} file containing your my-features descriptor:
-{code}
-#
-# Comma separated list of features repositories to register by default
-#
-featuresRepositories=mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features,mvn:my.groupId/my-features/${project.version}/xml/features
-
-#
-# Comma separated list of features to install at startup
-#
-featuresBoot=config,ssh,management,my-feature
-{code}
-
-The {{src/main/distribution}} contains all your custom Karaf configuration files and script, as, for examples:
-
-* etc/org.ops4j.pax.logging.cfg
-{code}
-# Root logger
-log4j.rootLogger=INFO, out, osgi:VmLogAppender
-log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-log4j.appender.out.file=${karaf.home}/log/my-customer-distribution.log
-log4j.appender.out.append=true
-log4j.appender.out.maxFileSize=1MB
-log4j.appender.out.maxBackupIndex=10
-
-# Sift appender
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=my-custom
-log4j.appender.sift.appender=org.apache.log4j.FileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
-log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
-{code}
-* etc/system.properties
-{code}
-#
-# The properties defined in this file will be made available through system
-# properties at the very beginning of the FAS boot process.
-#
-
-# Log level when the pax-logging service is not available
-# This level will only be used while the pax-logging service bundle
-# is not fully available.
-# To change log levels, please refer to the org.ops4j.pax.logging.cfg file
-# instead.
-org.ops4j.pax.logging.DefaultServiceLog.level=ERROR
-
-#
-# Name of this custom instance.
-#
-karaf.name=my-custom
-
-#
-# Default repository where bundles will be loaded from before using
-# other Maven repositories. For the full Maven configuration, see the
-# org.ops4j.pax.url.mvn.cfg file.
-#
-karaf.default.repository=system
-
-#
-# Location of a shell script that will be run when starting a shell
-# session. This script can be used to create aliases and define
-# additional commands.
-#
-karaf.shell.init.script=${karaf.home}/etc/shell.init.script
-
-#
-# Set this empty property to avoid errors when validating xml documents.
-#
-xml.catalog.files=
-
-#
-# Suppress the bell in the console when hitting backspace to many times
-# for example
-#
-jline.nobell=true
-
-#
-# Default port for the OSGi HTTP Service
-#
-org.osgi.service.http.port=8181
-
-#
-# Allow usage of ${custom.home} as an alias for ${karaf.home}
-#
-custom.home=${karaf.home}
-{code}
-* etc/users.properties
-{code}
-admin=admin,admin
-{code}
-* You can add a {{etc/custom.properties}}, it's a placeholder for any override you may need. For instance:
-{code}
-karaf.systemBundlesStartLevel=50
-obr.repository.url=http://svn.apache.org/repos/asf/servicemix/smx4/obr-repo/repository.xml
-org.osgi.framework.system.packages.extra = \
- org.apache.karaf.branding; \
- com.sun.org.apache.xalan.internal.xsltc.trax; \
- com.sun.org.apache.xerces.internal.dom; \
- com.sun.org.apache.xerces.internal.jaxp; \
- com.sun.org.apache.xerces.internal.xni; \
- com.sun.jndi.ldap
-{code}
-
-Now, we can "assemble" our custom distribution using the Maven assembly plugin. The Maven assembly plugin uses an
-assembly descriptor, configured in POM above to be {{src/main/descriptors/bin.xml}}:
-
-{code}
-<assembly>
-
- <id>bin</id>
-
- <formats>
- <format>tar.gz</format>
- </formats>
-
- <fileSets>
-
- <!-- Expanded Karaf Standard Distribution -->
- <fileSet>
- <directory>target/dependencies/apache-karaf-${karaf.version}</directory>
- <outputDirectory>/</outputDirectory>
- <excludes>
- <exclude>**/demos/**</exclude>
- <exclude>bin/**</exclude>
- <exclude>etc/system.properties</exclude>
- <exclude>etc/users.properties</exclude>
- <exclude>etc/org.apache.karaf.features.cfg</exclude>
- <exclude>etc/org.ops4j.pax.logging.cfg</exclude>
- <exclude>LICENSE</exclude>
- <exclude>NOTICE</exclude>
- <exclude>README</exclude>
- <exclude>RELEASE-NOTES</exclude>
- <exclude>karaf-manual*.html</exclude>
- <exclude>karaf-manual*.pdf</exclude>
- </excludes>
- </fileSet>
-
- <!-- Copy over bin/* separately to get the correct file mode -->
- <fileSet>
- <directory>target/dependencies/apache-karaf-${karaf.version}</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>bin/admin</include>
- <include>bin/karaf</include>
- <include>bin/start</include>
- <include>bin/stop</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
-
- <!-- Copy over jar files -->
- <fileSet>
- <directory>target/dependencies</directory>
- <includes>
- <include>my-custom.jar</include>
- </includes>
- <outputDirectory>/lib/</outputDirectory>
- </fileSet>
-
- <fileSet>
- <directory>src/main/distribution</directory>
- <outputDirectory>/</outputDirectory>
- <fileMode>0644</fileMode>
- </fileSet>
- <fileSet>
- <directory>target/classes/etc</directory>
- <outputDirectory>/etc/</outputDirectory>
- <lineEnding>unix</lineEnding>
- <fileMode>0644</fileMode>
- </fileSet>
-
- <fileSet>
- <directory>target/features-repo</directory>
- <outputDirectory>/system</outputDirectory>
- </fileSet>
-
- </fileSets>
-
- <files>
- <file>
- <source>${basedir}/target/dependencies/apache-karaf-${karaf.version}/bin/karaf</source>
- <outputDirectory>/bin/</outputDirectory>
- <destName>my-custom</destName>
- <fileMode>0755</fileMode>
- <lineEnding>unix</lineEnding>
- </file>
- <file>
- <source>${basedir}/target/classes/features.xml</source>
- <outputDirectory>/system/my.groupid/my-features/${project.version}</outputDirectory>
- <destName>my-features-${project.version}-features.xml</destName>
- <fileMode>0644</fileMode>
- <lineEnding>unix</lineEnding>
- </file>
- </files>
-
-</assembly>
-{code}
-
-To build your custom Karaf distribution, just run:
-
-{code}
-mvn install
-{code}
-
-You will find your Karaf custom distribution tar.gz in the target directory.
-
-h2. Roadmap
-
-A distribution goal is in preparation in the next Karaf
-
-h2. Custom distribution examples
-
-* [Apache ServiceMix 4|http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/assemblies/]
-* [Apache ServiceMix NMR|http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/bundle/]
-* [BuildProcess BuildEraser|http://buildprocess.svn.sourceforge.net/viewvc/buildprocess/builderaser/trunk/assembly/]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/debugging.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/debugging.conf b/manual/src/main/webapp/developers-guide/debugging.conf
deleted file mode 100644
index 3661590..0000000
--- a/manual/src/main/webapp/developers-guide/debugging.conf
+++ /dev/null
@@ -1,162 +0,0 @@
-h1. Troubleshooting, Debugging, Profiling, and Monitoring
-
-h2. Troubleshooting
-
-h3. Logging
-
-Logging is easy to control through the console, with commands grouped under _log_ shell. To learn about the available
-logging commands type:
-
-{code}
-karaf@root> log<tab>
-
-log:display log:display-exception log:get log:set
-karaf@root>
-{code}
-
-Typical usage is:
-
- # Use {{log:set}} to dynamically change the global log level
- # Execute the problematic operation
- # Use {{log:display}} (or {{log:display-exception}} to display the log
-
-h3. Worst Case Scenario
-If you end up with a Karaf in a really bad state (i.e. you can not boot it anymore) or you just want to revert to a
-clean state quickly, you can safely remove the {{data}} directory just in the installation directory. This folder
-contains transient data and will be recreated if removed when you relaunch Karaf.
-You may also want to remove the files in the {{deploy}} folder to avoid them being automatically installed when Karaf
-is started the first time.
-
-h2. Debugging
-
-Usually, the easiest way to debug Karaf or any application deployed onto it is to use remote debugging.
-Remote debugging can be easily activated by using the {{debug}} parameter on the command line.
-
-{noformat}
-> bin/karaf debug
-{noformat}
-or on Windows
-{noformat}
-> bin\karaf.bat debug
-{noformat}
-
-Another option is to set the {{KARAF_DEBUG}} environment variable to {{TRUE}}.
-
-This can be done using the following command on Unix systems:
-{noformat}
-export KARAF_DEBUG=true
-{noformat}
-
-On Windows, use the following command
-{noformat}
-set KARAF_DEBUG=true
-{noformat}
-
-Then, you can launch Karaf using the usual way:
-{noformat}
-bin/karaf
-{noformat}
-or
-{noformat}
-bin\karaf.bat
-{noformat}
-
-Last, inside your IDE, connect to the remote application (the default port to connect to is 5005).
-
-This option works fine when it is needed to debug a project deployed top of Apache Karaf. Nervertheless, you will be blocked
-if you would like to debug the server Karaf. In this case, you can change the following parameter suspend=y in the
-karaf.bat script file. That will cause the JVM to pause just before running main() until you attach a debugger then it
-will resume the execution. This way you can set your breakpoints anywhere in the code and you should hit them no matter
-how early in the startup they are.
-
-{code}
-export DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
-{code}
-
-and on Windows,
-
-{code}
-set DEFAULT_JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
-{code}
-
-h3. Debugging Environment Variables
-
-||Variable||Description||Default||
-|KARAF_DEBUG|Set to TRUE to enable debugging.| |
-|EXTRA_JAVA_OPTS|Java options append to JAVA_OPTS | |
-|JAVA_DEBUG_OPTS|Java options to enable debuging.|Calculated based on the OS|
-|JAVA_DEBUG_PORT|Port used by the debugger.|5005|
-
-h2. Profiling
-
-h3. jVisualVM
-
-You have to edit the {{etc/config.properties}} configuration file to add the jVisualVM package:
-
-{code}
-org.osgi.framework.bootdelegation=...,org.netbeans.lib.profiler.server
-{code}
-
-Run Karaf from the console, and you should now be able to connect using jVisualVM.
-
-h3. YourKit
-
-You need a few steps to be able to profile Karaf using YourKit.
-
-The first one is to edit the {{etc/config.properties}} configuration file and add the following property:
-
-{code}
-org.osgi.framework.bootdelegation=...,com.yourkit.*
-{code}
-
-Then, set the {{JAVA_OPTS}} environment variable:
-
-{code}
-export JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
-{code}
-
-or, on Windows
-
-{code}
-set JAVA_OPTS='-Xmx512M -agentlib:yjpagent'
-{code}
-
-Run Karaf from the console, and you should now be able to connect using YourKit standalone or from your favorite IDE.
-
-h2. Monitoring
-
-Karaf uses JMX for monitoring and management of all Karaf components.
-
-The JMX connection could be:
-* local using the process id
-
-!/images/jconsole_connect.jpg|border=1!
-
-* remote using the {{rmiRegistryPort}} property defined in {{etc/org.apache.karaf.management.cfg}} file.
-
-Using JMX, you can have a clean overview of the running Karaf instance:
-
-* A overview with graphics displaying the load in terms of thread, heap/GC, etc:
-
-!/images/jconsole_overview.jpg|border=1!
-
-* A thread overview:
-
-!/images/jconsole_threads.jpg|border=1!
-
-* A memory heap consumption, including "Perform GC" button:
-
-!/images/jconsole_memory.jpg|border=1!
-
-* A complete JVM summary, with all number of threads, etc:
-
-!/images/jconsole_summary.jpg|border=1!
-
-You can manage Karaf features like you are in the shell. For example, you have access to the Admin service MBean,
-allowing you to create, rename, destroy, change SSH port, etc. Karaf instances:
-
-!/images/jconsole_admin.jpg|border=1!
-
-You can also manage Karaf features MBean to list, install, and uninstall Karaf features:
-
-!/images/jconsole_features.jpg|border=1!
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/developer-commands.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/developer-commands.conf b/manual/src/main/webapp/developers-guide/developer-commands.conf
deleted file mode 100644
index e442530..0000000
--- a/manual/src/main/webapp/developers-guide/developer-commands.conf
+++ /dev/null
@@ -1,228 +0,0 @@
-h1. Developer commands
-
-As you can see in the users guide, Apache Karaf is an enterprise ready OSGi container.
-
-It's also a container designed to simplify the life for developers and administrators to get details about the
-running container.
-
-h2. Dump
-
-If you encounter issues like performance degradations, weird behaviour, it could be helpful to have a kind of snapshot
-about the current activity of the container.
-
-The {{dev:dump-create}} command creates a dump file containing:
-
-* the {{bundles.txt}} file contains the list of all OSGi bundles, with id, symbolic name, version, current status
-* the {{features.txt}} file contains the list of all features, including current status
-* the {{environment.txt}} file contains details about Apache Karaf, OSGi framework, Operating System, JVM, system
- properties, threads count, classes loaded
-* the {{memory.txt}} file contains the status of the JVM memory at the dump time
-* the {{heapdump.txt}} file contains a memory heap dump, with all objects instances, space usage, etc.
-* the {{threads.txt}} file contains a thread dump, with all threads, waiting status, etc.
-* the {{log}} folder contains the {{data/log}} folder, with all log files.
-
-By default, the {{dev:dump-create}} command creates a zip file in the {{KARAF_BASE}} folder, with the timestamp of the
-dump creation:
-
-{code}
-karaf@root()> dev:dump-create
-Created dump zip: 2015-07-01_171434.zip
-{code}
-
-We can see the file generated in the {{KARAF_BASE}} folder:
-
-{code}
-$ cd /opt/apache-karaf-4.0.0
-$ ls -lh *.zip
--rw-rw-r-- 1 user group 17M Jul 1 17:14 2015-07-01_171434.zip
-{code}
-
-You can specify the file name of the zip archive:
-
-{code}
-karaf@root()> dev:dump-create mydump.zip
-Diagnostic dump created.
-{code}
-
-Instead of a zip archive, you can create the dump (exploded) in a directory using the {{-d}} ({{--directory}}) option:
-
-{code}
-karaf@root()> dev:dump-create -d /tmp/mydump
-Diagnostic dump created.
-{code}
-
-h2. Diagnostic
-
-It's not always easy for the developers to understand why a bundle is not active.
-
-It could be because the Activator failed, the Blueprint container start failed, etc.
-
-The {{bundle:diag}} command gives you details about a bundle is not active:
-
-{code}
-karaf@root()> bundle:diag
-Apache ServiceMix :: Bundles :: avro-ipc (81)
----------------------------------------------
-Status: Installed
-Unsatisfied Requirements:
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=javax.servlet)(version>=2.5.0)(!(version>=3.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=javax.servlet.http)(version>=2.5.0)(!(version>=3.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.data)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.file)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.generic)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.io)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.reflect)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.specific)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.avro.util)(version>=1.7.0)(!(version>=2.0.0)))
-[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity)
-[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.app)
-[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.context)
-[81.0] osgi.wiring.package; (osgi.wiring.package=org.apache.velocity.exception)
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.bootstrap)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.buffer)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel.group)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.channel.socket.nio)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.codec.frame)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.codec.oneone)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.jboss.netty.handler.execution)(version>=3.4.0)(!(version>=4.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty)(version>=6.1.0)(!(version>=7.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.bio)(version>=6.1.0)(!(version>=7.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.nio)(version>=6.1.0)(!(version>=7.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.jetty.servlet)(version>=6.1.0)(!(version>=7.0.0)))
-[81.0] osgi.wiring.package; (&(osgi.wiring.package=org.mortbay.resource)(version>=6.1.0)(!(version>=7.0.0)))
-{code}
-
-h2. Dynamic import
-
-The {{bundle:dynamic-import}} command allows you to enable or disable the dynamic import of a given bundle:
-
-{code}
-karaf@root()> bundle:dynamic-import 50
-Enabling dynamic imports on bundle org.ops4j.pax.url.wrap [50]
-{code}
-
-The purpose of dynamic import is to allow a bundle to be wired up to packages that may not be knwon about in advance.
-When a class is requested, if it cannot be solved via the bundle's existing imports, the dynamic import allows other
-bundles to be considered for a wiring import to be added.
-
-The {{bundle:dynamic-import}} command allows or doesn't allow this behaviour.
-
-h2. OSGi framework
-
-The {{system:framework}} command allows to display the current OSGi framework in use, and enable/disable debugging inside the OSGi framework.
-
-{code}
-karaf@root()> system:framework
-Current OSGi framework is felix
-karaf@root()> system:framework -debug
-Enabling debug for OSGi framework (felix)
-karaf@root()> system:framework -nodebug
-Disabling debug for OSGi framework (felix)
-{code}
-
-h2. Stack traces printout
-
-The {{shell:stack-traces-print}} command prints the full stack trace when the execution of a command
-throws an exception.
-
-You can enable or disable this behaviour by passing true (to enable) or false (to disable) on the command on the fly:
-
-{code}
-karaf@root()> stack-traces-print
-Printing of stacktraces set to true
-karaf@root()> bundle:start
-java.lang.RuntimeException: Access to system bundle 0 denied. You can override with -f
- at org.apache.karaf.bundle.command.BundlesCommand.assertNoSystemBundles(BundlesCommand.java:57)
- at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:48)
- at org.apache.karaf.bundle.command.BundlesCommandWithConfirmation.doExecute(BundlesCommandWithConfirmation.java:41)
- at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
- at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
- at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
- at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:601)
- at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
- at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
- at org.apache.karaf.shell.console.commands.$BlueprintCommand14083304.execute(Unknown Source)
- at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:601)
- at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
- at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
- at org.apache.karaf.shell.console.commands.$BlueprintCommand14083304.execute(Unknown Source)
- at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
- at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
- at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
- at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
- at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
- at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
- at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
- at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:497)
- at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:198)
- at java.lang.Thread.run(Thread.java:722)
- at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:118)
- at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:109)
- at java.security.AccessController.doPrivileged(Native Method)
- at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)
- at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:107)
-karaf@root()> stack-traces-print false
-Printing of stacktraces set to false
-karaf@root()> bundle:start
-Error executing command: Access to system bundle 0 denied. You can override with -f
-{code}
-
-h2. Bundle tree
-
-The {{bundle:tree-show}} command shows the bundle dependency tree based on the wiring information of a given single bundle
-ID.
-
-{code}
-karaf@root()> bundle:tree-show 40
-Bundle org.ops4j.pax.url.wrap [40] is currently ACTIVE
-
-org.ops4j.pax.url.wrap [40]
-+- org.ops4j.base.util.property [14]
-+- org.ops4j.pax.url.commons [49]
-| +- org.ops4j.base.util.property [14]
-| +- org.ops4j.pax.logging.pax-logging-api [23]
-| +- org.ops4j.pax.swissbox.property [31]
-| | +- org.ops4j.base.util.property [14]
-| | +- org.ops4j.base.lang [41]
-| +- org.apache.felix.configadmin [43]
-| | +- org.ops4j.pax.logging.pax-logging-api [23]
-| +- org.ops4j.base.lang [41]
-+- org.ops4j.pax.logging.pax-logging-api [23]
-+- org.ops4j.pax.swissbox.bnd [25]
-| +- biz.aQute.bndlib [30]
-| | +- org.apache.servicemix.bundles.junit [36]
-| +- org.ops4j.pax.logging.pax-logging-api [23]
-| +- org.ops4j.base.lang [41]
-+- org.apache.felix.configadmin [43]
-+- org.ops4j.base.net [29]
-| +- org.ops4j.base.monitors [37]
-| +- org.ops4j.base.lang [41]
-+- org.ops4j.base.lang [41]
-{code}
-
-h2. Watch
-
-The {{bundle:watch}} command enables watching the local Maven repository for updates on bundles.
-If the bundle file changes on the Maven repository, Apache Karaf will automatically update the bundle.
-
-The {{bundle:watch}} allows you to configure a set of URLs to monitore. All bundles bundles whose location matches the
-given URL will be automatically updated. It avoids needing to manually update the bundles or even copy the bundle to the
-system folder.
-
-{warning}
-Only Maven based URLs and Maven SNAPSHOTs will actually be updated automatically.
-{warning}
-
-The following command:
-
-{code}
-karaf@root()> bundle:watch *
-{code}
-
-will monitor all bundles that have a location matching mvn:* and '-SNAPSHOT' in their URL.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/extending.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/extending.conf b/manual/src/main/webapp/developers-guide/extending.conf
deleted file mode 100644
index eb04003..0000000
--- a/manual/src/main/webapp/developers-guide/extending.conf
+++ /dev/null
@@ -1,340 +0,0 @@
-h1. Extending
-
-Apache Karaf is a very flexible container that you can extend very easily.
-
-h2. Console
-
-In this section, you will see how to extend the console by adding your own command.
-
-We will leverage Apache Maven to create and build the OSGi bundle.
-This OSGi bundle will use Blueprint. We don't cover the details of OSGi bundle and Blueprint, see the specific
-sections for details.
-
-h3. Create the Maven project
-
-To create the Maven project, we can:
-
-* use a Maven archetype
-* create by hand
-
-h4. Using archetype
-
-The Maven Quickstart archetype can create an empty Maven project where you can put your project definition.
-
-You can directly use:
-
-{code}
-mvn archetype:create \
- -DarchetypeArtifactId=maven-archetype-quickstart \
- -DgroupId=org.apache.karaf.shell.samples \
- -DartifactId=shell-sample-commands \
- -Dversion=1.0-SNAPSHOT
-{code}
-
-It results to a ready to use project, including a {{pom.xml}}.
-
-You can also use Maven archetype in interactive mode. You will have to answer to some questions used to generate
-the project with the {{pom.xml}}:
-
-{code}
-mvn archetype:generate
-Choose a number: (1/2/3/4/5/6/7/.../32/33/34/35/36) 15: : 15
-Define value for groupId: : org.apache.karaf.shell.samples
-Define value for artifactId: : shell-sample-commands
-Define value for version: 1.0-SNAPSHOT: :
-Define value for package: : org.apache.karaf.shell.samples
-{code}
-
-h3. By hand
-
-Alternatively, you can simply create the directory {{shell-sample-commands}} and create the {{pom.xml}} file inside it:
-
-{code:lang=xml}
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.karaf.shell.samples</groupId>
- <artifactId>shell-sample-commands<artifactId>
- <packaging>bundle</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>shell-sample-commmands</name>
-
-
- <dependencies>
- <dependency>
- <groupId>org.apache.karaf.shell</groupId>
- <artifactId>org.apache.karaf.shell.console</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>${felix.plugin.version}</version>
- <configuration>
- <instructions>
- <Import-Package>
- org.apache.felix.service.command,
- org.apache.karaf.shell.commands,
- org.apache.karaf.shell.console,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-h3. Configuring for Java 6/7
-
-We are using annotations to define commands, so we need to ensure Maven will actually use JDK 1.6 or 1.7 to compile the jar.
-Just add the following snippet after the {{dependencies}} section.
-
-{code:lang=xml}
-<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <target>1.6</target>
- <source>1.6</source>
- </configuration>
- </plugin>
- </plugins>
-</build>
-{code}
-
-h3. Loading the project in your IDE
-
-We can use Maven to generate the needed files for your IDE:
-
-Inside the project, run the following command
-{code}
-mvn eclipse:eclipse
-{code}
-or
-{code}
-mvn idea:idea
-{code}
-
-The project files for your IDE should now be created. Just open the IDE and load the project.
-
-h3. Creating a basic command class
-
-We can now create the command class {{HelloShellCommand.java}}
-
-{code:lang=java}
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
- @Override
- public Object execute() throws Exception {
- System.out.println("Executing Hello command");
- return null;
- }
-}
-{code}
-
-h3. Manifest
-
-In order for Karaf to find your command, you need to add the {{Karaf-Commands=*}} manifest header.
-
-This is usually done by modifying the maven bundle plugin configuration
-{code:lang=xml}
-<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Karaf-Commands>*</Karaf-Commands>
- </instructions>
- </configuration>
-</plugin>
-{code}
-
-h3. Compile
-
-Let's try to build the jar. Remove the test classes and sample classes if you used the artifact, then from the command line, run:
-
-{code}
-mvn install
-{code}
-
-The end of the maven output should look like:
-{code}
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESSFUL
-[INFO] ------------------------------------------------------------------------
-{code}
-
-h3. Test
-
-Launch Apache Karaf and install your bundle:
-
-{code}
-karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
-{code}
-
-Let's try running the command:
-
-{code}
-karaf@root()> test:hello
-Executing Hello command
-{code}
-
-h3. Command completer
-
-A completer allows you to automatically complete a command argument using <tab>. A completer is simply a bean which is
-injected to a command.
-
-Of course to be able to complete it, the command should require an argument.
-
-h3. Command argument
-
-We add an argument to the HelloCommand:
-
-{code:lang=java}
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.Completion;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
- @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
- @Completion(SimpleNameCompleter.class)
- String name = null;
-
- @Override
- public Object execute() throws Exception {
- System.out.println("Hello " + name);
- return null;
- }
-}
-{code}
-
-h3. Completer bean
-
-A completer is a bean which implements the Completer interface:
-
-{code:lang=java}
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-import org.apache.karaf.shell.api.console.CommandLine;
-import org.apache.karaf.shell.api.console.Completer;
-import org.apache.karaf.shell.api.console.Session;
-import org.apache.karaf.shell.support.completers.StringsCompleter;
-
-/**
- * <p>
- * A very simple completer.
- * </p>
- */
-@Service
-public class SimpleNameCompleter implements Completer {
-
- public int complete(Session session, CommandLine commandLine, List<String> candidates) {
- StringsCompleter delegate = new StringsCompleter();
- delegate.getStrings().add("Mike");
- delegate.getStrings().add("Eric");
- delegate.getStrings().add("Jenny");
- return delegate.complete(buffer, cursor, candidates);
- }
-
-}
-{code}
-
-h3. Completers for option values
-
-Quite often your commands will not have just arguments, but also options. You can provide completers for option values.
-The snippet below shows the HelloShellCommand with an option to specify what the greet message will be.
-
-{code:lang=java}
-package org.apache.karaf.shell.samples;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-import org.apache.karaf.shell.api.action.Completion;
-import org.apache.karaf.shell.api.action.Option;
-import org.apache.karaf.shell.api.action.lifecycle.Service;
-
-@Command(scope = "test", name = "hello", description="Says hello")
-@Service
-public class HelloShellCommand implements Action {
-
- @Argument(index = 0, name = "name", description = "The name that sends the greet.", required = true, multiValued = false)
- @Completion(SimpleNameCompleter.class)
- String name = null;
-
- @Option(name = "-g", aliases = "--greet", description = "The configuration pid", required = false, multiValued = false)
- @Completion(GreetCompleter.class)
- String greet = "Hello;
-
- @Override
- public Object execute() throws Exception {
- System.out.println(greet + " " + name);
- return null;
- }
-}
-{code}
-
-h3. Completers with state
-
-Some times we want to tune the behavior of the completer depending on the commands already executed, in the current shell
-or even the rest of the arguments that have been already passed to the command. Such example is the config:set-property
-command which will provide auto completion for only for the properties of the pid specified by a previously issued config:edit
-command or by the option --pid.
-
-The Session object provides map like methods for storing key/value pairs and can be used to put/get the state.
-The pre-parsed CommandLine objects allows you to check the previous arguments and options on the command line and to fine tune
-the behavior of the Completer.
-Those two objects are given to the Completer when calling the {{complete}} method.
-
-h3. Test
-
-Launch a Karaf instance and run the following command to install the newly created bundle:
-
-{code}
-karaf@root()> bundle:install -s mvn:org.apache.karaf.shell.samples/shell-sample-commands/1.0-SNAPSHOT
-{code}
-
-Let's try running the command:
-
-{code}
-karaf@root> test:hello <tab>
- one two three
-{code}
-
-h2. WebConsole
-
-You can also extend the Apache Karaf WebConsole by providing and installing a webconsole plugin.
-
-A plugin is an OSGi bundle that register a Servlet as an OSGi service with some webconsole properties.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/github-contributions.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/github-contributions.conf b/manual/src/main/webapp/developers-guide/github-contributions.conf
deleted file mode 100644
index d278f0d..0000000
--- a/manual/src/main/webapp/developers-guide/github-contributions.conf
+++ /dev/null
@@ -1,73 +0,0 @@
-h1. Github Contributions
-
-Some people prefer to make contributions to karaf source via github. If you are one of them, this is for you!
-
-
-h2. Introduction
-
-Apache Karaf is available as a periodically replicated mirror on: [https://github.com/apache/karaf]
-
-
-h2. Suggested Workflow
-
-# make a fork of karaf repo github mirror
-# do all your new work on your own karaf fork
-# when ready, file a jira issue [https://issues.apache.org/jira/browse/KARAF], attach the link to your github pull request, and ask for a review
-# one of karaf committers will discuss your pull request on github; and at some point your pull request will be accepted
-# when your pull request is accepted, squash it into a single commit and attach single patch file to the original jira, with ASF grant check box selected
-# now pray to your favorite ASF committer to really accept the patch :-)
-# when your patch is committed to the svn, and you can verify it in the latest karaf snapshot, close your pull request on github
-
-
-h2. License Reminder
-
-in order for your contributions to be accepted:
-
-* all files must contain ASL license grant header
-
-* you must select ASF grant check box when attaching patch to the jira
-
-
-h2. How to Generate a One-File-Patch Via Throw-Away Branch
-
-here is one way to generate squash of your commits:
-
-[http://stackoverflow.com/questions/616556/how-do-you-squash-commits-into-one-patch-with-git-format-patch]
-
-{code}
-
-#
-# 'archon' referers to karaf mirror
-# 'origin' referers to your own fork
-#
-
-# attach karaf mirror as remote, if not done yet
-git remote add archon https://github.com/apache/karaf
-
-# fetch latest karaf mirror
-git fetch archon
-
-# ensure you are on your fork trunk
-git checkout origin/trunk
-
-# kill previous patch delivery, if you had one
-git branch -D delivery
-
-# make new delivery throw-away branch, based on latest karaf mirror
-git branch delivery archon/trunk
-
-# use it
-git checkout delivery
-
-# squash all your local development into a single commit
-git merge --squash trunk
-
-# commit it to the delivery branch
-git commit -m "delivery"
-
-# generate a patch file against the mirror
-git format-patch archon/trunk
-
-{code}
-
-root of your karaf source now contains a file named "0001-delivery.patch.txt" (please attach the .txt ending;this will allow commiters to open your patch directly in the browser and give it a short look there) which you should attach to your karaf jira, and ask to commit to the svn trunk
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/index.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/index.conf b/manual/src/main/webapp/developers-guide/index.conf
deleted file mode 100644
index 1aaaa52..0000000
--- a/manual/src/main/webapp/developers-guide/index.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-h1. Developers Guide
-
-* [Developer commands|developer-commands]
-* [Scripting|scripting]
-* [Programmatically connect|connect]
-* [Branding|branding]
-* [Extending|extending]
-* [Karaf Maven plugin|karaf-maven-plugin]
-* [Custom distribution|custom-distribution]
-* [OSGi services|services]
-* [Create OSGi bundle|creating-bundles]
-* [Blueprint|blueprint]
-* [CDI|cdi]
-* [Maven Archetypes|archetypes]
-* [Security Framework|security-framework]
-* [Troubleshooting, Debugging, Profiling|debugging]
-* [Integration testing|writing-tests]
-* [Github Contributions|github-contributions]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-commands-generate-help.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-commands-generate-help.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-commands-generate-help.conf
deleted file mode 100644
index d81b1bf..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-commands-generate-help.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-h2. Goal {{karaf:commands-generate-help}}
-
-The {{karaf:commands-generate-help}} goal generates documentation containing Karaf commands help.
-
-It looks for Karaf commands in the current project class loader and generates the help as displayed with the --help
-option in the Karaf shell console.
-
-h3. Example
-The example below generates help for the commands in the current project:
-{pygmentize:xml}
-<project>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
-
- <executions>
- <execution>
- <id>document-commands</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>commands-generate-help</goal>
- </goals>
- <configuration>
- <targetFolder>${project.build.directory}/docbook/sources</targetFolder>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
-h3. Parameters
-|| Name || Type || Description ||
-| {{targetFolder}} | {{File}} | The directory where the documentation output files are to be generated \\ Default value: ${project.build.directory}/docbkx/sources |
-| {{format}} | {{String}} | The output format (docbx or conf) of the commands documentation. \\ Default value: docbx |
-| {{classLoader}} | {{String}} | The class loader to use in loading the commands. \\ Default value: ${project} |
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-add-to-repository.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-add-to-repository.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-add-to-repository.conf
deleted file mode 100644
index b2720cd..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-add-to-repository.conf
+++ /dev/null
@@ -1,52 +0,0 @@
-h2. Goal {{karaf:features-add-to-repository}}
-
-Consider using the karaf-assembly packaging which makes it easy to assemble a custom distribution in one step instead of this individual goal.
-
-The {{karaf:features-add-to-repository}} goal adds all the required bundles for a given set of features into directory. You can use this goal to create a {{/system}} directory for building your own Karaf-based distribution.
-
-By default, the Karaf core features descriptors (standard and enterprise) are automatically included in the descriptors set.
-
-h3. Example
-The example below copies the bundles for the {{spring}} and {{war}} features defined in the Karaf features XML descriptor into the {{target/features-repo}} directory.
-{pygmentize:xml}
-<project>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
-
- <executions>
- <execution>
- <id>features-add-to-repo</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>features-add-to-repository</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>mvn:org.apache.karaf.features/standard/4.0.0/xml/features</descriptor>
- <descriptor>mvn:my.groupid/my.artifactid/1.0.0/xml/features</descriptor>
- </descriptors>
- <features>
- <feature>spring</feature>
- <feature>war</feature>
- <feature>my</feature>
- </features>
- <repository>target/features-repo</repository>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
-h3. Parameters
-|| Name || Type || Description ||
-| {{descriptors}} | {{String[]}} | List of features XML descriptors where the features are defined |
-| {{features}} | {{String[]}} | List of features that bundles should be copied to the repository directory |
-| {{repository}} | {{File}} | The directory where the bundles will be copied by the plugin goal |
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-create-kar.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-create-kar.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-create-kar.conf
deleted file mode 100644
index 1e8fe45..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-create-kar.conf
+++ /dev/null
@@ -1,33 +0,0 @@
-h2. Goal {{karaf:kar}}
-
-Except in unusual circumstances, use the <packaging>kar</packaging> to run this goal.
-
-The {{karaf:kar}} goal assembles a KAR archive from a features XML descriptor file, normally generated in the same project with the {{karaf:features-generate-descriptor}} mojo.
-
-h2. kar layout
-
-There are two important directories in a kar:
-repository/ contains a Maven structured repository of artifacts to be copied into the Karaf repository. The features descriptor and all the bundles mentioned in it are installed in this directory.
-resources/ contains other resources to be copied over the Karaf installation.
-
-Everything in target/classes is copied into the kar. Therefore resources you want installed into Karaf need to be in e.g. src/main/resources/resources. This choice is so other resources such as legal files from the maven-remote-resources-plugin can be included under META-INF in the kar, without getting installed into Karaf.
-
-h3. Example
-{pygmentize:xml}
-<project>
-...
- <packaging>kar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
- <extensions>true</extensions>
- <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-generate-descriptor.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-generate-descriptor.conf b/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-generate-descriptor.conf
deleted file mode 100644
index 6a71d60..0000000
--- a/manual/src/main/webapp/developers-guide/karaf-maven-plugin-features-generate-descriptor.conf
+++ /dev/null
@@ -1,58 +0,0 @@
-h2. Goal {{karaf:features-generate-descriptor}}
-
-Except in unusual circumstances, use the <packaging>feature</packaging> to run this goal.
-
-The {{karaf:features-generate-descriptor}} goal generates a features XML file based on the Maven dependencies. By default, it will follow Maven transitive dependencies, stopping when it encounters bundles already present in features that are Maven dependencies.
-
-A record of the dependency tree search can be found in target/history/treeListing.txt.
-
-You can track dependency changes and warn or fail on change.
-
-h2. Configuration
-
-Specify the packaging as a top level element
-
-{code}
-<packaging>feature</packaging>
-{code}
-
-You can supply a feature descriptor to extend in src/main/feature/feature.xml.
-
-|| Parameter Name || Type || Description ||
-| aggregateFeatures | boolean (false) | Specifies processing of feature repositories that are (transitive) Maven dependencies. If false, all features in these repositories become dependencies of the generated feature. If true, all features in these repositories are copied into the generated feature repository. |
-| startLevel | int | The start level for the bundles determined from Maven dependencies. This can be overridden by specifying the bundle in the source feature.xml with the desired startlevel. |
-| includeTransitiveDependency | boolean (true) | Whether to follow Maven transitive dependencies. |
-| checkDependencyChange | boolean (false) | Whether to record dependencies in src/main/history.dependencies.xml for change tracking. |
-| warnOnDependencyChange | boolean (false) | whether to fail on changed dependencies (false, default) or warn in the build output (true). |
-| logDependencyChanges | boolean (false) | If true, added and removed dependencies are shown in target/history. |
-| overwriteChangedDependencies | boolean (false) | If true, the src/main/history/dependencies.xml file will be overwritten if it has changed. |
-
-h3. Example
-{pygmentize:xml}
-<project>
-...
- <packaging>feature</packaging>
- <dependencies>
- <dependency>
- <groupId>org.apache</groupId>
- <artifactId>bundle1</artifactId>
- <version>1.0</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${project.version}</version>
- <extensions>true</extensions>
- <configuration>
- <startLevel>80</startLevel>
- <aggregateFeatures>true</aggregateFeatures>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
-{pygmentize}
-
[02/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/remote.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/remote.conf b/manual/src/main/webapp/users-guide/remote.conf
deleted file mode 100644
index ddce509..0000000
--- a/manual/src/main/webapp/users-guide/remote.conf
+++ /dev/null
@@ -1,409 +0,0 @@
-h1. Remote
-
-Apache Karaf supports a complete remote mechanism allowing you to remotely connect to a running Apache Karaf instance.
-More over, you can also browse, download, and upload files remotely to a running Apache Karaf instance.
-
-Apache Karaf embeds a complete SSHd server.
-
-h2. SSHd server
-
-When you start Apache Karaf, it enables a remote console that can be accessed over SSH.
-
-This remote console provides all the features of the "local" console, and gives a remote user complete control over the
-container and services running inside of it. As the "local" console, the remote console is secured by a RBAC mechanism
-(see the [Security section|security] of the user guide for details).
-
-In addition of the remote console, Apache Karaf also provides a remote filesystem. This remote filesystem can be accessed
-using a SCP/SFTP client.
-
-h3. Configuration
-
-The configuration of the SSHd server is stored in the {{etc/org.apache.karaf.shell.cfg}} file:
-
-{code}
-################################################################################
-#
-# 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
-
-#
-# Role name used for SSH access authorization
-# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
-#
-# sshRole = admin
-
-#
-# 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
-{code}
-
-The {{etc/org.apache.karaf.shell.cfg}} configuration file contains different properties to configure the SSHd server:
-
-* {{sshPort}} is the port number where the SSHd server is bound (by default, it's 8101).
-* {{sshHost}} is the address of the network interface where the SSHd server is bound. The default value is 0.0.0.0,
- meaning that the SSHd server is bound on all network interfaces. You can bind on a target interface providing the IP
- address of the network interface.
-* {{hostKey}} is the location of the {{host.key}} file. By defaut, it uses {{etc/host.key}}. This file stores the public
- and private key pair of the SSHd server.
-* {{sshRole}} is the default role used for SSH access. The default value is the value of {{karaf.admin.role}} property
- defined in {{etc/system.properties}}. See the [Security section|security] of this user guide for details.
-* {{keySize}} is the key size used by the SSHd server. The possible values are 1024, 2048, 3072, or 4096. The default
- value is 1024.
-* {{algorithm}} is the host key algorithm used by the SSHd server. The possible values are DSA or RSA. The default
- value is DSA.
-
-The SSHd server configuration can be changed at runtime:
-
-* by editing the {{etc/org.apache.karaf.shell.cfg}} configuration file
-* by using the {{config:*}} commands
-
-At runtime, when you change the SSHd server configuration, you have to restart the SSHd server to load the changes.
-You can do it with:
-
-{code}
-karaf@root()> bundle:restart -f org.apache.karaf.shell.ssh
-{code}
-
-The Apache Karaf SSHd server supports key/agent authentication and password authentication.
-
-h3. Console clients
-
-h4. System native clients
-
-The Apache Karaf SSHd server is a pure SSHd server, similar to OpenSSH daemon.
-
-It means that you can use directly a SSH client from your system.
-
-For instance, on Unix, you can directly use OpenSSH:
-
-{code}
-~$ ssh -p 8101 karaf@localhost
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-On Windows, you can use Putty, Kitty, etc.
-
-If you don't have SSH client installed on your machine, you can use Apache Karaf client.
-
-h4. {{ssh:ssh}} command
-
-Apache Karaf itself provides a SSH client. When you are on the Apache Karaf console, you have the {{ssh:ssh}} command:
-
-{code}
-karaf@root()> ssh:ssh --help
-DESCRIPTION
- ssh:ssh
-
- Connects to a remote SSH server
-
-SYNTAX
- ssh:ssh [options] hostname [command]
-
-ARGUMENTS
- hostname
- The host name to connect to via SSH
- command
- Optional command to execute
-
-OPTIONS
- --help
- Display this help message
- -p, --port
- The port to use for SSH connection
- (defaults to 22)
- -P, --password
- The password for remote login
- -q
- Quiet Mode. Do not ask for confirmations
- -l, --username
- The user name for remote login
-
-{code}
-
-Thanks to the {{ssh:ssh}} command, you can connect to another running Apache Karaf instance:
-
-{code}
-karaf@root()> ssh:ssh -p 8101 karaf@192.168.134.2
-Connecting to host 192.168.134.2 on port 8101
-Connecting to unknown server. Add this server to known hosts ? (y/n)
-Storing the server key in known_hosts.
-Connected
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-When you don't provide the {{command}} argument to the {{ssh:ssh}} command, you are in the interactive mode: you have
-a complete remote console available, where you can type commands, etc.
-
-You can also provide directly a command to execute using the {{command}} argument. For instance, to remotely shutdown
-a Apache Karaf instance:
-
-{code}
-karaf@root()> ssh:ssh -p 8101 karaf@localhost system:shutdown -f
-Connecting to host localhost on port 8101
-Connected
-{code}
-
-As the {{ssh:ssh}} command is a pure SSH client, so it means that you can connect to a Unix OpenSSH daemon:
-
-{code}
-karaf@root()> ssh:ssh user@localhost
-Connecting to host localhost on port 22
-Connecting to unknown server. Add this server to known hosts ? (y/n)
-Storing the server key in known_hosts.
-Agent authentication failed, falling back to password authentication.
-Password: Connected
-Last login: Sun Sep 8 19:21:12 2013
-user@server:~$
-{code}
-
-h4. Apache Karaf client
-
-The {{ssh:ssh}} command requires to be run into a running Apache Karaf console.
-
-For commodity, the {{ssh:ssh}} command is "wrapped" as a standalone client: the {{bin/client}} Unix script ({{bin\client.bat}} on Windows).
-
-{code}
-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
-{code}
-
-For instance, to connect to local Apache Karaf instance (on the default SSHd server 8101 port), you can directly use
-{{bin/client}} Unix script ({{bin\client.bat}} on Windows) without any argument or option:
-
-{code}
-bin/client
-Logging in as karaf
-343 [pool-2-thread-4] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-When you don't provide the {{command}} argument to the {{bin/client}} Unix script ({{bin\client.bat}} on Windows), you are
-in the interactive mode: you have a complete remote console available, where you can type commands, etc.
-
-You can also provide directly a command to execute using the {{command}} argument. For instance, to remotely shutdown
-a Apache Karaf instance:
-
-{code}
-bin/client "system:shutdown -f"
-Logging in as karaf
-330 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
-{code}
-
-As the Apache Karaf client is a pure SSH client, you can use to connect to any SSHd daemon (like Unix OpenSSH daemon):
-
-{code}
-bin/client -a 22 -h localhost -u user
-Logging in as user
-353 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at localhost/127.0.0.1:22 presented unverified key:
-Password:
-Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-13-generic x86_64)
-
- * Documentation: https://help.ubuntu.com/
-
-Last login: Tue Dec 3 18:18:31 2013 from localhost
-{code}
-
-h4. Logout
-
-When you are connected to a remote Apache Karaf console, you can logout using:
-
-* using CTRL-D key binding. Note that CTRL-D just logout from the remote console in this case, it doesn't shutdown
- the Apache Karaf instance (as CTRL-D does when used on a local console).
-* using {{shell:logout}} command (or simply {{logout}})
-
-h3. Filsystem clients
-
-Apache Karaf SSHd server also provides complete fileystem access via SSH. For security reason, the available filesystem
-is limited to {{KARAF_BASE}} directory.
-
-You can use this remote filesystem with any SCP/SFTP compliant clients.
-
-h4. Native SCP/SFTP clients
-
-On Unix, you can directly use {{scp}} command to download/upload files to the Apache Karaf filesystem. For instance,
-to retrieve the {{karaf.log}} file remotely:
-
-{code}
-~$ scp -P 8101 karaf@localhost:/data/log/karaf.log .
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
-karaf.log
-{code}
-
-As you have access to the complete {{KARAF_BASE}} directory, you can remotely change the configuration file in the {{etc}}
-folder, retrieve log files, populate the {{system}} folder.
-
-On Windows, you can use WinSCP to access the Apache Karaf filesystem.
-
-It's probably easier to use a SFTP complient client.
-
-For instance, on Unix system, you can use {{lftp}} or {{ncftp}}:
-
-{code}
-$ lftp
-lftp :~> open -u karaf sftp://localhost:8101
-Password:
-lftp karaf@localhost:~> ls
--rw-r--r-- 1 jbonofre jbonofre 27754 Oct 26 10:50 LICENSE
--rw-r--r-- 1 jbonofre jbonofre 1919 Dec 3 05:34 NOTICE
--rw-r--r-- 1 jbonofre jbonofre 3933 Aug 18 2012 README
--rw-r--r-- 1 jbonofre jbonofre 101041 Dec 3 05:34 RELEASE-NOTES
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 bin
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 18:57 data
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 demos
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 deploy
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 17:59 etc
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 instances
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 lib
--rw-r--r-- 1 jbonofre jbonofre 0 Dec 3 13:02 lock
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 system
-lftp karaf@localhost:/>
-{code}
-
-You can also use graphic client like {{filezilla}}, {{gftp}}, {{nautilus}}, etc.
-
-On Windows, you can use {{filezilla}}, {{WinSCP}}, etc.
-
-h4. Apache Maven
-
-Apache Karaf {{system}} folder is the Karaf repository, that use a Maven directory structure. It's where Apache Karaf
-looks for the artifacts (bundles, features, kars, etc).
-
-Using Apache Maven, you can populate the {{system}} folder using the {{deploy:deploy-file}} goal.
-
-For instance, you want to add the Apache ServiceMix facebook4j OSGi bundle, you can do:
-
-{code}
-mvn deploy:deploy-file -Dfile=org.apache.servicemix.bundles.facebook4j-2.0.2_1.jar -DgroupId=org.apache.servicemix.bundles -DartifactId=org.apache.servicemix.bundles.facebook4j -Dversion=2.0.2_1 -Dpackaging=jar -Durl=scp://localhost:8101/system
-{code}
-
-{tip}
-If you want to turn Apache Karaf as a simple Maven repository, you can use [Apache Karaf Cave|http://karaf.apache.org/index/subprojects/cave.html].
-{tip}
-
-h2. JMX MBeanServer
-
-Apache Karaf provides a JMX MBeanServer.
-
-This MBeanServer is available remotely, using any JMX client like {{jconsole}}.
-
-You can find details on the [Monitoring section|monitoring] of the user guide.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/security.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/security.conf b/manual/src/main/webapp/users-guide/security.conf
deleted file mode 100644
index 640c4b7..0000000
--- a/manual/src/main/webapp/users-guide/security.conf
+++ /dev/null
@@ -1,569 +0,0 @@
-h1. Security
-
-Apache Karaf provides an advanced and flexible security system, powered by JAAS (Java Authentication and Authorization
-Service) in an OSGi compliant way.
-
-It provides a dynamic security system.
-
-The Apache Karaf security framework is used internally to control the access to:
-
-* the OSGi services (described in the developer guide)
-* the console commands
-* the JMX layer
-* the WebConsole
-
-Your applications can also use the security framework (see the developer guide for details).
-
-h2. Realms
-
-Apache Karaf is able to manage multiple realms. A realm contains the definition of the login modules to use for the
-authentication and/or authorization on this realm. The login modules define the authentication and authorization for
-the realm.
-
-The {{jaas:realm-list}} command list the current defined realms:
-
-{code}
-karaf@root()> jaas:realm-list
-Index | Realm Name | Login Module Class Name
------------------------------------------------------------------------------------
-1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
-{code}
-
-You can see that the Apache Karaf provides a default realm named {{karaf}}.
-
-This realm has two login modules:
-
-* the {{PropertiesLoginModule}} uses the {{etc/users.properties}} file as backend for users, groups, roles and password.
- This login module authenticates the users and returns the users' roles.
-* the {{PublickeyLoginModule}} is especially used by the SSHd. It uses the {{etc/keys.properties}} file. This file contains
- the users and a public key associated to each user.
-
-Apache Karaf provides additional login modules (see the developer guide for details):
-
-* JDBCLoginModule uses a database as backend
-* LDAPLoginModule uses a LDAP server as backend
-* SyncopeLoginModule uses Apache Syncope as backend
-* OsgiConfigLoginModule uses a configuration as backend
-
-You can manage an existing realm, login module, or create your own realm using the {{jaas:realm-manage}} command.
-
-h2. Users, groups, roles, and passwords
-
-As we saw, by default, Apache Karaf uses a PropertiesLoginModule.
-
-This login module uses the {{etc/users.properties}} file as storage for the users, groups, roles and passwords.
-
-The initial {{etc/users.properties}} file contains:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# This file contains the users, groups, and roles.
-# Each line has to be of the format:
-#
-# USER=PASSWORD,ROLE1,ROLE2,...
-# USER=PASSWORD,_g_:GROUP,...
-# _g_\:GROUP=ROLE1,ROLE2,...
-#
-# All users, grousp, and roles entered in this file are available after Karaf startup
-# and modifiable via the JAAS command group. These users reside in a JAAS domain
-# with the name "karaf".
-#
-karaf = karaf,_g_:admingroup
-_g_\:admingroup = group,admin,manager,viewer
-{code}
-
-We can see in this file, that we have one user by default: {{karaf}}.
-The default password is {{karaf}}.
-
-The {{karaf}} user is member of one group: the {{admingroup}}.
-
-A group is always prefixed by {{_g_:}}. An entry without this prefix is an user.
-
-A group defines a set of roles. By default, the {{admingroup}} defines {{group}}, {{admin}}, {{manager}}, and {{viewer}}
-roles.
-
-It means that the {{karaf}} user will have the roles defined by the {{admingroup}}.
-
-h3. Commands
-
-The {{jaas:*}} commands manage the realms, users, groups, roles in the console.
-
-h4. {{jaas:realm-list}}
-
-We already used the {{jaas:realm-list}} previously in this section.
-
-The {{jaas:realm-list}} command list the realm and the login modules for each realm:
-
-{code}
-karaf@root()> jaas:realm-list
-Index | Realm Name | Login Module Class Name
------------------------------------------------------------------------------------
-1 | karaf | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-2 | karaf | org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
-{code}
-
-We have here one realm ({{karaf}}) containing two login modules ({{PropertiesLoginModule}} and {{PublickeyLoginModule}}).
-
-The {{index}} is used by the {{jaas:realm-manage}} command to easily identify the realm/login module that we want to manage.
-
-h4. {{jaas:realm-manage}}
-
-The {{jaas:realm-manage}} command switch in realm/login module edit mode, where you can manage the users, groups, and roles in the login module.
-
-To identify the realm and login module that you want to manage, you can use the {{--index}} option.
-The indexes are displayed by the {{jaas:realm-list}} command:
-
-{code}
-karaf@root()> jaas:realm-manage --index 1
-{code}
-
-Another way is to use the {{--realm}} and {{--module}} options. The {{--realm}} option expects the realm name, and the {{--module}}
-option expects the login module class name:
-
-{code}
-karaf@root()> jaas:realm-manage --realm karaf --module org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
-{code}
-
-h4. {{jaas:user-list}}
-
-When you are in edit mode, you can list the users in the login module using the {{jaas:user-list}}:
-
-{code}
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-{code}
-
-You can see the user name and the group by role.
-
-h4. {{jaas:user-add}}
-
-The {{jaas:user-add}} command adds a new user (and the password) in the currently edited login module:
-
-{code}
-karaf@root()> jaas:user-add foo bar
-{code}
-
-To "commit" your change (here the user addition), you have to execute the {{jaas:update}} command:
-
-{code}
-karaf@root()> jaas:update
-karaf@root()> jaas:realm-manage --index 1
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-foo | |
-{code}
-
-On the other hand, if you want to rollback the user addition, you can use the {{jaas:cancel}} command.
-
-h4. {{jaas:user-delete}}
-
-The {{jaas:user-delete}} command deletes an user from the currently edited login module:
-
-{code}
-karaf@root()> jaas:user-delete foo
-{code}
-
-Like for the {{jaas:user-add}} command, you have to use the {{jaas:update}} to commit your change (or {{jaas:cancel}} to rollback):
-
-{code}
-karaf@root()> jaas:update
-karaf@root()> jaas:realm-manage --index 1
-karaf@root()> jaas:user-list
-User Name | Group | Role
---------------------------------
-karaf | admingroup | admin
-karaf | admingroup | manager
-karaf | admingroup | viewer
-{code}
-
-h4. {{jaas:group-add}}
-
-The {{jaas:group-add}} command assigns a group (and eventually creates the group) to an user in the currently edited login module:
-
-{code}
-karaf@root()> jaas:group-add karaf mygroup
-{code}
-
-h4. {{jaas:group-delete}}
-
-The {{jaas:group-delete}} command removes an user from a group in the currently edited login module:
-
-{code}
-karaf@root()> jaas:group-delete karaf mygroup
-{code}
-
-h4. {{jaas:group-role-add}}
-
-The {{jaas:group-role-add}} command adds a role in a group in the currently edited login module:
-
-{code}
-karaf@root()> jaas:group-role-add mygroup myrole
-{code}
-
-h4. {{jaas:group-role-delete}}
-
-The {{jaas:group-role-delete}} command removes a role from a group in the currently edited login module:
-
-{code}
-karaf@root()> jaas:group-role-delete mygroup myrole
-{code}
-
-h4. {{jaas:update}}
-
-The {{jaas:update}} command commits your changes in the login module backend. For instance, in the case of the PropertiesLoginModule,
-the {{etc/users.properties}} will be updated only after the execution of the {{jaas:update}} command.
-
-h4. {{jaas:cancel}}
-
-The {{jaas:cancel}} command rollback your changes and doesn't update the login module backend.
-
-h2. Passwords encryption
-
-By default, the passwords are stored in clear form in the {{etc/users.properties}} file.
-
-It's possible to enable encryption in the {{etc/org.apache.karaf.jaas.cfg}} configuration file:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# Boolean enabling / disabling encrypted passwords
-#
-encryption.enabled = false
-
-#
-# Encryption Service name
-# the default one is 'basic'
-# a more powerful one named 'jasypt' is available
-# when installing the encryption feature
-#
-encryption.name =
-
-#
-# Encryption prefix
-#
-encryption.prefix = {CRYPT}
-
-#
-# Encryption suffix
-#
-encryption.suffix = {CRYPT}
-
-#
-# Set the encryption algorithm to use in Karaf JAAS login module
-# Supported encryption algorithms follow:
-# MD2
-# MD5
-# SHA-1
-# SHA-256
-# SHA-384
-# SHA-512
-#
-encryption.algorithm = MD5
-
-#
-# Encoding of the encrypted password.
-# Can be:
-# hexadecimal
-# base64
-#
-encryption.encoding = hexadecimal
-{code}
-
-If the {{encryption.enabled}} property is set to true, the password encryption is enabled.
-
-With encryption enabled, the password are encrypted at the first time an user logs in. The encrypted passwords are
-prefixed and suffixed with {{\{CRYPT\}}}. To re-encrypt the password, you can reset the password in clear (in {{etc/users.properties}}
-file), without the {{\{CRYPT\}}} prefix and suffix. Apache Karaf will detect that this password is in clear (because it's not
-prefixed and suffixed with {{\{CRYPT\}}}) and encrypt it again.
-
-The {{etc/org.apache.karaf.jaas.cfg}} configuration file allows you to define advanced encryption behaviours:
-
-* the {{encryption.prefix}} property defines the prefix to "flag" a password as encrypted. The default is {{\{CRYPT\}}}.
-* the {{encryption.suffix}} property defines the suffix to "flag" a password as encrypted. The default is {{\{CRYPT\}}}.
-* the {{encryption.algorithm}} property defines the algorithm to use for encryption (digest). The possible values are {{MD2}}, {{MD5}},
-{{SHA-1}}, {{SHA-256}}, {{SHA-384}}, {{SHA-512}}. The default is {{MD5}}.
-* the {{encryption.encoding}} property defines the encoding of the encrypted password. The possible values are {{hexadecimal}}
- or {{base64}}. The default value is {{hexadecimal}}.
-
-h2. Managing authentication by key
-
-For the SSH layer, Karaf supports the authentication by key, allowing to login without providing the password.
-
-The SSH client (so bin/client provided by Karaf itself, or any ssh client like OpenSSH) uses a public/private keys pair that
-will identify himself on Karaf SSHD (server side).
-
-The keys allowed to connect are stored in {{etc/keys.properties}} file, following the format:
-
-{code}
-user=key,role
-{code}
-
-By default, Karaf allows a key for the karaf user:
-
-{code}
-# karaf=AAAAB3NzaC1kc3MAAACBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9EAMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv8iIDGZ3RSAHHAAAAFQCXYFCPFSMLzLKSuYKi64QL8Fgc9QAAAIEA9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSoAAACBAKKSU2PFl/qOLxIwmBZPPIcJshVe7bVUpFvyl3BbJDow8rXfskl8wO63OzP/qLmcJM0+JbcRU/53JjTuyk31drV2qxhIOsLDC9dGCWj47Y7TyhPdXh/0dthTRBy6bqGtRPxGa7gJov1xm/UuYYXPIUR/3x9MAZvZ5xvE0kYXO+rx,admin
-{code}
-
-{warning}
-For security reason, this key is disabled. We encourage to create the keys pair per client and update the {{etc/keys.properties}} file.
-{warning}
-
-The easiest way to create key pair is to use OpenSSH.
-
-You can create a key pair using:
-
-{code}
-ssh-keygen -t dsa -f karaf.id_dsa -N karaf
-{code}
-
-You have now the public and private keys:
-
-{code}
--rw------- 1 jbonofre jbonofre 771 Jul 25 22:05 karaf.id_dsa
--rw-r--r-- 1 jbonofre jbonofre 607 Jul 25 22:05 karaf.id_dsa.pub
-{code}
-
-You can copy in the content of the {{karaf.id_dsa.pub}} file in the {{etc/keys.properties}}:
-
-{code}
-karaf=AAAAB3NzaC1kc3MAAACBAJLj9vnEhu3/Q9Cvym2jRDaNWkATgQiHZxmErCmiLRuD5Klfv+HT/+8WoYdnvj0YaXFP80phYhzZ7fbIO2LRFhYhPmGLa9nSeOsQlFuX5A9kY1120yB2kxSIZI0fU2hy1UCgmTxdTQPSYtdWBJyvO/vczoX/8I3FziEfss07Hj1NAAAAFQD1dKEzkt4e7rBPDokPOMZigBh4kwAAAIEAiLnpbGNbKm8SNLUEc/fJFswg4G4VjjngjbPZAjhkYe4+H2uYmynry6V+GOTS2kaFQGZRf9XhSpSwfdxKtx7vCCaoH9bZ6S5Pe0voWmeBhJXi/Sww8f2stpitW2Oq7V7lDdDG81+N/D7/rKDD5PjUyMsVqc1n9wCTmfqmi6XPEw8AAACAHAGwPn/Mv7P9Q9+JZRWtGq+i4pL1zs1OluiStCN9e/Ok96t3gRVKPheQ6IwLacNjC9KkSKrLtsVyepGA+V5j/N+Cmsl6csZilnLvMUTvL/cmHDEEhTIQnPNrDDv+tED2BFqkajQqYLgMWeGVqXsBU6IT66itZlYtrq4v6uDQG/o=,admin
-{code}
-
-and specify to the client to use the {{karaf.id_dsa}} private key:
-
-{code}
-bin/client -k ~/karaf.id_dsa
-{code}
-
-or to ssh
-
-{code}
-ssh -p 8101 -i ~/karaf.id_dsa karaf@localhost
-{code}
-
-h2. RBAC
-
-Apache Karaf uses the roles to control the access to the resources: it's a RBAC (Role Based Access Control) system.
-
-The roles are used to control:
-
-* access to OSGi services
-* access to the console (control the execution of the commands)
-* access to JMX (MBeans and/or operations)
-* access to the WebConsole
-
-h3. OSGi services
-
-The details about OSGi services RBAC support is explained in the developer guide.
-
-h3. Console
-
-Console RBAC supports is a specialization of the OSGi service RBAC. Actually, in Apache Karaf, all console commands are
-defined as OSGi services.
-
-The console command name follows the {{scope:name}} format.
-
-The ACL (Access Lists) are defined in {{etc/org.apache.karaf.command.acl.<scope>.cfg}} configuration files, where {{<scope>}}
-is the commands scope.
-
-For instance, we can define the ACL to the {{feature:*}} commands by creating a {{etc/org.apache.karaf.command.acl.feature.cfg}}
-configuration file. In this {{etc/org.apache.karaf.command.acl.feature.cfg}} configuration file, we can set:
-
-{code}
-list = viewer
-info = viewer
-install = admin
-uninstall = admin
-{code}
-
-Here, we define that {{feature:list}} and {{feature:info}} commands can be executed by users with {{viewer}} role, whereas
-the {{feature:install}} and {{feature:uninstall}} commands can only be executed by users with {{admin}} role.
-Note that users in the admin group will also have viewer role, so will be able to do everything.
-
-Apache Karaf command ACLs can control access using (inside a given command scope):
-
-* the command name regex (e.g. {{name = role}})
-* the command name and options or arguments values regex (e.g. {{name[/.*[0-9][0-9][0-9]+.*/] = role}} to execute name only with argument value above 100)
-
-Both command name and options/arguments support exact matching or regex matching.
-
-By default, Apache Karaf defines the following commands ACLs:
-
-* {{etc/org.apache.karaf.command.acl.bundle.cfg}} configuration file defines the ACL for {{bundle:*}} commands.
- This ACL limits the execution of {{bundle:*}} commands for system bundles only to the users with {{admin}} role, whereas
- {{bundle:*}} commands for non-system bundles can be executed by the users with {{manager}} role.
-* {{etc/org.apache.karaf.command.acl.config.cfg}} configuration file defines the ACL for {{config:*}} commands.
- This ACL limits the execution of {{config:*}} commands with {{jmx.acl.*}}, {{org.apache.karaf.command.acl.*}}, and
- {{org.apache.karaf.service.acl.*}} configuration PID to the users with {{admin}} role. For the other configuration PID,
- the users with the {{manager}} role can execute {{config:*}} commands.
-* {{etc/org.apache.karaf.command.acl.feature.cfg}} configuration file defines the ACL for {{feature:*}} commands.
- Only the users with {{admin}} role can execute {{feature:install}} and {{feature:uninstall}} commands. The other {{feature:*}}
- commands can be executed by any user.
-* {{etc/org.apache.karaf.command.acl.jaas.cfg}} configuration file defines the ACL for {{jaas:*}} commands.
- Only the users with {{admin}} role can execute {{jaas:update}} command. The other {{jaas:*}} commands can be executed by any
- user.
-* {{etc/org.apache.karaf.command.acl.kar.cfg}} configuration file defines the ACL for {{kar:*}} commands.
- Only the users with {{admin}} role can execute {{kar:install}} and {{kar:uninstall}} commands. The other {{kar:*}} commands
- can be executed by any user.
-* {{etc/org.apache.karaf.command.acl.shell.cfg}} configuration file defines the ACL for {{shell:*}} and "direct" commands.
- Only the users with {{admin}} role can execute {{shell:edit}}, {{shell:exec}}, {{shell:new}}, and {{shell:java}} commands.
- The other {{shell:*}} commands can be executed by any user.
-
-You can change these default ACLs, and add your own ACLs for additional command scopes (for instance {{etc/org.apache.karaf.command.acl.cluster.cfg}} for
-Apache Karaf Cellar, {{etc/org.apache.karaf.command.acl.camel.cfg}} from Apache Camel, ...).
-
-You can fine tuned the command RBAC support by editing the {{karaf.secured.services}} property in {{etc/system.properties}}:
-
-{code}
-#
-# By default, only Karaf shell commands are secured, but additional services can be
-# secured by expanding this filter
-#
-karaf.secured.services = (&(osgi.command.scope=*)(osgi.command.function=*))
-{code}
-
-h3. JMX
-
-Like for the console commands, you can define ACL (AccessLists) to the JMX layer.
-
-The JMX ACL are defined in {{etc/jmx.acl<ObjectName>.cfg}} configuration file, where {{<ObjectName>}} is a MBean object name
-(for instance {{org.apache.karaf.bundle}} represents {{org.apache.karaf;type=Bundle}} MBean).
-
-The {{etc/jmx.acl.cfg}} is the most generic configuration file and is used when no specific ones are found.
-It contains the "global" ACL definition.
-
-JMX ACLs can control access using (inside a JMX MBean):
-
-* the operation name regex (e.g. {{operation* = role}})
-* the operation arguments value regex (e.g. {{operation(java.lang.String, int)[/([1-4])?[0-9]/,/.*/] = role}})
-
-By default, Apache Karaf defines the following JMX ACLs:
-
-* {{etc/jmx.acl.org.apache.karaf.bundle.cfg}} configuration file defines the ACL for the {{org.apache.karaf:type=bundle}}
- MBean. This ACL limits the {{setStartLevel()}}, {{start()}}, {{stop()}}, and {{update()}} operations for system bundles for
- only users with {{admin}} role. The other operations can be performed by users with the {{manager}} role.
-* {{etc/jmx.acl.org.apache.karaf.config.cfg}} configuration file defines the ACL for the {{org.apache.karaf:type=config}}
- MBean. This ACL limits the change on {{jmx.acl*}}, {{org.apache.karaf.command.acl*}}, and {{org.apache.karaf.service.acl*}}
- configuration PIDs for only users with {{admin}} role. The other operations can be performed by users with the {{manager}} role.
-* {{etc/jmx.acl.org.apache.karaf.security.jmx.cfg}} configuration file defines the ACL for the {{org.apache.karaf:type=security,area=jmx}}
- MBean. This ACL limits the invocation of the {{canInvoke()}} operation for the users with {{viewer}} role.
-* {{etc/jmx.acl.osgi.compendium.cm.cfg}} configuration file defines the ACL for the {{osgi.compendium:type=cm}} MBean.
- This ACL limits the changes on {{jmx.acl*}}, {{org.apache.karaf.command.acl*}}, and {{org.apache.karaf.service.acl*}}
- configuration PIDs for only users with {{admin}} role. The other operations can be performed by users with the {{manager}} role.
-* {{etc/jmx.acl.java.lang.Memory.cfg}} configuration file defines the ACL for the core JVM Memory MBean.
- This ACL limits the invocation of the {{gc}} operation for only users with the {{manager}} role.
-* {{etc/jmx.acl.cfg}} configuration file is the most generic file. The ACLs defined here are used when no other specific
- ACLs match (by specific ACL, it's an ACL defined in another MBean specific {{etc/jmx.acl.*.cfg}} configuration file).
- The {{list*()}}, {{get*()}}, {{is*()}} operations can be performed by users with the {{viewer}} role.
- The {{set*()}} and all other {{*()}} operations can be performed by users with the {{admin}} role.
-
-h3. WebConsole
-
-The Apache Karaf WebConsole is not available by default. To enable it, you have to install the {{webconsole}} feature:
-
-{code}
-karaf@root()> feature:install webconsole
-{code}
-
-The WebConsole doesn't support fine grained RBAC like console or JMX for now.
-
-All users with the {{admin}} role can logon the WebConsole and perform any operations.
-
-h2. SecurityMBean
-
-Apache Karaf provides a JMX MBean to check if the current user can invoke a given MBean and/or operation.
-
-The {{canInvoke()}} operation gets the roles of the current user, and check if one the roles can invoke the MBean and/or the
-operation, eventually with a given argument value.
-
-h3. Operations
-
-* {{canInvoke(objectName)}} returns {{true}} if the current user can invoke the MBean with the {{objectName}}, {{false}} else.
-* {{canInvoke(objectName, methodName)}} returns {{true}} if the current user can invoke the operation {{methodName}} on the MBean
- with the {{objectName}}, {{false}} else.
-* {{canInvoke(objectName, methodName, argumentTypes)}} returns {{true}} if the current user can invoke the operation {{methodName}}
-with the array of arguments types {{argumentTypes}} on the MBean with {{objectName}}, {{false}} else.
-* {{canInvoke(bulkQuery)}} returns a tabular data containing for each operation in the {{bulkQuery}} tabular data if {{canInvoke}}
-is {{true}} or {{false}}.
-
-h2. Security providers
-
-Some applications require specific security providers to be available, such as [BouncyCastle|http://www.bouncycastle.org].
-
-The JVM imposes some restrictions about the use of such jars: they have to be signed and be available on the boot classpath.
-
-One way to deploy those providers is to put them in the JRE folder at {{$JAVA_HOME/jre/lib/ext}} and modify the security
-policy configuration ({{$JAVA_HOME/jre/lib/security/java.security}}) in order to register such providers.
-
-While this approach works fine, it has a global effect and requires you to configure all your servers accordingly.
-
-Apache Karaf offers a simple way to configure additional security providers:
-* put your provider jar in {{lib/ext}}
-* modify the {{etc/config.properties}} configuration file to add the following property
-
-{code}
-org.apache.karaf.security.providers = xxx,yyy
-{code}
-
-The value of this property is a comma separated list of the provider class names to register.
-
-For instance, to add the bouncycastle security provider, you define:
-
-{code}
-org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
-{code}
-
-In addition, you may want to provide access to the classes from those providers from the system bundle so that all bundles
-can access those.
-
-It can be done by modifying the {{org.osgi.framework.bootdelegation}} property in the same configuration file:
-
-{code}
-org.osgi.framework.bootdelegation = ...,org.bouncycastle*
-{code}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/start-stop.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/start-stop.conf b/manual/src/main/webapp/users-guide/start-stop.conf
deleted file mode 100644
index be908e5..0000000
--- a/manual/src/main/webapp/users-guide/start-stop.conf
+++ /dev/null
@@ -1,419 +0,0 @@
-h1. Start, stop, restart, connect
-
-h2. Start
-
-Apache Karaf supports different start mode:
-
-* the "regular" mode starts Apache Karaf in foreground, including the shell console.
-* the "server" mode starts Apache Karaf in foreground, without the shell console.
-* the "background" mode starts Apache Karaf in background.
-
-You can also manage Apache Karaf as a system service (see [System Service|wrapper] section of this manual).
-
-h3. Regular mode
-
-The regular mode uses the {{bin/karaf}} Unix script ({{bin\karaf.bat}} on Windows). It's the default start process.
-
-It starts Apache Karaf as a foreground process, and displays the shell console.
-
-On Unix:
-
-{code}
-bin/karaf
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
-
-karaf@root()>
-{code}
-
-On Windows:
-
-{code}
-bin\karaf.bat
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
-
-karaf@root()>
-{code}
-
-{warning:title=Warning}
-Closing the console or shell window will cause Apache Karaf to terminate.
-{warning}
-
-h3. Server mode
-
-The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.
-
-To use this mode, you use the {{server}} argument to the {{bin/karaf}} Unix script ({{bin\karaf.bat}} on Windows).
-
-On Unix:
-
-{code}
-bin/karaf server
-
-{code}
-
-On Windows:
-
-{code}
-bin\karaf.bat server
-
-{code}
-
-{warning:title=Warning}
-Closing the console or shell window will cause Apache Karaf to terminate.
-{warning}
-
-You can connect to the shell console using SSH or client (see the Connect section in this page).
-
-h3. Background mode
-
-The background mode starts Apache Karaf as a background process.
-
-To start in background mode, you have to use {{bin/start}} Unix script ({{bin\start.bat}} on Windows).
-
-On Unix:
-
-{code}
-bin/start
-{code}
-
-On Windows:
-
-{code}
-bin\start.bat
-{code}
-
-You can connect to the shell console using SSH or client (see the Connect section in this page).
-
-h3. Clean start
-
-Apache Karaf stores all previously applications installed and changes that you did in the data folder.
-
-If you want to start from a clean state, you can remove the data folder.
-
-For convenience, you can use the {{clean}} argument to the {{bin/karaf}} Unix script ({{bin\karaf.bat}} on Windows).
-
-On Unix:
-
-{code}
-bin/karaf clean
-{code}
-
-{code}
-bin/start clean
-{code}
-
-On Windows:
-
-{code}
-bin\karaf.bat clean
-{code}
-
-{code}
-bin\start.bat clean
-{code}
-
-h3. Customize variables
-
-Apache Karaf accepts environment variables:
-
-* {{JAVA_MIN_MEM}}: minimum memory for the JVM (default is 128M).
-* {{JAVA_MAX_MEM}}: maximum memory for the JVM (default is 512M).
-* {{JAVA_PERM_MEM}}: minimum perm memory for the JVM (default is JVM default value).
-* {{JAVA_MAX_PERM_MEM}}: maximum perm memory for the JVM (default is JVM default value).
-* {{KARAF_HOME}}: the location of your Apache Karaf installation (default is found depending where you launch the startup script).
-* {{KARAF_BASE}}: the location of your Apache Karaf base (default is {{KARAF_HOME}}).
-* {{KARAF_DATA}}: the location of your Apache Karaf data folder (default is {{KARAF_BASE/data}}).
-* {{KARAF_ETC}}: the location of your Apache Karaf etc folder (default is {{KARAF_BASE/etc}}).
-* {{KARAF_OPTS}}: extra arguments passed to the Java command line (default is null).
-* {{KARAF_DEBUG}}: 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.
-
-You can define these environment variables in {{bin/setenv}} Unix script ({{bin\setenv.bat}} on Windows).
-
-For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:
-
-On Unix:
-
-{code}
-# Content of bin/setenv
-export JAVA_MIN_MEM=256M
-export JAVA_MAX_MEM=1024M
-{code}
-
-On Windows:
-
-{code}
-rem Content of bin\setenv.bat
-set JAVA_MIN_MEM=256M
-set JAVA_MAX_MEM=1024M
-{code}
-
-h3. Connect
-
-Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.
-This connection can be local or remote. It means that you can access to Karaf console remotely.
-
-To connect to the console, you can use the {{bin/client}} Unix script ({{bin\client.bat}} on Windows).
-
-On Unix:
-
-{code}
-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:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-On Windows:
-
-{code}
-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:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0-SNAPSHOT)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-By default, {{client}} tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).
-
-{{client}} accepts different options to let you connect on a remote Apache Karaf instance. You can use {{--help}} to get details about the options:
-
-On Unix:
-
-{code}
-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
-{code}
-
-On Windows:
-
-{code}
-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
-{code}
-
-Actually, {{client}} is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.
-
-For instance, on Unix, you can do:
-
-{code}
-ssh karaf@localhost -p 8101
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (4.0.0-SNAPSHOT)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-{code}
-
-h2. Stop
-
-When you start Apache Karaf in regular mode, the {{logout}} command or CTRL-D key binding logout from the console and shutdown Apache Karaf.
-
-When you start Apache Karaf in background mode (with the {{bin/start}} Unix script ({{bin\start.bat}} on Windows)), you can use the {{bin/stop}} Unix script ({{bin\stop.bat}} on Windows).
-
-More generally, you can use the {{shutdown}} command (on the Apache Karaf console) that work in any case.
-
-The {{shutdown}} command is very similar to the the {{shutdown}} Unix command.
-
-To shutdown Apache Karaf now, you can simple using {{shutdown}}:
-
-{code}
-karaf@root()> shutdown -h
-Confirm: halt instance root (yes/no):
-{code}
-
-The {{shutdown}} command asks for a confirmation. If you want to bypass the confirmation step, you can use the {{-f}} ({{--force}}) option:
-
-{code}
-karaf@root()> shutdown -f
-{code}
-
-You can also use directly {{halt}} which is an alias to {{shutdown -f -h}}.
-
-The {{shutdown}} command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.
-
-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
-(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 {{now}} is an alias for 0.
-
-For instance, the following command will shutdown Apache Karaf at 10:35am:
-
-{code}
-karaf@root()> system:shutdown 10:35
-{code}
-
-Another example to shutdown Apache Karaf in 10 minutes:
-
-{code}
-karaf@root()> system:shutdown 10
-{code}
-
-Like for other commands, you can find details on the {{shutdown}} command man page:
-
-{code}
-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.
-{code}
-
-h2. Status
-
-When you start Apache Karaf in background mode, you may want to check the current status.
-
-To do so, you can use the {{bin/status}} Unix script ({{bin\status.bat}} on Windows).
-
-NB: the script returns 0 exit code if Apache Karaf is running, 1 exit code else.
-
-On Unix:
-
-{code}
-bin/status
-Not Running ...
-{code}
-
-{code}
-bin/status
-Running ...
-{code}
-
-On Windows:
-
-{code}
-bin\status.bat
-Not Running ...
-{code}
-
-{code}
-bin\status.bat
-Running ...
-{code}
-
-h2. Restart
-
-The {{shutdown}} command accepts the {{-r}} ({{--restart}}) option to restart Apache Karaf:
-
-{code}
-karaf@root()> system:shutdown -r
-{code}
-
-{warning:title=Warning}
-This command does not start a new JVM. It simply restarts the OSGi framework.
-{warning}
-
-h2. SystemMBean
-
-Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.
-
-The SystemMBean object name is {{org.apache.karaf:type=system}}.
-
-The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:
-
-* {{reboot()}} reboots Apache Karaf now (without cleaning the cache)
-* {{reboot(time)}} reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the {{shutdown}} command.
-* {{rebootCleanCache(time)}} reboots Apache Karaf at a given time, including the cleanup of the cache.
-* {{rebootCleanAll(time)}} reboots Apache Karaf at a given time, including the cleanup of the whole data folder.
-* {{halt()}} shutdown Apache Karaf now.
-* {{halt(time)}} shutdown Apache Karaf at a given time. The time format is the same as the time argument of the {{shutdown}} command.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/tuning.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/tuning.conf b/manual/src/main/webapp/users-guide/tuning.conf
deleted file mode 100644
index 452d9ba..0000000
--- a/manual/src/main/webapp/users-guide/tuning.conf
+++ /dev/null
@@ -1,145 +0,0 @@
-h1. Tuning
-
-h2. Garbage Collection
-
-Like any Java applications, Apache Karaf uses a JVM. An important feature of the JVM is the Garbage Collector.
-
-Apache Karaf default configuration is sized for small to medium needs and to work on most machine.
-
-That's why this default configuration may appear like "small".
-
-By default, Apache Karaf uses:
-
-* {{-Xms128M}}
-* {{-Xmx512M}}
-* {{-XX:+UnlockDiagnosticVMOptions}}
-* {{-XX:+UnsyncloadClass}}
-
-On Sun/Oracle JVM:
-* the Perm size is the JVM default (for Java 7)
-
-On IBM JVM and AIX system:
-* {{-Xverify:none}}
-* {{-Xdump:heap}}
-* {{-Xlp}}
-
-For any container, it's always difficult to predict the usage of the resources and the behaviour of the artifacts deployed.
-
-Generally speaking, a good approach for tuning is to enable {{-verbose:gc}} and use tools like VisualVM to identify the potentials
-memory leaks, and see the possible optimisation of the spaces and GC.
-
-You can find introduction about GC here: [http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html].
-
-h3. Java 6
-
-If you have enough resources available on the machine, a good configuration may be:
-
-* {{-server}}
-* {{-Xmx1024M}}
-* {{-XX:MaxPermSize=640M}}
-* {{-XX:+UseConcMarkSweepGC}}
-* {{-XX:+UseParNewGC}}
-* {{-XX:+CMSClassUnloadingEnabled}}
-
-It will give more resources to Apache Karaf, and avoid some perm space saturation if you do a lot of bundles refresh.
-
-See [http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html] for details about Java 6 tuning.
-
-h3. Java 7
-
-Java 7 introduces a new GC algorithm: the GC1.
-
-Depending of the use cases (and usage of the heap), the new GC1 algorithm can give good performance improvements:
-
-* {{-XX:+UseG1GC}}
-* {{-XX:-UseAdaptiveSizePolicy}}
-
-See [http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html] for details about Java 7 GC1 tuning.
-
-You can find a good article about Java 7 tuning here: [http://java-is-the-new-c.blogspot.de/2013/07/tuning-and-benchmarking-java-7s-garbage.html].
-
-h2. Threads
-
-In high loaded system, the number of threads can be very large.
-
-h3. WebContainer
-
-If you use the Apache Karaf WebContainer, the Jetty connectors create threads to handle the incoming HTTP requests.
-
-The {{etc/jetty.xml}} configuration file allows you to tune the Jetty connector.
-
-For instance, the following connector configuration:
-
-{code}
- <Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
- <Property name="jetty.host" />
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="8181" />
- </Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
- </New>
- </Arg>
- </Call>
-{code}
-
-defines the following properties:
-
-* {{maxIdleTime}} is the maximum inactivity time for a connection.
-* {{lowResourcesConnections}} defines the number of connections. If the current number of connections is greater than
- this value, the status is "low on resources". In that case, a new connection timeout is applied: the {{lowResourceMaxIdleTime}}.
-* {{Acceptors}} defines the number of threads for incoming connections.
-
-h3. Apache Camel
-
-For instance, if you use Apache Camel inside Apache Karaf, Camel components can create a lot of threads.
-
-Apache Camel use the notion of {{threadPoolProfile}} to control the threads creation.
-
-For instance, the following Camel configuration defines a pool creation strategy:
-
-{code}
-<threadPoolProfile id="defaultThreadPoolProfile" defaultProfile="true"
- poolSize="10" maxPoolSize="20" maxQueueSize="1000"
- rejectedPolicy="CallerRuns"/>
-{code}
-
-See the [Apache Camel website|http://camel.apache.org] for details.
-
-h3. Apache CXF
-
-Apache CXF uses workqueues to handle server request/response.
-
-You may see a {{etc/org.apache.cxf.workqueues-default.cfg}} configuration file. It's the default configuration applied
-to all workqueues (a workqueue can be associated to a specific endpoint).
-
-On a workqueue, you can define the following properties about the threads:
-
-* {{org.apache.cxf.workqueue.default.highWaterMark}} defines the maximum number of threads.
-* {{org.apache.cxf.workqueue.default.lowWaterMark}} defines the minimum number of threads.
-* {{org.apache.cxf.workqueue.default.initialSize}} defines the initial number of threads.
-
-See the [Apache CXF website|http://cxf.apache.org] for details.
-
-h2. System packages
-
-The {{etc/jre.properties}} defines the packages directly provided by the JVM.
-
-Most of the time, the default configuration in Apache Karaf is fine and works in most of the use cases.
-
-However, some times, you may want to not use the packages provided by the JVM, but the same packages provided by a bundle.
-
-For instance, the JAXB version provided by the JVM is "old", and you want to use new JAXB bundles.
-
-In that case, you have to comment the packages in {{etc/jre.properties}} to avoid to be provided by the JVM and use the
-ones from the bundles.
-
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/update.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/update.conf b/manual/src/main/webapp/users-guide/update.conf
deleted file mode 100644
index c5216eb..0000000
--- a/manual/src/main/webapp/users-guide/update.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-h1. Update procedure
-
-h2. From Karaf 4.0.x to Karaf 4.0.x
-
-h2. From Karaf 3.0.x to Karaf 4.0.x
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/urls.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/urls.conf b/manual/src/main/webapp/users-guide/urls.conf
deleted file mode 100644
index 21145b9..0000000
--- a/manual/src/main/webapp/users-guide/urls.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-h1. Artifacts repositories and URLs
-
-The main information provided by a feature is the set of OSGi bundles that defines the application. Such bundles are URLs pointing to the actual bundle jars. For example, one would write the following definition:
-{code:lang=xml}
-<bundle>http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
-{code}
-Doing this will make sure the above bundle is installed while installing the feature.
-
-However, Karaf provides several URL handlers, in addition to the usual ones (file, http, etc...). One of these is the Maven URL handler, which allow reusing maven repositories to point to the bundles.
-
-You can deploy bundles from file system without using Maven
-
-As we can use file: as protocol handler to deploy bundles, you can use the following syntax to deploy bundles when they are
-located in a directory which is not available using Maven
-
-{code:lang=xml}
-<bundle>file:base/bundles/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
-{code}
-
-Note: The path is relative to the Apache Karaf installation directory
-
-h4. Maven URL Handler
-
-The equivalent of the above bundle would be:
-{code:lang=xml}
-<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
-{code}
-
-In addition to being less verbose, the Maven url handlers can also resolve snapshots and can use a local copy of the jar if one is available in your Maven local repository.
-
-The {{org.ops4j.pax.url.mvn}} bundle resolves {{mvn}} URLs. It can be configured using the file {{etc/org.ops4j.pax.url.cfg}}
-
-The most important property is :
-
-* {{org.ops4j.pax.url.mvn.repositories}} : Comma separated list of repository remote repository URLs that are checked in order of occurence when resolving maven artifacts
-
-By default, snapshots are disabled. To enable an URL for snapshots append @snapshots to a repository entry. For example
-
-{code}
-http://www.example.org/repo@snapshots
-{code}
-
-Repositories on the local machine are supported through {{file:/}} URLs.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/webconsole.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/webconsole.conf b/manual/src/main/webapp/users-guide/webconsole.conf
deleted file mode 100644
index a97d3bc..0000000
--- a/manual/src/main/webapp/users-guide/webconsole.conf
+++ /dev/null
@@ -1,48 +0,0 @@
-h1. WebConsole
-
-Apache Karaf provides an optional WebConsole.
-
-This WebConsole provides a graphical web GUI to see and manage your Apache Karaf container.
-
-You can use the WebConsole to:
-
-* manage Apache Karaf features
-* manage OSGi bundles
-* manage the instances
-* manage the confgurations
-* manage the log service
-
-The WebConsole is extensible via a plugins system. Some applications can add new pages to the WebConsole.
-For instance, Apache Karaf Cellar provides additional pages to administrate cluster groups, nodes, etc.
-
-h2. Installation
-
-To enable the Apache Karaf WebConsole, you just have to install the {{webconsole}} feature:
-
-{code}
-karaf@root()> feature:install webconsole
-{code}
-
-The {{webconsole}} feature automatically installs the {{http}} feature (see the [WebContainer section|webcontainer] for details).
-
-h2. Access
-
-The Apache Karaf WebConsole uses the WebContainer port number (see the [WebContainer section|webcontainer] for details)
-with the {{/system/console}} context.
-
-By default, the Apache Karaf WebContainer port number is {{8181}}.
-
-It means that the Apache Karaf WebConsole is accessible on the following URL:
-
-[http://localhost:8181/system/console]
-
-As the Apache Karaf WebConsole uses the security framework, an username and password will be prompted.
-
-You have to enter an username/password from the {{karaf}} realm. By default, you can use {{karaf}}/{{karaf}}.
-
-See the [Security section|security] for details.
-
-{warning}
-Only users with the {{admin}} role are allowed to logon on the Apache Karaf WebConsole.
-Right now, the WebConsole doesn't use RBAC system as we have for console commands, or MBeans.
-{warning}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/webcontainer.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/webcontainer.conf b/manual/src/main/webapp/users-guide/webcontainer.conf
deleted file mode 100644
index 1368e9e..0000000
--- a/manual/src/main/webapp/users-guide/webcontainer.conf
+++ /dev/null
@@ -1,275 +0,0 @@
-h1. WebContainer (JSP/Servlet)
-
-Apache Karaf can act a complete WebContainer, fully supporting JSP/Servlet specification.
-
-Apache Karaf WebContainer supports both:
-
-* WAB (WebApplication Bundles) which are OSGi native web applications
-* WAR (WebApplication aRchives) which are non-OSGi web applications (the same as you can deploy in any web container like Apache Tomcat)
-
-To enable the Apache Karaf WebContainer, you just have to install the {{war}} feature:
-
-{code}
-karaf@root()> feature:install war
-{code}
-
-NB: the installation of the {{webconsole}} feature automatically installs the {{war}} feature.
-
-The {{war}} feature provides:
-
-* an embedded web container (powered by Jetty), with its configuration
-* a set of console commands
-* a new war deployer
-
-h2. Configuration
-
-The default port used by the WebContainer is 8181.
-
-The WebContainer configuration is in the {{etc/jetty.xml}} configuration file.
-
-The {{etc/jetty.xml}} is a standard Eclipse Jetty configuration file.
-
-The default Apache Karaf WebContainer {{etc/jetty.xml}} contains:
-
-{code:lang=xml}
-<?xml version="1.0"?>
-<!--
- 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.
--->
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
-DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
-
-<Configure class="org.eclipse.jetty.server.Server">
-
- <!-- =========================================================== -->
- <!-- Set connectors -->
- <!-- =========================================================== -->
- <!-- One of each type! -->
- <!-- =========================================================== -->
-
- <!-- Use this connector for many frequently idle connections and for
- threadless continuations. -->
- <Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <Set name="host">
- <Property name="jetty.host" />
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="8181" />
- </Set>
- <Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="statsOn">false</Set>
- <Set name="confidentialPort">8443</Set>
- <Set name="lowResourcesConnections">20000</Set>
- <Set name="lowResourcesMaxIdleTime">5000</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- =========================================================== -->
- <!-- Configure Authentication Realms -->
- <!-- Realms may be configured for the entire server here, or -->
- <!-- they can be configured for a specific web app in a context -->
- <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
- <!-- example). -->
- <!-- =========================================================== -->
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
- <Set name="name">karaf</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
- <Set name="name">default</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
-
-</Configure>
-{code}
-
-The {{SelectChannelConnector}} defines the default connector of the WebContainer.
-
-This connector defines the 8181 port number for the HTTP protocol ({{port}} property), and the 8443 port number for the
-HTTPS protocol ({{confidentialPort}} property).
-
-By default, Apache Karaf bind these ports on all network interfaces ({{0.0.0.0}}). You can config the {{host}} property
-to bind on a specific network interface (with a given IP address).
-
-The following resources give you details about advanced {{etc/jetty.xml}} configurations:
-
-* [Standard configuration|http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty]
-* [Enable SSL|http://wiki.eclipse.org/Jetty/Howto/Configure_SSL]
-* [Reference|http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax]
-
-h2. Deploy
-
-Apache Karaf WebContainer is able to deploy:
-
-* pure OSGi WebApplication Bundle (WAB)
-* "classical" standard WebApplication aRchive (WAR)
-
-h3. WAB (WebApplication Bundle)
-
-A WAB is a standard WAR or JAR archive containing at least the following properties in the MANIFEST:
-
-* {{Bundle-ManifestVersion: 2}} defines that the bundle follows the rules of R4 specification.
-* {{Bundle-SymbolicName}} specifies a unique, non-localizable name for the bundle. This name should be based on the
- reverse domain name convention.
-* {{Web-ContextPath}} specifies the location of the web application.
-
-WAB can be deployed directly in Apache Karaf, for instance, by dropping the archive in the {{deploy}} folder, or using the
-{{bundle:install}} command.
-
-For instance, the Apache Karaf manual (documentation) is available as a WAB that you can deploy directly in a running instance:
-
-{code}
-karaf@root()> bundle:install -s mvn:org.apache.karaf/manual/4.0.0/war
-{code}
-
-h3. WAR (WebApplication aRchive)
-
-Apache Karaf allows you to deploy directly WAR files without repackaging as WAB.
-
-Using the {{webbundle}} prefix and providing headers directly on the URL, Apache Karaf creates a WAB "on the fly".
-
-For instance, you can deploy the Apache Tomcat sample non-OSGi "classical" WAR with the following command:
-
-{code}
-karaf@root()> bundle:install -s "webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample"
-{code}
-
-You can note the {{webbundle}} prefix, and the {{Bundle-SymbolicName}} and {{Web-ContextPath}} headers on the URL.
-
-h2. Commands
-
-h3. {{http:list}}
-
-The {{http:list}} lists the available Servlets deployed in the WebContainer.
-
-For instance, if you have installed the Apache Karaf WebConsole, you can see the WebConsole Servlets:
-
-{code}
-karaf@root()> http:list
-ID | Servlet | Servlet-Name | State | Alias | Url
------------------------------------------------------------------------------------------------------
-113 | ResourceServlet | /res | Deployed | /system/console/res | [/system/console/res/*]
-113 | KarafOsgiManager | ServletModel-2 | Undeployed | /system/console | [/system/console/*]
-113 | KarafOsgiManager | ServletModel-5 | Deployed | /system/console | [/system/console/*]
-{code}
-
-The {{ID}} is the ID of the bundle which provides the servlet ({{113}} here).
-
-The {{State}} is the current state of the Servlet ({{Deployed}} or {{Undeployed}}).
-
-The {{Url}} is the URL where the Servlet is available.
-
-h3. {{web:list}}
-
-The {{web:list}} command lists the WebApplication Bundles ("native" WAB or "wrapped WAR") deployed in the WebContainer.
-
-For instance, if you installed the Apache Karaf manual WAR file as described previously, you can see it with {{web:list}}:
-
-{code}
-karaf@root()> web:list
-ID | State | Web-State | Level | Web-ContextPath | Name
----------------------------------------------------------------------------------------------------
-111 | Active | Deployed | 80 | /karaf-doc | Apache Karaf :: Manual (4.0.0)
-{code}
-
-h3. {{web:stop}}
-
-The {{web:stop}} command stops a web application in the WebContainer. The {{web:stop}} command expects a {{id}} argument
-corresponding to the bundle ID (as displayed by the {{web:list}} command).
-
-For instance, to stop the Apache Karaf manual web application:
-
-{code}
-karaf@root()> web:stop 111
-{code}
-
-h3. {{web:start}}
-
-The {{web:start}} command starts a web application in the WebContainer. The {{web:start}} command expects a {{id}} argument
-corresponding to the bundle ID (as displayed by the {{web:list}} command).
-
-For instance, to start the Apache Karaf manual web application:
-
-{code}
-karaf@root()> web:start 111
-{code}
-
-h2. JMX HttpMBean
-
-On the JMX layer, you have a MBean dedicated to the manipulation of the Servlets: the HttpMBean.
-
-The ObjectName to use is {{org.apache.karaf:type=http,name=*}}.
-
-h3. Attributes
-
-The {{Servlets}} attribute provides a tabular data providing the list of deployed Servlets including:
-
-* {{Alias}} is the Servlet URL alias.
-* {{Bundle-ID}} is the ID of the bundle which provides this Servlet.
-* {{Servlet}} is the class name of the Servlet.
-* {{State}} is the current Servlet state ({{Deployed}} or {{Undeployed}}).
-* {{URL}} is the URL of the Servlet (the Servlet context path).
-
-h2. JMX WebMBean
-
-On the JMX layer, you have a MBean dedicated to the manipulation of the Web Applications: the WebMBean.
-
-The ObjectName to use is {{org.apache.karaf:type=web,name=*}}.
-
-h3. Attributes
-
-The {{WebBundles}} attribute provides a tabular data providing the list of deployed Web Applications including:
-
-* {{ID}} is the ID of the bundle providing the Web Application.
-* {{Level}} is the bundle start level.
-* {{Name}} is the bundle symbolic name providing the Web Application.
-* {{State}} is the current state of the bundle.
-* {{Web-ContextPath}} is the context path of the Web Application.
-* {{Web-State}} is the current status of the Web Application ({{Deployed}} or {{Undeployed}}).
-
-h3. Operations
-
-* {{start(id)}} starts the web context of the bundle with {{id}}.
-* {{start(list)}} starts the web context of the bundles with ID in the provided {{list}}.
-* {{stop(id)}} stops the web context of the bundle with {{id}}.
-* {{stop(list)}} stops the web context of the bundles with ID in the provided {{list}}.
-
[17/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/security-framework.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/security-framework.adoc b/manual/src/main/asciidoc/developer-guide/security-framework.adoc
new file mode 100644
index 0000000..62c6ba4
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/security-framework.adoc
@@ -0,0 +1,842 @@
+//
+// Licensed 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.
+//
+
+== Security framework
+
+Karaf supports http://download.oracle.com/javase/6/docs/technotes/guides/security/jaas/JAASRefGuide.html[JAAS] with
+some enhancements to allow JAAS to work nicely in an OSGi environment.
+
+This framework also features an OSGi keystore manager with the ability to deploy new keystores or truststores at runtime.
+
+=== Overview
+
+This feature allows runtime deployment of JAAS based configuration for use in various parts of the application. This
+includes the remote console login, which uses the `karaf` realm, but which is configured with a dummy login module
+by default. These realms can also be used by the NMR, JBI components or the JMX server to authenticate users logging in
+or sending messages into the bus.
+
+In addition to JAAS realms, you can also deploy keystores and truststores to secure the remote shell console, setting
+up HTTPS connectors or using certificates for WS-Security.
+
+A very simple XML schema for spring has been defined, allowing the deployment of a new realm or a new keystore very easily.
+
+=== Schema
+
+To override or deploy a new realm, you can use the following XSD which is supported by a Spring namespace handler and
+can thus be defined in a Spring xml configuration file.
+
+You can find the schema at the following http://karaf.apache.org/xmlns/jaas/v1.1.0
+
+Here are two examples using this schema:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
+ xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+ <!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
+ <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
+
+ <jaas:config name="myrealm">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ </jaas:module>
+ </jaas:config>
+
+</blueprint>
+----
+
+----
+<jaas:keystore xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
+ name="ks"
+ rank="1"
+ path="classpath:privatestore.jks"
+ keystorePassword="keyStorePassword"
+ keyPasswords="myalias=myAliasPassword">
+</jaas:keystore>
+----
+
+The `id` attribute is the blueprint id of the bean, but it will be used by default as the name of the realm if no
+`name` attribute is specified. Additional attributes on the `config` elements are a `rank`, which is an integer.
+When the LoginContext looks for a realm for authenticating a given user, the realms registered in the OSGi registry are
+matched against the required name. If more than one realm is found, the one with the highest rank will be used, thus
+allowing the override of some realms with new values. The last attribute is `publish` which can be set to false to
+not publish the realm in the OSGi registry, thereby disabling the use of this realm.
+
+Each realm can contain one or more module definitions. Each module identifies a LoginModule and the `className`
+attribute must be set to the class name of the login module to use. Note that this login module must be available from
+the bundle classloader, so either it has to be defined in the bundle itself, or the needed package needs to be correctly
+imported. The `flags` attribute can take one of four values.
+The content of the `module` element is parsed as a properties file and will be used to further configure the login module.
+
+Deploying such a code will lead to a JaasRealm object in the OSGi registry, which will then be used when using the JAAS login module.
+
+==== Configuration override and use of the `rank` attribute
+
+The `rank` attribute on the `config` element is tied to the ranking of the underlying OSGi service. When the JAAS
+framework performs an authentication, it will use the realm name to find a matching JAAS configuration. If multiple
+configurations are used, the one with the highest `rank` attribute will be used.
+So if you want to override the default security configuration in Karaf (which is used by the ssh shell, web console and
+JMX layer), you need to deploy a JAAS configuration with the name `name="karaf"` and `rank="1"`.
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
+ xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+ <!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
+ <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
+
+ <jaas:config name="karaf" rank="1">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ ...
+ </jaas:module>
+ </jaas:config>
+
+</blueprint>
+----
+
+=== Architecture
+
+Due to constraints in the JAAS specification, one class has to be available for all bundles.
+This class is called ProxyLoginModule and is a LoginModule that acts as a proxy for an OSGi defines LoginModule.
+If you plan to integrate this feature into another OSGi runtime, this class must be made available from the system
+classloader and the related package be part of the boot delegation classpath (or be deployed as a fragment attached to
+the system bundle).
+
+The xml schema defined above allows the use of a simple xml (leveraging spring xml extensibility) to configure and
+register a JAAS configuration for a given realm. This configuration will be made available into the OSGi registry as a
+JaasRealm and the OSGi specific Configuration will look for such services.
+Then the proxy login module will be able to use the information provided by the realm to actually load the class from
+the bundle containing the real login module.
+
+Karaf itself provides a set of login modules ready to use, depending of the authentication backend that you need.
+
+In addition of the login modules, Karaf also support backend engine. The backend engine is coupled to a login module and
+allows you to manipulate users and roles directly from Karaf (adding a new user, delete an existing user, etc).
+The backend engine is constructed by a backend engine factory, registered as an OSGi service.
+Some login modules (for security reason for instance) don't provide backend engine.
+
+=== Available realm and login modules
+
+Karaf comes with a default realm named "karaf" using login modules.
+
+Karaf also provides a set of login modules and backend engines to handle authentication needs for your environment.
+
+==== PropertiesLoginModule
+
+|===
+|LoginModule |BackendEngineFactory
+
+| org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
+| org.apache.karaf.jaas.modules.properties.PropertiesBackendEngineFactory
+|===
+
+This login module is the one configured by default. It uses a properties text file to load the users, passwords and roles.
+
+|===
+|Name |Description
+
+|`users`
+| location of the properties file
+|===
+
+This file uses the http://download.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)[properties file format].
+The format of the properties is as follows, with each line defining a user, its password and associated roles:
+
+----
+user=password[,role][,role]...
+----
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = ${karaf.etc}/users.properties
+ </jaas:module>
+</jaas:config>
+----
+
+The PropertiesLoginModule provides a backend engine allowing:
+
+* add a new user
+* delete an existing user
+* list the users, groups, and roles
+* add a new role to an user
+* delete a role from an user
+* add an user into a group
+* remove an user from a group
+* add a role to a group
+* delete a role from a group
+
+To enable the backend engine, you have to register the corresponding OSGi service. For instance, the following blueprint
+shows how to register the PropertiesLoginModule and the corresponding backend engine:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
+ xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+ <jaas:config name="karaf" rank="-1">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = ${karaf.etc}/users.properties
+ </jaas:module>
+ </jaas:config>
+
+ <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
+ <bean class="org.apache.karaf.jaas.modules.properties.PropertiesBackingEngineFactory"/>
+ </service>
+
+</blueprint>
+----
+
+==== OsgiConfigLoginModule
+
+|===
+|LoginModule |BackendEngineFactory
+
+|org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule
+|N/A
+|===
+
+The OsgiConfigLoginModule uses the OSGi ConfigurationAdmin service to provide the users, passwords and roles.
+
+|===
+|Name |Description
+
+|`pid`
+|the PID of the configuration containing user definitions
+|===
+
+The format of the configuration is the same than for the `PropertiesLoginModule` with properties prefixed with `user.`.
+
+For instance, in the Karaf etc folder, we create a file `org.apache.karaf.authentication.cfg` containing:
+
+----
+user.karaf=karaf,admin
+user.user=password,role
+----
+
+The following blueprint shows how to use this configuration:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
+
+ <jaas:config name="karaf" rank="-1">
+ <jaas:module className="org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule"
+ flags="required">
+ pid = org.apache.karaf.authentication
+ </jaas:module>
+ </jaas:config>
+
+</blueprint>
+----
+
+[NOTE]
+====
+The OsgiConfigLoginModule doesn't provide a backend engine.
+====
+
+==== JDBCLoginModule
+
+|===
+|LoginModule |BackendEngineFactory
+
+|org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule
+|org.apache.karaf.jaas.modules.jdbc.JDBCBackendEngineFactory
+|===
+
+The JDBCLoginModule uses a database to load the users, passwords and roles from a provided data source (normal or XA).
+The data source and the queries for password and role retrieval are configurable using the following parameters.
+
+|===
+|Name |Description
+
+|`datasource`
+|The datasource as on OSGi ldap filter or as JDNI name
+
+|`query.password`
+|The SQL query that retries the password of the user
+
+|`query.role`
+|The SQL query that retries the roles of the user
+|===
+
+To use an OSGi ldap filter, the prefix osgi: needs to be provided, as shown below:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
+ flags="required">
+ datasource = osgi:javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
+ query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
+ query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
+ </jaas:module>
+</jaas:config>
+----
+
+To use an JNDI name, the prefix jndi: needs to be provided. The example below assumes the use of Aries jndi to expose
+services via JNDI.
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
+ flags="required">
+ datasource = jndi:aries:services/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
+ query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
+ query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
+ </jaas:module>
+</jaas:config>
+----
+
+The JDBCLoginModule provides a backend engine allowing:
+
+* add a new user
+* delete an user
+* list users, roles
+* add a new role to an user
+* remove a role from an user
+
+[NOTE]
+====
+The groups are not fully supported by the JDBCBackingEngine.
+====
+
+The following blueprint shows how to define the JDBCLoginModule with the corresponding backend engine:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
+
+ <jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule"
+ flags="required">
+ datasource = jndi:aries:services/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/karafdb)
+ query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
+ query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
+ insert.user = INSERT INTO USERS(USERNAME,PASSWORD) VALUES(?,?)
+ insert.role = INSERT INTO ROLES(ROLE,USERNAME) VALUES(?,?)
+ delete.user = DELETE FROM USERS WHERE USERNAME=?
+ </jaas:module>
+ </jaas:config>
+
+ <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
+ <bean class="org.apache.karaf.jaas.modules.jdbc.JDBCBackingEngineFactory"/>
+ </service>
+
+</blueprint>
+----
+
+==== LDAPLoginModule
+
+|===
+|LoginModule |BackendEngineFactory
+
+|org.apache.karaf.jaas.modules.ldap.LDAPLoginModule
+|N/A
+|===
+
+The LDAPLoginModule uses LDAP to load the users and roles and bind the users on the LDAP to check passwords.
+
+The LDAPLoginModule supports the following parameters:
+
+|===
+|Name |Description
+
+|`connection.url`
+|The LDAP connection URL, e.g. ldap://hostname
+
+|`connection.username`
+|Admin username to connect to the LDAP. This parameter is optional, if it's not provided, the LDAP connection will be anonymous.
+
+|`connection.password`
+|Admin password to connect to the LDAP. Only used if the `connection.username` is specified.
+
+|`user.base.dn`
+|The LDAP base DN used to looking for user, e.g. ou=user,dc=apache,dc=org
+
+|`user.filter`
+|The LDAP filter used to looking for user, e.g. (uid=%u) where %u will be replaced by the username.
+
+|`user.search.subtree`
+|If "true", the user lookup will be recursive (SUBTREE). If "false", the user lookup will be performed only at the first level (ONELEVEL).
+
+|`role.base.dn`
+|The LDAP base DN used to looking for roles, e.g. ou=role,dc=apache,dc=org
+
+|`role.filter`
+|The LDAP filter used to looking for user's role, e.g. (member:=uid=%u)
+
+|`role.name.attribute`
+|The LDAP role attribute containing the role string used by Karaf, e.g. cn
+
+|`role.search.subtree`
+|If "true", the role lookup will be recursive (SUBTREE). If "false", the role lookup will be performed only at the first level (ONELEVEL).
+
+|`role.mapping`
+|Define a mapping between roles defined in the LDAP directory for the user, and corresponding roles in Karaf. The format is ldapRole1=karafRole1,karafRole2;ldapRole2=karafRole3,karafRole4.
+
+|`authentication`
+|Define the authentication backend used on the LDAP server. The default is simple.
+
+|`initial.context.factory`
+|Define the initial context factory used to connect to the LDAP server. The default is com.sun.jndi.ldap.LdapCtxFactory
+
+|`ssl`
+|If "true" or if the protocol on the `connection.url` is `ldaps`, an SSL connection will be used
+
+|`ssl.provider`
+|The provider name to use for SSL
+
+|`ssl.protocol`
+|The protocol name to use for SSL (SSL for example)
+
+|`ssl.algorithm`
+|The algorithm to use for the KeyManagerFactory and TrustManagerFactory (PKIX for example)
+
+|`ssl.keystore`
+|The key store name to use for SSL. The key store must be deployed using a `jaas:keystore` configuration.
+
+|`ssl.keyalias`
+|The key alias to use for SSL
+
+|`ssl.truststore`
+|The trust store name to use for SSL. The trust store must be deployed using a `jaas:keystore` configuration.
+|===
+
+A example of LDAPLoginModule usage follows:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
+ connection.url = ldap://localhost:389
+ user.base.dn = ou=user,dc=apache,dc=org
+ user.filter = (cn=%u)
+ user.search.subtree = true
+ role.base.dn = ou=group,dc=apache,dc=org
+ role.filter = (member:=uid=%u)
+ role.name.attribute = cn
+ role.search.subtree = true
+ authentication = simple
+ </jaas:module>
+</jaas:config>
+----
+
+If you wish to use an SSL connection, the following configuration can be used as an example:
+
+----
+<ext:property-placeholder />
+
+<jaas:config name="karaf" rank="1">
+ <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
+ connection.url = ldaps://localhost:10636
+ user.base.dn = ou=users,ou=system
+ user.filter = (uid=%u)
+ user.search.subtree = true
+ role.base.dn = ou=groups,ou=system
+ role.filter = (uniqueMember=uid=%u)
+ role.name.attribute = cn
+ role.search.subtree = true
+ authentication = simple
+ ssl.protocol=SSL
+ ssl.truststore=ks
+ ssl.algorithm=PKIX
+ </jaas:module>
+</jaas:config>
+
+<jaas:keystore name="ks"
+ path="file:///${karaf.home}/etc/trusted.ks"
+ keystorePassword="secret" />
+----
+
+The LDAPLoginModule supports the following patterns that you can use in the filter (user and role filters):
+
+* `%u` is replaced by the user
+* `%dn` is replaced by the user DN
+* `%fqdn` is replaced by the user full qualified DN (`userDNNamespace`).
+
+For instance, the following configuration will work properly with ActiveDirectory (adding the ActiveDirectory to the
+default `karaf` realm):
+
+----
+<jaas:config name="karaf" rank="2">
+ <jaas:module className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule" flags="required">
+ initialContextFactory=com.sun.jndi.ldap.LdapCtxFactory
+ connection.username=admin
+ connection.password=xxxxxxx
+ connection.protocol=
+ connection.url=ldap://activedirectory_host:389
+ user.base.dn=ou=Users,ou=there,DC=local
+ user.filter=(sAMAccountName=%u)
+ user.search.subtree=true
+ role.base.dn=ou=Groups,ou=there,DC=local
+ role.name.attribute=cn
+ role.filter=(member=%fqdn)
+ role.search.subtree=true
+ authentication=simple
+ </jaas:module>
+</jaas:config>
+----
+
+[NOTE]
+====
+The LDAPLoginModule doesn't provide backend engine. It means that the administration of the users and roles should be
+performed directly on the LDAP backend.
+====
+
+==== SyncopeLoginModule
+
+|===
+|LoginModule |BackendEngineFactory
+
+|org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule
+|org.apache.karaf.jaas.modules.syncope.SyncopeBackendEngineFactory
+|===
+
+The Syncope login module uses the Syncope REST API to authenticate users and retrieve the roles.
+
+The Syncope login module just requires one parameter:
+
+|===
+|Name |Description
+
+|`address`
+|Location of the Syncope REST API
+
+|`admin.user`
+|Admin username to administrate Syncope (only required by the backend engine)
+
+|`admin.password`
+|Admin password to administrate Syncope (only required by the backend engine)
+|===
+
+The following snippet shows how to use Syncope with the karaf realm:
+
+----
+<jaas:config name="karaf" rank="2">
+ <jaas:module className="org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule" flags="required">
+ address=http://localhost:9080/syncope/cxf
+ admin.user=admin
+ admin.password=password
+ </jaas:module>
+</jaas:config>
+----
+
+SyncopeLoginModule comes with a backend engine allowing to manipulate users and roles. You have to register the
+SyncopeBackendEngineFactory service.
+
+For security reason, the SyncopeLoginModule backend engine allows only to list users and roles. You can't create or delete
+users and roles directly from Karaf. To do it, you have to use the Syncope web console.
+
+For instance, the following blueprint descriptor enables the SyncopeLoginModule and the backend engine factory:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
+ xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+ <jaas:config name="karaf" rank="2">
+ <jaas:module className="org.apache.karaf.jaas.modules.syncope.SyncopeLoginModule"
+ flags="required">
+ address=http://localhost:9080/syncope/cxf
+ admin.user=admin
+ admin.password=password
+ </jaas:module>
+ </jaas:config>
+
+ <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
+ <bean class="org.apache.karaf.jaas.modules.syncope.SyncopeBackingEngineFactory"/>
+ </service>
+
+</blueprint>
+----
+
+=== Encryption service
+
+The EncryptionService is a service registered in the OSGi registry providing means to encrypt and check encrypted passwords.
+This service acts as a factory for Encryption objects actually performing the encryption.
+
+This service is used in all Karaf login modules to support encrypted passwords.
+
+==== Configuring properties
+
+Each login module supports the following additional set of properties:
+
+|===
+|Name |Description
+
+|`encryption.name`
+|Name of the encryption service registered in OSGi (cf. Jasypt section)
+
+|`encryption.enabled`
+|Boolean used to turn on encryption
+
+|`encryption.prefix`
+|Prefix for encrypted passwords
+
+|`encryption.suffix`
+|Suffix for encrypted passwords
+
+|`encryption.algorithm`
+|Name of an algorithm to be used for hashing, like "MD5" or "SHA-1"
+
+|`encryption.encoding`
+|Encrypted passwords encoding (can be `hexadecimal` or `base64`)
+
+|`role.policy`
+|A policy for identifying roles (can be `prefix` or `group`) (see Role discovery policies section)
+
+|`role.discriminator`
+|A discriminator value to be used by the role policy
+|===
+
+A simple example follows:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ encryption.enabled = true
+ encryption.algorithm = MD5
+ encryption.encoding = hexadecimal
+ </jaas:module>
+</jaas:config>
+----
+
+==== Prefix and suffix
+
+The login modules have the ability to support both encrypted and plain passwords at the same time.
+In some cases, some login modules may be able to encrypt the passwords on the fly and save them back in an encrypted form.
+
+==== Jasypt
+
+Karaf default installation comes with a simple encryption service which usually fullfill simple needs. However, in some
+cases, you may want to install the Jasypt (http://www.jasypt.org/) library which provides stronger encryption algorithms
+and more control over them.
+
+To install the Jasypt library, the easiest way is to install the available feature:
+
+----
+karaf@root> features:install jasypt-encryption
+----
+
+It will download and install the required bundles and also register an `EncryptionService` for Jasypt in the OSGi registry.
+
+When configuring a login module to use Jasypt, you need to specify the `encryption.name` property and set it to a value of `jasypt` to make sure the Jasypt encryption service will be used.
+
+In addition to the standard properties above, the Jasypt service provides the following parameters:
+
+|===
+|Name |Description
+
+|`providerName`
+|Name of the `java.security.Provider` name to use for obtaining the digest algorithm
+
+|`providerClassName`
+|Class name for the security provider to be used for obtaining the digest algorithm
+
+|`iterations`
+|Number of times the hash function will be applied recursively
+
+|`saltSizeBytes`
+|Size of the salt to be used to compute the digest
+
+|`saltGeneratorClassName`
+|Class name of the salt generator
+|===
+
+A typical realm definition using Jasypt encryption service would look like:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ encryption.enabled = true
+ encryption.name = jasypt
+ encryption.algorithm = SHA-256
+ encryption.encoding = base64
+ encryption.iterations = 100000
+ encryption.saltSizeBytes = 16
+ </jaas:module>
+</jaas:config>
+----
+
+==== Using encrypted property placeholders
+
+When using blueprint framework for OSGi for configuring devices that requires passwords like JDBC datasources,
+it is undesirable to use plain text passwords in configuration files. To avoid this problem it is good to store database
+passwords in encrypted format and use encrypted property placeholders when ever possible.
+
+Encrypted properties can be stored in plain properties files. The encrypted content is wrapped by an ENC() function.
+
+----
+#db.cfg / db.properties
+db.url=localhost:9999
+db.username=admin
+db.password=ENC(zRM7Pb/NiKyCalroBz8CKw==)
+----
+
+The encrypted property placeholders can be used either by defining Apache Aries ConfigAdmin `property-placeholder`
+or by directly using the Apache Karaf `property-placeholder`. It has one child element `encryptor` that contains
+the actual Jasypt configuration. For detailed information on how to configure the different Jasypt encryptors, see the
+Jasypt documentation (http://www.jasypt.org/general-usage.html).
+
+A typical definition using Jasypt encryption would look like:
+
+----
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+ xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
+ xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0">
+
+ <!-- Configuration via ConfigAdmin property-placeholder -->
+ <!-- the etc/*.cfg can contain encrypted values with ENC() function -->
+ <cm:property-placeholder persistent-id="db" update-strategy="reload">
+ <cm:default-properties>
+ <cm:property name="encoded" value="ENC(${foo})"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <!-- Configuration via properties file -->
+ <!-- Instead of ConfigAdmin, we can load "regular" properties file from a location -->
+ <!-- Again, the db.properties file can contain encrypted values with ENC() function -->
+ <ext:property-placeholder>
+ <ext:location>file:etc/db.properties</ext:location>
+ </ext:property-placeholder>
+
+ <enc:property-placeholder>
+ <enc:encryptor class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
+ <property name="config">
+ <bean class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
+ <property name="algorithm" value="PBEWithMD5AndDES"/>
+ <property name="passwordEnvName" value="ENCRYPTION_PASSWORD"/>
+ </bean>
+ </property>
+ </enc:encryptor>
+ </enc:property-placeholder>
+
+ <!-- ... -->
+
+</blueprint>
+----
+
+Don't forget to install the jasypt feature to add the support of the enc namespace:
+
+----
+karaf@root()> feature:install jasypt-encryption
+----
+
+=== Role discovery policies
+
+The JAAS specification does not provide means to distinguish between User and Role Principals without referring to the
+specification classes. In order to provide means to the application developer to decouple the application from Karaf
+JAAS implementation role policies have been created.
+
+A role policy is a convention that can be adopted by the application in order to identify Roles, without depending from the implementation.
+Each role policy can be cofigured by setting a "role.policy" and "role.discriminator" property to the login module configuration.
+Currently, Karaf provides two policies that can be applied to all Karaf Login Modules.
+
+. Prefixed Roles
+. Grouped Roles
+
+When the prefixed role policy is used the login module applies a configurable prefix _(property role.discriminator)_ to
+the role, so that the application can identify the role's principals by its prefix. Example:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ role.policy = prefix
+ role.discriminator = ROLE_
+ </jaas:module>
+</jaas:config>
+----
+
+The application can identify the role principals using a snippet like this:
+
+----
+LoginContext ctx = new LoginContext("karaf", handler);
+ctx.login();
+authenticated = true;
+subject = ctx.getSubject();
+for (Principal p : subject.getPrincipals()) {
+ if (p.getName().startsWith("ROLE_")) {
+ roles.add((p.getName().substring("ROLE_".length())));
+ }
+}
+----
+
+When the group role policy is used the login module provides all roles as members of a group with a configurable name _(property role.discriminator)_. Example:
+
+----
+<jaas:config name="karaf">
+ <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
+ flags="required">
+ users = $[karaf.base]/etc/users.properties
+ role.policy = group
+ role.discriminator = ROLES
+ </jaas:module>
+</jaas:config>
+----
+
+----
+LoginContext ctx = new LoginContext("karaf", handler);
+ctx.login();
+authenticated = true;
+subject = ctx.getSubject();
+for (Principal p : subject.getPrincipals()) {
+ if ((p instanceof Group) && ("ROLES".equalsIgnoreCase(p.getName()))) {
+ Group g = (Group) p;
+ Enumeration<? extends Principal> members = g.members();
+ while (members.hasMoreElements()) {
+ Principal member = members.nextElement();
+ roles.add(member.getName());
+ }
+ }
+}
+----
+
+=== Default role policies
+
+The previous section describes how to leverage role policies. However, Karaf provides a default role policy, based on the following class names:
+
+* org.apache.karaf.jaas.modules.UserPrincipal
+* org.apache.karaf.jaas.modules.RolePrincipal
+* org.apache.karaf.jaas.modules.GroupPrincipal
+
+It allows you to directly handling the role class:
+
+----
+String rolePrincipalClass = "org.apache.karaf.jaas.modules.RolePrincipal";
+
+for (Principal p : subject.getPrincipals()) {
+ if (p.getClass().getName().equals(rolePrincipalClass)) {
+ roles.add(p.getName());
+ }
+}
+----
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/services.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/services.adoc b/manual/src/main/asciidoc/developer-guide/services.adoc
new file mode 100644
index 0000000..f724270
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/services.adoc
@@ -0,0 +1,15 @@
+//
+// Licensed 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.
+//
+
+== OSGi Services
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/developer-guide/writing-tests.adoc b/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
new file mode 100644
index 0000000..d3f95a7
--- /dev/null
+++ b/manual/src/main/asciidoc/developer-guide/writing-tests.adoc
@@ -0,0 +1,370 @@
+//
+// Licensed 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.
+//
+
+== Writing integration tests
+
+We recommend using http://team.ops4j.org/wiki/display/paxexam/Pax+Exam[PAX Exam] to write integration tests when developing applications using Karaf.
+
+Starting with Karaf 3.0 we've also included a component briding between Karaf and Pax Exam making it easier to write integration tests
+for Karaf or Karaf based distributions.
+
+=== Introduction
+
+Pax Exam directly supports Karaf as a test container.
+
+To make use of this new framework simply add the following dependencies into your integration tests pom.xml:
+
+----
+<dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-karaf</artifactId>
+ <version>4.7.0</version>
+ <scope>test</scope>
+</dependency>
+<dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>4.7.0</version>
+ <scope>test</scope>
+</dependency>
+<dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-atinject-1.0_spec</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+</dependency>
+----
+
+As a next step you need to reference the distribution you want to run your tests on.
+For instance, if you want to run your tests on Karaf the following section would be required in the integration tests pom.xml:
+
+----
+<dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>4.0.0</version>
+ <type>tar.gz</type>
+ <scope>test</scope>
+</dependency>
+----
+
+If you want to make use of Exams "versionAsInProject" feature you also need to add the following section:
+
+----
+<build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+</build>
+----
+
+With this done we can start writing our first test case:
+
+----
+import static junit.framework.Assert.assertTrue;
+import static org.ops4j.pax.exam.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
+
+@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
+public class VersionAsInProjectKarafTest {
+
+ @Configuration
+ public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration().frameworkUrl(
+ maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject())
+ .karafVersion("4.0.0").name("Apache Karaf")};
+ }
+
+ @Test
+ public void test() throws Exception {
+ assertTrue(true);
+ }
+}
+----
+
+=== Commands
+
+==== KarafDistributionConfigurationOption
+
+The framework itself is non of the typical runtimes you define normally in Pax-Exam.
+
+Instead you define a packed distribution as zip or tar.gz. Those distributions have to follow the Karaf packaging style.
+Therefore instead of Karaf you can also enter Servicemix or Geronimo.
+
+----
+new KarafDistributionConfigurationOption(
+ "mvn:org.apache.karaf/apache-karaf/4.0.0/zip", // artifact to unpack and use
+ "karaf", // name; display only
+ "4.0.0") // the karaf version; this one is relevant since the startup script differs between versions
+----
+
+or for Servicemix e.g.
+
+----
+new KarafDistributionConfigurationOption(
+ "mvn:org.apache.servicemix/apache-servicemix/4.4.0/zip", // artifact to unpack and use
+ "servicemix", // name; display only
+ "2.2.4") // the karaf version; this one is relevant since the startup script differs between versions
+----
+
+As an alternative you can also use the maven url resolvers.
+
+----
+...
+<dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <type>zip</type>
+ <classifier>bin</classifier>
+ <scope>test</scope>
+</dependency>
+...
+<plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin>
+----
+
+----
+@Configuration
+ public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration().frameworkUrl(
+ maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip")
+ .classifier("bin").versionAsInProject()) };
+ }
+----
+
+In addition to the framework specification options this option also includes various additional configuration options.
+Those options are used to configure the internal properties of the runtime environment.
+
+===== Unpack Directory
+
+Pax-Exam Testframework extracts the distribution you specify by default into the paxexam config directory.
+If you would like to unpack them into your target directory simply extend the KarafDistributionConfigurationOption with the unpackDirectoryFile like shown in the next example:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip")
+ .unpackDirectory(new File("target/paxexam/unpack/")) };
+}
+----
+
+===== Use Deploy Folder
+
+Karaf distributions come by default with a deploy folder where you can simply drop artifacts to be deployed.
+In some distributions this folder might have been removed. To still be able to deploy your additional artifacts using
+default Pax Exam ProvisionOptions you can configure PaxExam Karaf to use a features.xml (which is directly added to
+your `etc/org.apache.karaf.features.cfg`) for those deploys. To use it instead of the deploy folder simply do the following:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip")
+ .useDeployFolder(false)) };
+}
+----
+
+==== KarafDistributionKitConfigurationOption
+
+The KarafDistributionKitConfigurationOption is almost equal to all variations of the KarafDistributionConfigurationOption
+with the exception that it requires to have set a platform and optionally the executable and the files which should be
+made executable additionally. By default it is bin/karaf for nix platforms and bin\karaf.bat for windows platforms.
+The executable option comes in handy if you like to e.g. embed an own java runtime. You should add a windows AND a
+linux Kit definition. The framework automatically takes the correct one then. The following shows a simple example for Karaf:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{
+ new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/4.0.0/zip",
+ Platform.WINDOWS).executable("bin\\karaf.bat").filesToMakeExecutable("bin\\admin.bat"),
+ new KarafDistributionKitConfigurationOption("mvn:org.apache.karaf/apache-karaf/4.0.0/tar.gz", "karaf",
+ Platform.NIX).executable("bin/karaf").filesToMakeExecutable("bin/admin") };
+}
+----
+
+==== KarafDistributionConfigurationFilePutOption
+
+The option replaces or adds an option to one of Karaf's configuration files:
+
+----
+new KarafDistributionConfigurationFilePutOption(
+ "etc/config.properties", // config file to modify based on karaf.base
+ "karaf.framework", // key to add or change
+ "equinox") // value to add or change
+----
+
+This option could also be used in "batch-mode" via a property file. Therefore use the
+KarafDistributionOption#editConfigurationFilePut(final String configurationFilePath, File source, String... keysToUseFromSource) method.
+This option allows you to add all properties found in the file as KarafDistributionConfigurationFilePutOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily put an entire range of properties.
+
+==== KarafDistributionConfigurationFileExtendOption
+
+This one does the same as the KarafDistributionConfigurationFilePutOption option with the one difference that it either
+adds or appends a specific property. This is especially useful if you do not want to store the entire configuration in the line in your code.
+
+This option could also be extended in "batch-mode" via a property file. Therefore use the
+KarafDistributionOption#editConfigurationFileExtend(final String configurationFilePath, File source, String... keysToUseFromSource) method. This option allows you to extend all properties found in the file as KarafDistributionConfigurationFileExtendOption. If you configure the "keysToUseFromSource" array only the keys specified there will be used. That way you can easily extend an entire range of properties.
+
+==== KarafDistributionConfigurationFileReplacementOption
+
+The file replacement option allows you to simply replace a file in you Karaf distribution with a different file:
+
+----
+new KarafDistributionConfigurationFileReplacementOption("etc/tests.cfg", new File(
+ "src/test/resources/BaseKarafDefaultFrameworkDuplicatedPropertyEntryTestSecondKey"));
+----
+
+==== ProvisionOption
+
+The new test container fully supports the provision option. Feel free to use any option provided here by paxexam itself (e.g. Maven resolver).
+All those artifacts are copied into the deploy folder of your Karaf distribution before it is started. Therefore they all will be available after startup.
+
+==== KarafDistributionConfigurationConsoleOption
+
+The test container supports options to configure if the localConsole and/or the remote shell should be started. Possible options to do so are shown in the following two examples:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ configureConsole().ignoreLocalConsole().startRemoteShell() };
+}
+----
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ configureConsole().startLocalConsole(), configureConsole().ignoreRemoteShell() };
+}
+----
+
+==== VMOption
+
+The Karaf container passes the vmOptions now through to the Karaf environment. They are directly passed to the startup of the container.
+In addition the KarafDistributionOption helper has two methods (debugConfiguration() and debugConfiguration(String port, boolean hold)) to activate debugging quickly.
+
+==== LogLevelOption
+
+The Paxexam-Karaf specific log-level option allows an easy way to set a specific log-level for the Karaf based distribution. For example simply add the following to your Option[] array to get TRACE logging:
+
+----
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
+...
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ logLevel(LogLevel.TRACE) };
+}
+----
+
+==== DoNotModifyLogOption
+
+The option to modify the logging behavior requires that the container automatically modifies the logging configuration file.
+If you would like to suppress this behavior simply set the doNotModifyLogConfiguration option as shown in the next example:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ doNotModifyLogConfiguration() };
+}
+----
+
+==== KeepRuntimeFolderOption
+
+Per default the test container removes all test runner folders. If you want to keep them for any reasons (e.g. check why a test fails) set the following option:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ keepRuntimeFolder() };
+}
+----
+
+==== FeaturesScannerProvisionOption
+
+The FeaturesScannerProvisionOption (e.g. CoreOption.scanFeature()) are directly supported by the Paxexam Karaf Testframework.
+
+==== BootDelegationOption
+
+The BootDelegationOption as known from PaxExam is also supported added the boot delegation string directly into the correct property files.
+
+==== SystemPackageOption
+
+The Standard Exam SystemPackageOption is implemented by adding those packages to "org.osgi.framework.system.packages.extra" of the config.properties file.
+
+==== BootClasspathLibraryOption
+
+The BootClasspathLibraryOption is honored by copying the urls into the lib directory where they are automatically taken and worked on.
+
+==== ExamBundlesStartLevel
+
+The ExamBundlesStartLevel can be used to configure the start lvl of the bundles provided by the test-frameworks features.xml. Simply use it as a new option like:
+
+----
+@Configuration
+public Option[] config() {
+ return new Option[]{ karafDistributionConfiguration("mvn:org.apache.karaf/apache-karaf/4.0.0/zip"),
+ useOwnExamBundlesStartLevel(4) };
+}
+----
+
+=== Driver
+
+Drivers are the parts of the framework responsible for running the Karaf Based Distribution. By default the already in
+the overview explained KarafDistributionConfigurationOption uses a JavaRunner starting the distribution platform independent
+but not using the scripts in the distribution. If you like to test those scripts too an option is to to use the ScriptRunner via the KarafDistributionKitConfigurationOption instead.
+
+==== JavaRunner
+
+The JavaRunner builds the entire command itself and executes Karaf in a new JVM. This behavior is more or less exactly
+what the default runner does. Simply use the KarafDistributionConfigurationOption as explained in the Commands section to use this.
+
+==== ScriptRunner
+
+The script runner has the disadvantage over the java runner that it is also platform dependent.
+The advantage though is that you can also test your specific scripts. To use it follow the explanation of the KarafDistributionKitConfigurationOption in the Commands section.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/asf-logo.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/asf-logo.png b/manual/src/main/asciidoc/images/asf-logo.png
new file mode 100644
index 0000000..d824fab
Binary files /dev/null and b/manual/src/main/asciidoc/images/asf-logo.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/bg.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/bg.png b/manual/src/main/asciidoc/images/bg.png
new file mode 100644
index 0000000..878a84f
Binary files /dev/null and b/manual/src/main/asciidoc/images/bg.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/bg02-blue-left.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/bg02-blue-left.png b/manual/src/main/asciidoc/images/bg02-blue-left.png
new file mode 100644
index 0000000..057efdf
Binary files /dev/null and b/manual/src/main/asciidoc/images/bg02-blue-left.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/bg02-blue-right.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/bg02-blue-right.png b/manual/src/main/asciidoc/images/bg02-blue-right.png
new file mode 100644
index 0000000..edf9a9d
Binary files /dev/null and b/manual/src/main/asciidoc/images/bg02-blue-right.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/bg02-white-left-nogr.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/bg02-white-left-nogr.png b/manual/src/main/asciidoc/images/bg02-white-left-nogr.png
new file mode 100644
index 0000000..1c5186c
Binary files /dev/null and b/manual/src/main/asciidoc/images/bg02-white-left-nogr.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/bg02-white-right-nogr.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/bg02-white-right-nogr.png b/manual/src/main/asciidoc/images/bg02-white-right-nogr.png
new file mode 100644
index 0000000..9734def
Binary files /dev/null and b/manual/src/main/asciidoc/images/bg02-white-right-nogr.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/big-bullet.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/big-bullet.png b/manual/src/main/asciidoc/images/big-bullet.png
new file mode 100644
index 0000000..f036db5
Binary files /dev/null and b/manual/src/main/asciidoc/images/big-bullet.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/deployer.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/deployer.png b/manual/src/main/asciidoc/images/deployer.png
new file mode 100644
index 0000000..505eb3c
Binary files /dev/null and b/manual/src/main/asciidoc/images/deployer.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_admin.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_admin.jpg b/manual/src/main/asciidoc/images/jconsole_admin.jpg
new file mode 100644
index 0000000..93e8d0e
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_admin.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_connect.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_connect.jpg b/manual/src/main/asciidoc/images/jconsole_connect.jpg
new file mode 100644
index 0000000..6041ee1
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_connect.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_features.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_features.jpg b/manual/src/main/asciidoc/images/jconsole_features.jpg
new file mode 100644
index 0000000..233e5fa
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_features.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_memory.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_memory.jpg b/manual/src/main/asciidoc/images/jconsole_memory.jpg
new file mode 100644
index 0000000..c9fbb29
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_memory.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_overview.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_overview.jpg b/manual/src/main/asciidoc/images/jconsole_overview.jpg
new file mode 100644
index 0000000..b41a72b
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_overview.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_summary.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_summary.jpg b/manual/src/main/asciidoc/images/jconsole_summary.jpg
new file mode 100644
index 0000000..7245d12
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_summary.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/jconsole_threads.jpg
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/jconsole_threads.jpg b/manual/src/main/asciidoc/images/jconsole_threads.jpg
new file mode 100644
index 0000000..b4c0cb2
Binary files /dev/null and b/manual/src/main/asciidoc/images/jconsole_threads.jpg differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/karaf-logo.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/karaf-logo.png b/manual/src/main/asciidoc/images/karaf-logo.png
new file mode 100644
index 0000000..066ab86
Binary files /dev/null and b/manual/src/main/asciidoc/images/karaf-logo.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/karaf.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/karaf.png b/manual/src/main/asciidoc/images/karaf.png
new file mode 100644
index 0000000..f9fb4a4
Binary files /dev/null and b/manual/src/main/asciidoc/images/karaf.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/karaf2.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/karaf2.png b/manual/src/main/asciidoc/images/karaf2.png
new file mode 100644
index 0000000..f9fb4a4
Binary files /dev/null and b/manual/src/main/asciidoc/images/karaf2.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/left-box-bottom.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/left-box-bottom.png b/manual/src/main/asciidoc/images/left-box-bottom.png
new file mode 100644
index 0000000..0495248
Binary files /dev/null and b/manual/src/main/asciidoc/images/left-box-bottom.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/left-box-right.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/left-box-right.png b/manual/src/main/asciidoc/images/left-box-right.png
new file mode 100644
index 0000000..2698074
Binary files /dev/null and b/manual/src/main/asciidoc/images/left-box-right.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/images/left-box-top.png
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/images/left-box-top.png b/manual/src/main/asciidoc/images/left-box-top.png
new file mode 100644
index 0000000..e1fc26e
Binary files /dev/null and b/manual/src/main/asciidoc/images/left-box-top.png differ
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/index.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc
new file mode 100644
index 0000000..7f7a57f
--- /dev/null
+++ b/manual/src/main/asciidoc/index.adoc
@@ -0,0 +1,137 @@
+//
+// Licensed 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.
+//
+
+Apache Karaf Container 4.x - Documentation
+=========================================
+Apache Software Foundation
+:doctype: book
+:toc: left
+:toclevels: 3
+:toc-position: left
+:toc-title: Apache Karaf Container 4.x - Documentation
+:numbered:
+
+= Overview
+
+include::overview.adoc[]
+
+= Quick Start
+
+include::quick-start.adoc[]
+
+= Update Notes (from Karaf 3.x to 4.x versions)
+
+include::update-notes.adoc[]
+
+= User Guide
+
+include::user-guide/installation.adoc[]
+
+include::user-guide/directory-structure.adoc[]
+
+include::user-guide/start-stop.adoc[]
+
+include::user-guide/wrapper.adoc[]
+
+include::user-guide/console.adoc[]
+
+include::user-guide/remote.adoc[]
+
+include::user-guide/log.adoc[]
+
+include::user-guide/configugration.adoc[]
+
+include::user-guide/urls.adoc[]
+
+include::user-guide/provisioning.adoc[]
+
+include::user-guide/deployers.adoc[]
+
+include::user-guide/kar.adoc[]
+
+include::user-guide/instances.adoc[]
+
+include::user-guide/security.adoc[]
+
+include::user-guide/obr.adoc[]
+
+== Enterprise
+
+include::user-guide/http.adoc[]
+
+include::user-guide/webcontainer.adoc[]
+
+include::user-guide/jndi.adoc[]
+
+include::user-guide/jta.adoc[]
+
+include::user-guide/jdbc.adoc[]
+
+include::user-guide/jms.adoc[]
+
+include::user-guide/jpa.adoc[]
+
+include::user-guide/ejb.adoc[]
+
+include::user-guide/cdi.adoc[]
+
+include::user-guide/failover.adoc[]
+
+include::user-guide/monitoring.adoc[]
+
+include::user-guide/webconsole.adoc[]
+
+include::user-guide/tuning.adoc[]
+
+= Developer Guide
+
+[NOTE]
+====
+The developer guide is currently under a refactoring. The "new" developer guide will document samples providing
+in the Karaf Container distribution, in order to have more practical recipes.
+====
+
+include::developer-guide/developer-commands.adoc[]
+
+include::developer-guide/scripting.adoc[]
+
+include::developer-guide/connect.adoc[]
+
+include::developer-guide/branding.adoc[]
+
+include::developer-guide/extending.adoc[]
+
+include::developer-guide/karaf-maven-plugin.adoc[]
+
+include::developer-guide/custom-distribution.adoc[]
+
+include::developer-guide/services.adoc[]
+
+include::developer-guide/creating-bundles.adoc[]
+
+include::developer-guide/blueprint.adoc[]
+
+include::developer-guide/ds.adoc[]
+
+include::developer-guide/dev-cdi.adoc[]
+
+include::developer-guide/archetypes.adoc[]
+
+include::developer-guide/security-framework.adoc[]
+
+include::developer-guide/debugging.adoc[]
+
+include::developer-guide/writing-tests.adoc[]
+
+include::developer-guide/github-contributions.adoc[]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/overview.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/overview.adoc b/manual/src/main/asciidoc/overview.adoc
new file mode 100644
index 0000000..6b87e57
--- /dev/null
+++ b/manual/src/main/asciidoc/overview.adoc
@@ -0,0 +1,51 @@
+//
+// Licensed 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.
+//
+
+Apache Karaf is a modern and polymorphic container.
+
+Karaf can be used standalone as a container, supporting a wide range of applications and technologies.
+It also supports the "run anywhere" (on any machine with Java, cloud, docker images, ...) using the embedded mode.
+
+It's a lightweight, powerful, and enterprise ready platform.
+
+With this flexibility, Karaf is the perfect solution for microservices, systems integration, big data, and much more.
+
+Apache Karaf is powered by OSGi (but you don't need to know what OSGi is to use Karaf).
+
+Apache Karaf uses either the Apache Felix or Eclipse Equinox OSGi frameworks, providing additional features on top of the framework.
+
+Apache Karaf can be scaled from a very lightweight container to a fully featured enterprise service: it's a very flexible and extensible container, covering all the major needs.
+
+Here is a short list of provided features:
+
+* *Hot deployment*: simply drop a file in the `deploy` directory, Apache Karaf will detect the type of the file and
+ try to deploy it.
+* *Complete Console*: Apache Karaf provides a complete Unix-like console where you can completely manage the container.
+* *Dynamic Configuration*: Apache Karaf provides a set of commands focused on managing its own configuration.
+ All configuration files are centralized in the `etc` folder. Any change in a configuration file is noticed and reloaded.
+* *Advanced Logging System*: Apache Karaf supports all the popular logging frameworks (slf4j, log4j, etc). Whichever
+ logging framework you use, Apache Karaf centralizes the configuration in one file.
+* *Provisioning*: Apache Karaf supports a large set of URLs where you can install your applications (Maven repository, HTTP,
+ file, etc). It also provides the concept of "Karaf Features" which is a way to describe your application.
+* *Management*: Apache Karaf is an enterprise-ready container, providing many management indicators and operations
+ via JMX.
+* *Remote*: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also
+ accessible remotely.
+* *Security*: Apache Karaf provides a complete security framework (based on JAAS), and provides a RBAC (Role-Based Access
+ Control) mechanism for console and JMX access.
+* *Instances*: multiple instances of Apache Karaf can be managed directly from a main instance (root).
+* *OSGi frameworks*: Apache Karaf is not tightly coupled to one OSGi framework. By default, Apache Karaf runs with the Apache Felix
+ Framework, but you can easily switch to Equinox (just change one property in a configuration file).
+
+image::karaf.png[]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/quick-start.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/quick-start.adoc b/manual/src/main/asciidoc/quick-start.adoc
new file mode 100644
index 0000000..5a9b55a
--- /dev/null
+++ b/manual/src/main/asciidoc/quick-start.adoc
@@ -0,0 +1,181 @@
+//
+// Licensed 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 instructions should help you get Apache Karaf up and running in 5 to 15 minutes.
+
+== Prerequisites
+
+Karaf requires a Java SE 7 or Java SE 8 environment to run. Refer to http://www.oracle.com/technetwork/java/javase/ for details on how to download and install Java SE 1.7 or greater.
+
+* Open a Web browser and access the following URL: http://karaf.apache.org/index/community/download.html
+* Download the binary distribution that matches your system (zip for windows, tar.gz for unixes)
+* Extract the archive to a new folder on your hard drive; for example in c:\karaf - from now on this directory will be referenced as <KARAF_HOME>.
+
+== Start the server
+
+Open a command line console and change the directory to <KARAF_HOME>.
+
+To start the server, run the following command in Windows:
+
+----
+bin\karaf.bat
+----
+
+respectively on Unix:
+
+----
+bin/karaf
+----
+
+You should see the following information on the command line console:
+
+----
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+
+----
+
+== Shell console basics
+
+You can now run your first command. Simply type the `<tab>` key in the console.
+
+----
+karaf@root()> Display all 294 possibilities? (y or n)
+...
+shell:logout shell:more shell:new shell:printf shell:sleep shell:sort shell:source
+shell:stack-traces-print shell:tac shell:tail shell:threads shell:watch shell:wc shell:while
+shutdown sleep sort source ssh ssh ssh-host-change
+ssh-port-change ssh:ssh stack-traces-print start start-level status stop
+su sudo system system:framework system:name system:property system:shutdown
+system:start-level system:version tac tail threads tree-show uninstall
+update user-add user-delete user-list version version-list wait
+watch wc while
+----
+
+You can then grab more specific help for a given command using the `--help` option for this command:
+
+----
+karaf@root()> bundle:list --help
+DESCRIPTION
+ bundle:list
+
+ Lists all installed bundles.
+
+SYNTAX
+ bundle:list [options] [ids]
+
+ARGUMENTS
+ ids
+ The list of bundle (identified by IDs or name or name/version) separated by whitespaces
+
+OPTIONS
+ -t
+ Specifies the bundle threshold; bundles with a start-level less than this value will not get printed out.
+ --no-format
+ Disable table rendered output
+ -s
+ Shows the symbolic name
+ -l
+ Show the locations
+ --no-ellipsis
+
+ --help
+ Display this help message
+ -u
+ Shows the update locations
+ --context, -c
+ Use the given bundle context
+ (defaults to 0)
+ -r
+ Shows the bundle revisions
+----
+
+Note that the console supports tab completion so if you start typing a command it will show all possible completions and also auto complete if there is only one completion.
+
+== Deploy a sample application
+
+While you will learn in the Karaf user's guide how to fully use and leverage Apache Karaf, let's install a sample http://camel.apache.org[Apache Camel] application for now:
+
+In the console, run the following commands:
+
+----
+karaf@root()> feature:repo-add camel 2.15.2
+Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.15.2/xml/features
+karaf@root()> feature:install camel-spring
+karaf@root()> bundle:install -s mvn:org.apache.camel/camel-example-osgi/2.15.2
+Bundle ID: 82
+----
+
+The example installed is using Camel to start a timer every 2 seconds and output a message in the log.
+The previous commands download the Camel features descriptor and install the example feature.
+
+You can display the log in the shell:
+
+----
+karaf@root()> log:display
+...
+2015-06-30 13:39:44,731 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:44 CEST 2015]
+2015-06-30 13:39:46,730 | INFO | timer://myTimer | MyTransform | 82 - camel-example-osgi - 2.15.2 | >>>> SpringDSL set body: Tue Jun 30 13:39:46 CEST 2015
+2015-06-30 13:39:46,731 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:46 CEST 2015]
+2015-06-30 13:39:48,730 | INFO | timer://myTimer | MyTransform | 82 - camel-example-osgi - 2.15.2 | >>>> SpringDSL set body: Tue Jun 30 13:39:48 CEST 2015
+2015-06-30 13:39:48,730 | INFO | timer://myTimer | ExampleRouter | 53 - org.apache.camel.camel-core - 2.15.2 | Exchange[ExchangePattern: InOnly, BodyType: String, Body: SpringDSL set body: Tue Jun 30 13:39:48 CEST 2015]
+----
+
+== Stopping and uninstalling the sample application
+
+To stop and uninstall the demo, run the following command:
+
+----
+karaf@root()> bundle:stop camel-example-osgi
+karaf@root()> bundle:uninstall camel-example-osgi
+----
+
+== Stopping Karaf
+
+To stop Karaf from the console, enter `^D` in the console:
+
+----
+^D
+----
+
+Alternatively, you can also run the following command:
+
+----
+karaf@root()> system:shutdown
+----
+
+halt is also an alias for system:shutdown:
+
+----
+karaf@root()> halt
+----
+
+== Cleaning the Karaf state
+
+Normally Karaf remembers the features and bundles you installed and started. To reset Karaf into a clean state, just delete the data directory when Karaf is not running.
+
+== Summary
+
+This document shows how simple it is to get Apache Karaf up and running and install a simple Apache Camel application.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/update-notes.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/update-notes.adoc b/manual/src/main/asciidoc/update-notes.adoc
new file mode 100644
index 0000000..0c5176f
--- /dev/null
+++ b/manual/src/main/asciidoc/update-notes.adoc
@@ -0,0 +1,171 @@
+//
+// Licensed 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.
+//
+
+This section is dedicated to users of previous Apache Karaf version.
+
+NB: for the users upgrading from Karaf 2.x, please see the "Update Notes (from 2.x to 3.x)" in the Karaf 3.x
+documentation first.
+
+NB: Karaf 4.x supports Java8.
+
+== Distributions
+
+Apache Karaf 4.x is available as tar.gz and zip archives. The content is the same and works on either Unix or Windows
+platforms.
+The `bin` folder contains both sh and bat scripts.
+
+== Commands
+
+Karaf 4 commands are close to the ones provided in Karaf 3.
+
+The sub-shell modes are the same (in `etc/org.apache.karaf.shell.cfg` or using `shell:completion` command).
+
+However, some minor changes have been introduced and new commands available:
+
+|===
+|Apache Karaf 4.x
+
+|feature:requirement-list
+
+|feature:requirement-add
+
+|feature:requirement-remove
+
+|feature:regions
+
+|feature:start
+
+|feature:stop
+
+|jaas:group-create
+
+|jaas:group-add
+
+|jaas:group-delete
+
+|jaas:group-list
+
+|jaas:group-role-add
+
+|jaas:group-role-delete
+
+|jaas:su
+
+|jaas:sudo
+
+|shell:edit
+
+|shell:env
+
+|shell:less
+
+|shell:stack-traces-print
+
+|shell:threads
+
+|shell:while
+
+|log:list
+
+|bundle:capabilities
+
+|bundle:diag
+
+|bundle:id
+
+|bundle:load-test
+
+|bundle:requirements
+
+|bundle:resolve
+
+|system:name
+|===
+
+We encourage the users to use the `--help` option to check the name and type of arguments and options.
+
+In term of development, you can still use the blueprint definition as you do in Karaf 2.x & 3.x (with the corresponding annotations).
+
+However, in Karaf 4.x, you can use DS and new annotations and avoid the usage of a blueprint XML.
+
+The new annotations are available: @Service, @Completion, @Parsing, @Reference. It allows you to complete define the command
+in the command class directly.
+
+To simplify the generation of the code and OSGi headers, Karaf 4.x provides the karaf-services-maven-plugin (in org.apache.karaf.tooling Maven groupId).
+
+Take a look in the developer guide for the command development "new style" details.
+
+== Features repositories
+
+Karaf 4.x provides:
+
+* `mvn:org.apache.karaf.features/enterprise/4.0.x/xml/features`
+* `mvn:org.apache.karaf.features/framework/4.0.x/xml/features`
+* `mvn:org.apache.karaf.features/spring/4.0.x/xml/features`
+* `mvn:org.apache.karaf.features/standard/4.0.x/xml/features`
+* `mvn:org.apache.karaf.features/static/4.0.x/xml/features`
+
+== Features resolver
+
+Apache Karaf 4.x brings a complete new feature resolver. The purpose is to simplify the features installation and
+lifecycle.
+The new resolver now checks the feature requirements (defined directly in the features XML), and check which bundles
+provides the capabilities to satisfy these requirements.
+It allows Karaf to automatically install bundles required by features.
+
+For "old style" feature (features XML using namespace from Karaf 2.x or 3.x), this feature is not enabled.
+As soon as you use a "new style" feature (with namespace 1.3.0 used by Karaf 4.x), this feature is enabled.
+
+== Namespaces
+
+Apache Karaf 4.x brings updated version of the namespaces:
+
+* Supported features namespaces:
+** `karaf-features-1.0.0.xsd`
+** `karaf-features-1.1.0.xsd`
+** `karaf-features-1.2.0.xsd`
+** `karaf-features-1.2.1.xsd`
+** `karaf-features-1.3.0.xsd`
+* Supported jaas namespaces:
+** `karaf-jaas-1.0.0.xsd`
+** `karaf-jaas-1.1.0.xsd`
+* Supported shell namespaces:
+** `karaf-shell-1.0.0.xsd`
+** `karaf-shell-1.1.0.xsd`
+
+== Maven plugin
+
+A cleanup of the goals provided by {{karaf-maven-plugin}} has been done.
+
+Now the provided goals are:
+
+* `karaf:archive` to create a tar.gz or zip of a Karaf distribution
+* `karaf:assembly` to create a custom Karaf distribution assembly
+* `karaf:kar` to create a kar file
+* `karaf:verify` to verify and validate Karaf features
+* `karaf:features-add-to-repository` to recursively copy features XML and content into a folder (repository)
+* `karaf:features-export-meta-data` to extract the metadata from a features XML
+* `karaf:features-generate-descriptor` to generate a features XML
+* `karaf:commands-generate-help` to generate help/documentation on the commands
+* `karaf:run` to run a Karaf container directly from Maven
+* `karaf:client` to interact with a remote Karaf instance
+* `karaf:deploy` to deploy an application to a remote Karaf instance
+
+== Update guide
+
+We encourage users to start a fresh Apache Karaf 4.x container.
+
+If you upgrade an existing container, `lib` and `system` folder have to be updated (just an override copy).
+
+For the `etc` folder, a diff is required as some properties changed and new configurations are available.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/cdi.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/cdi.adoc b/manual/src/main/asciidoc/user-guide/cdi.adoc
new file mode 100644
index 0000000..3ddd253
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/cdi.adoc
@@ -0,0 +1,75 @@
+//
+// Licensed 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.
+//
+
+=== CDI
+
+This section described how to add support of CDI, and embed a CDI container in Apache Karaf. It doesn't describe
+how to develop CDI applications. See the developer guide for that.
+
+==== Pax CDI
+
+Apache Karaf supports different CDI containers by using Pax CDI.
+
+Pax CDI is pre-loaded in Apache Karaf.
+
+You can see now a set of new CDI features available:
+
+----
+karaf@root()> feature:list|grep -i cdi
+pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
+pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
+pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
+pax-cdi-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI support
+pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
+pax-cdi-1.2-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.2 support
+pax-cdi-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans CDI support
+pax-cdi-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI support
+pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
+pax-cdi-1.2-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.2 support
+pax-cdi-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI support
+pax-cdi-1.1-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.1 support
+pax-cdi-1.2-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.2 support
+pax-cdi-web-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans Web CDI support
+deltaspike-core | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike core support
+deltaspike-jpa | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike jpa support
+deltaspike-partial-bean | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike partial bean support
+deltaspike-data | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike data support
+----
+
+==== CDI Containers
+
+Thanks to Pax CDI, Apache Karaf supports multiple CDI implementation versions, and different CDI containers.
+
+You just have to install the feature corresponding to the CDI container and version that you want to use.
+
+===== Apache OpenWebBeans
+
+Apache Karaf provides a ready to use feature for Apache OpenWebBeans.
+
+The `openwebbeans` feature automatically install the Pax CDI features and the Apache OpenWebBeans bundles:
+
+----
+karaf@root()> feature:install http
+karaf@root()> feature:install pax-cdi-openwebbeans
+----
+
+===== JBoss Weld CDI container
+
+Apache Karaf provides a ready to use feature for JBoss Weld.
+
+The `weld` feature automatically install the Pax CDI features and the JBoss Weld bundles:
+
+----
+karaf@root()> feature:install pax-cdi-weld
+----
[14/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/monitoring.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/monitoring.adoc b/manual/src/main/asciidoc/user-guide/monitoring.adoc
new file mode 100644
index 0000000..5f8f809
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/monitoring.adoc
@@ -0,0 +1,287 @@
+//
+// Licensed 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.
+//
+
+== Monitoring and Management using JMX
+
+Apache Karaf provides a complete JMX layer.
+
+You can remotely connect to a running Apache Karaf instance using any JMX client (like jconsole).
+
+The Apache Karaf features provide a set of MBeans, dedicating for the monitoring and management.
+
+=== Connecting
+
+Apache Karaf exposes a complete MBean server that you can use remotely.
+
+The default port number is 1099.
+
+The JMX URL to use by default is:
+
+----
+service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
+----
+
+If don't need the remote JMX at all, users can remove
+
+----
+-Dcom.sun.management.jmxremote
+----
+
+from bin/karaf|bin/karaf.bat to avoid opening the RMI listening port.
+
+You have to provide an username and password to access to the JMX layer.
+The JMX layer user the security framework, and so, by default, it uses the users defined in `etc/users.properties`.
+
+You can change the port numbers of the JMX layer in the `etc/org.apache.karaf.management.cfg` configuration file.
+
+=== Configuration
+
+The Apache Karaf JMX management layer is configured in the `etc/org.apache.karaf.management.cfg` configuration file:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# The properties in this file define the configuration of Apache Karaf's JMX Management
+#
+
+#
+# Port number for RMI registry connection
+#
+rmiRegistryPort = 1099
+
+#
+# Port number for RMI server connection
+#
+rmiServerPort = 44444
+
+#
+# Name of the JAAS realm used for authentication
+#
+jmxRealm = karaf
+
+#
+# The service URL for the JMXConnectorServer
+#
+serviceUrl = service:jmx:rmi://0.0.0.0:${rmiServerPort}/jndi/rmi://0.0.0.0:${rmiRegistryPort}/karaf-${karaf.name}
+
+#
+# Whether any threads started for the JMXConnectorServer should be started as daemon threads
+#
+daemon = true
+
+#
+# Whether the JMXConnectorServer should be started in a separate thread
+#
+threaded = true
+
+#
+# The ObjectName used to register the JMXConnectorServer
+#
+objectName = connector:name=rmi
+
+#
+# Role name used for JMX access authorization
+# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
+#
+# jmxRole=admin
+----
+
+* `rmiRegistryPort` property contains the port number of the JMX RMI registry. Default is `1099`.
+* `rmiServerPort` property contains the port number of the JMX RMI server. Default is `44444`.
+* `jmxRealm` is the security realm to use as authentication backend. By default it uses the `karaf` realm.
+
+=== MBeans
+
+Apache Karaf provides a bunch of MBeans.
+
+The MBeans object names have the same format:
+
+----
+org.apache.karaf:type=[feature],name=[instance]
+----
+
+Installing additional Apache Karaf features and external applications can provide new MBeans.
+
+The following MBeans list is non exhaustive:
+
+* `org.apache.karaf:type=bundle,name=*`: management of the OSGi bundles.
+* `org.apache.karaf:type=config,name=*`: management of the configurations.
+* `org.apache.karaf:type=diagnostic,name=*`: creation of dumps containing the current Apache Karaf activity (used for diagnostic).
+* `org.apache.karaf:type=feature,name=*`: management of the Apache Karaf features.
+* `org.apache.karaf:type=http,name=*`: management of the HTTP service (provided by the `http` feature).
+* `org.apache.karaf:type=instance,name=*`: management of the instances.
+* `org.apache.karaf:type=jdbc,name=*`: management of the JDBC service (provided by the `jdbc` feature).
+* `org.apache.karaf:type=jms,name=*`: management of the JMS service (provided by the `jms` feature).
+* `org.apache.karaf:type=jndi,name=*`: management of the JNDI service (provided by the `jndi` feature).
+* `org.apache.karaf:type=kar,name=*`: management of the KAR file.
+* `org.apache.karaf:type=log,name=*`: management of the log service.
+* `org.apache.karaf:type=obr,name=*`: management of the OBR service (provided by the `obr` feature).
+* `org.apache.karaf:type=package,name=*`: details about packages exported/imported.
+* `org.apache.karaf:type=service,name=*`: management of the OSGi services.
+* `org.apache.karaf:type=system,name=*`: management of the Apache Karaf container itself (halt, restart, etc).
+* `org.apache.karaf:type=web,name=*`: management of WebApplications (provided by the `war` feature).
+* `org.apache.karaf:type=wrapper,name=*`: management of the service wrapper (provided by the `wrapper` feature).
+
+=== RBAC
+
+Apache Karaf provides a complete Role-Based Access Control to the JMX MBeans and operations.
+
+Whenever a JMX operation is invoked, the roles of the user are checked against the required roles for this operation.
+
+The access lists are defined in configuration file in the `etc` folder.
+
+The relevant configuration is prefixed with `jmx.acl` and based on the JMX ObjectName that it applies to.
+
+For instance, specific configuration for a MBean with the object name `foo.bar:type=Test` can be placed in the
+`etc/jmx.acl.foo.bar.Test.cfg` configuration file.
+
+More generic configurations can be placed in the domain (e.g. jmx.acl.foo.bar.cfg) or at the top level (jmx.acl.cfg).
+
+A simple configuration file looks like:
+
+----
+ # operation = role
+ test = admin
+ getVal = manager, viewer
+----
+
+Apache Karaf looks for required roles using the following process
+.
+The most specific configuration file is tried first. It means that in the previous example, the `etc/jmx.acl.foo.bar.Test.cfg` is looked at first.
+In this configuration, Apache Karaf looks for a:
+
+. Specific match for the invocation, e.g. `test(int)["17"] = role1`
+
+. Regex match for the invocation, e.g. `test(int)[/[0-9]/] = role2`
+ In both cases, the passed argument is converted to a String for the comparison.
+ If any of the above match, the search stops and the associated roles are used.
+
+. Signature match for the invocation, e.g. `test(int) = role3`
+ If matched, the search stops and the associated roles are used.
+
+. Method name match for the invocation, e.g. `test = role4`
+ If matched, the search stops and the associated roles are used.
+
+. A method name wildcard match, e.g. `te* = role5`
+ For all the wildcard matches found in the current configuration file, the roles associated with the longest match are used.
+ So if you have te* and * and the method invoked is 'test', then the roles defined with te* are used, not the ones defined with *.
+
+If no matching definition is found, the most specific definition always takes the precedence.
+
+You can find some configuration examples:
+
+* Only a `manager` can call GC on the Memory MBean:
+
+----
+# etc/jmx.acl.java.lang.Memory.cfg
+ gc = manager
+----
+
+* Bundles with ID between 0 and 49 can be stopped only by an `admin`, other bundles can be stopped by a `manager`:
+
+----
+# etc/jmx.acl.org.apache.karaf.bundles.cfg
+ stop(java.lang.String)[/([1-4])?([0-9]/] = admin
+ stop = manager
+----
+
+The `etc/jmx.acl.cfg` configuration file contains the global configuration for the invocation on any MBean that
+doesn't have a specific configuration:
+
+----
+# etc/jmx.acl.cfg
+ list* = viewer
+ get* = viewer
+ is* = viewer
+ set* = admin
+ * = admin
+----
+
+By default, all "read-only" operations (`list*`, `get*`, `is*`) can be performed by a `viewer`, whereas the "read-write" operations can be performed only by an `admin`.
+
+The `org.apache.karaf:type=security,area=jmx` MBean can be used to check whether the current user can access a certain MBean or invoke a specific operation on it.
+This MBean can be used by management clients (monitoring tools, etc) to decide whether to show certain MBeans or operations to the end user.
+
+=== JMX-HTTP bridge with Jolokia
+
+It's not always easy to use a JMX client with the RMI protocol.
+
+Some monitoring tools (Nagios, Zabbix, ...) are not native JMX clients.
+
+But most of them can use HTTP.
+
+More over, you may want to write your own application/web application. In that case, HTTP and JSON can be very interesting and easy to remotely manage Apache Karaf.
+
+http://www.jolokia.org/[Jolokia] can be installed in Apache Karaf as a remote JMX-HTTP bridge.
+
+Karaf provides a jolokia feature, ready to install:
+
+----
+karaf@root()> feature:install jolokia
+----
+
+By default, Jolokia is listening on the port `8181` (see the link:webcontainer[WebContainer (JSP/Servlet)] page for details about the HTTP configuration).
+
+If you point a browser on http://localhost:8181/jolokia you will see a JSON output like:
+
+----
+{"timestamp":1421765829,"status":200,"request":{"type":"version"},"value":{"protocol":"7.2","config":{"useRestrictorService":"false","canonicalNaming":"true","includeStackTrace":"true","listenForHttpService":"true","historyMaxEntries":"10","agentId":"192.168.134.10-5922-6eb8d517-osgi","debug":"false","realm":"karaf","serializeException":"false","agentContext":"\/jolokia","agentType":"servlet","policyLocation":"classpath:\/jolokia-access.xml","user":"karaf","debugMaxEntries":"100","authMode":"jaas","mimeType":"text\/plain"},"agent":"1.2.4-SNAPSHOT","info":{"product":"felix","vendor":"Apache","version":"4.4.1"`}
+----
+
+You can manipulate the Apache Karaf JMX layer via HTTP and JSON, via system tools (like `curl`, `jmx4perl`, monitoring tools (supporting HTTP/JSON), or web applications.
+
+For instance, you can send a JSON request to get details about the current Apache Karaf heap memory usage.
+
+The format of the request is:
+
+----
+{
+ "type":"read",
+ "mbean":"java.lang:type=Memory",
+ "attribute":"HeapMemoryUsage",
+ "path":"used"
+}
+----
+
+We can send this JSON request using `curl` and get the result:
+
+----
+curl -u karaf -d "{\"type\":\"read\",\"mbean\":\"java.lang:type=Memory\",\"attribute\":\"HeapMemoryUsage\",\"path\":\"used\"}" http://localhost:8181/jolokia/ && echo ""
+Enter host password for user 'karaf':
+{"timestamp":1421765948,"status":200,"request":{"mbean":"java.lang:type=Memory","path":"used","attribute":"HeapMemoryUsage","type":"read"},"value":69121000}
+----
+
+You can find details on the http://www.jolokia.org[Jolokia website] and in the http://www.jolokia.org/reference/html/[documentation].
+
+=== Decanter
+
+Apache Karaf Decanter provides a complete monitoring solution including data history, turnkey dashboards, SLA and alerting support.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/obr.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/obr.adoc b/manual/src/main/asciidoc/user-guide/obr.adoc
new file mode 100644
index 0000000..c725a24
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/obr.adoc
@@ -0,0 +1,373 @@
+//
+// Licensed 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.
+//
+
+== OBR
+
+The goal of OBR (OSGi Bundle Repository) is:
+
+. to simplify deploying and using bundles
+. to encourage independent bundle development.
+
+OBR achieves the first goal by providing a service that can automatically install a bundle, with its deployment dependencies,
+from a bundle repository. This makes it easier for people to experiment with existing bundles.
+
+The second goal is achieved by raising the visibility of the available bundles in a repository.
+
+OBR is an optional Apache Karaf feature. You have to install the `obr` feature to use OBR service:
+
+----
+karaf@root()> feature:install obr
+----
+
+The OBR feature turns Apache Karaf as an OBR client. It means that Apache Karaf can use a OBR repository to the installation
+of the bundles, and during the installation of the features.
+
+The installation of the `obr` feature adds in Apache Karaf:
+
+* the OBR service
+* the features OBR resolver
+* the `obr:*` commands
+* the JMX ObrMBean
+
+The OBR repository contains all bundles. The OBR service knows all requirements and capabilities of each bundle on an
+OBR repository (it's the OBR metadata).
+
+Thanks to that, when you install ("deploy" in OBR wording) a bundle using the OBR service, it looks for all bundles
+providing the capabilities matching the bundle requirements.
+It will automatically install the bundles needed for the bundle.
+
+=== Features OBR resolver
+
+If the feature specifies `obr` in the `resolver` attribute, Apache Karaf can use the OBR service to construct the list
+of bundles to install with the features.
+
+The feature default resolver just consider the bundles described in the feature itself.
+
+Using the OBR resolver, Apache Karaf can extend the bundle list at the feature installation time using the OBR service.
+
+=== Commands
+
+==== `obr:url-add`
+
+The `obr:url-add` command registers the OBR repository at a given URL in the OBR service.
+
+Basically, an OBR repository is described by a `repository.xml` file.
+
+The `obr:url-add` command expects an `url` argument. The `url` argument is the URL to the OBR repository `repository.xml` file.
+Any URL described in the [Artifacts repositories and URLs section|urls] is supported.
+
+For instance:
+
+----
+karaf@root()> obr:url-add file:///user/.m2/repository/repository.xml
+----
+
+==== `obr:url-list`
+
+The `obr:url-list` command lists the OBR repository (with URL) registered in the OBR service:
+
+----
+karaf@root()> obr:url-list
+Index | OBR URL
+---------------------------------------------------------
+0 | file:/user/.m2/repository/repository.xml
+----
+
+==== `obr:url-refresh`
+
+The `obr:url-refresh` command refresh an OBR repository (reloading the URL).
+
+The OBR service doesn't take "on the fly" the changes performed on an OBR repository `repository.xml`. You have to
+reload the `repository.xml` URL to take the changes. It's the purpose of the `obr:url-refresh` command.
+
+Without argument, the `obr:url-refresh` command refreshes all repositories:
+
+----
+karaf@root()> obr:url-refresh
+----
+
+You can refresh only one repository by specifying the URL as argument:
+
+----
+karaf@root()> obr:url-refresh file:/user/.m2/repository/repository.xml
+----
+
+Instead of using the URL, you can use the repository index as displayed by the `obr:url-list` command.
+To do so, you have to use the `-i` option:
+
+----
+karaf@root()> obr:url-refresh -i 0
+----
+
+==== `obr:url-remove`
+
+The `obr:url-remove` command removes an OBR repository from the OBR service.
+
+The `obr:url-remove` command expects the repository URL as argument:
+
+----
+karaf@root()> obr:url-remove file:/user/.m2/repository/repository.xml
+----
+
+Instead of using the URL, you can use the repository index as displayed by the `obr:url-list` command.
+To do so, you have to use the `-i` option:
+
+----
+karaf@root()> obr:url-remove -i 0
+----
+
+==== `obr:list`
+
+The `obr:list` command lists all bundles available on the registered OBR repositories:
+
+----
+karaf@root()> obr:list|more
+Name | Symbolic Name | Version
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+activemq-blueprint | org.apache.activemq.activemq-blueprint | 5.12.0.SNAPSHOT
+activemq-camel | org.apache.activemq.activemq-camel | 5.12.0.SNAPSHOT
+activemq-karaf | activemq-karaf | 5.12.0.SNAPSHOT
+activemq-osgi | org.apache.activemq.activemq-osgi | 5.12.0.SNAPSHOT
+Apache Aries Application API | org.apache.aries.application.api | 1.0.1.SNAPSHOT
+...
+----
+
+==== `obr:info`
+
+The `obr:info` command displays the details about bundles available on the OBR service. Especially, it provides details about
+capabilities and requirements of bundles.
+
+The `obr:info` command expects a bundle symbolic name as argument:
+
+----
+karaf@root()> obr:info org.apache.karaf.wrapper.core
+-------------------------------
+Apache Karaf :: Wrapper :: Core
+-------------------------------
+id: org.apache.karaf.wrapper.core/4.0.0
+description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
+documentation: http://www.apache.org/
+symbolicname: org.apache.karaf.wrapper.core
+presentationname: Apache Karaf :: Wrapper :: Core
+license: http://www.apache.org/licenses/LICENSE-2.0.txt
+uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/4.0.0/org.apache.karaf.wrapper.core-4.0.0.jar
+size: 1281352
+version: 4.0.0
+Requires:
+ service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
+ package:(&(package=javax.management))
+ package:(&(package=org.apache.karaf.wrapper))
+ package:(&(package=org.apache.karaf.wrapper.management))
+ package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
+ package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
+Capabilities:
+ bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=4.0.0}
+ service:{service=org.apache.karaf.wrapper.WrapperService}
+ package:{package=org.apache.karaf.wrapper, version=4.0.0}
+ package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=4.0.0}
+----
+
+The `obr:info` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
+It means that you have to use the following command to see the info about the wrapper core bundle with version 4.0.0:
+
+----
+karaf@root()> obr:info org.apache.karaf.wrapper.core,4.0.0
+...
+----
+
+You can specific multiple bundles separated by space:
+
+----
+karaf@root()> obr:info org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
+...
+----
+
+==== `obr:source`
+
+In addition of the bundles executable, the OBR service can also store the bundles sources.
+
+The `obr:source` command check the source URL in the OBR metadata for a given bundle, and download the sources on a target folder:
+
+----
+karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core
+----
+
+The `obr:source` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
+It means that you have to use the following command to download the source of wrapper core bundle with version 4.0.0:
+
+----
+karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,4.0.0
+----
+
+You can specify multiple bundles separated by space:
+
+----
+karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
+...
+----
+
+==== `obr:resolve`
+
+The `obr:resolve` command displays the resolution output for a given set of requirements. Actually, it show the bundles providing
+the capabilities to match the requirements. It's what the OBR service does when executing `obr:deploy`.
+
+Optionally, the `obr:resolve` command can deploy the bundles as the `obr:deploy` command does.
+
+For instance, to know the OBR bundle resolving the `org.apache.karaf.wrapper` package requirement, you can do:
+
+----
+karaf@root()> obr:resolve package=org.apache.karaf.wrapper
+Required resource(s):
+---------------------
+ Apache Karaf :: Wrapper :: Core (4.0.0)
+----
+
+==== `obr:find`
+
+The `obr:find` command is similar to the `obr:resolve` one. It displays the bundles resolving the provided requirements, with details.
+
+For instance, to find the OBR bundle providing the `org.apache.karaf.wrapper` package, you can do:
+
+----
+karaf@root()> obr:find package=org.apache.karaf.wrapper
+-------------------------------
+Apache Karaf :: Wrapper :: Core
+-------------------------------
+id: org.apache.karaf.wrapper.core/4.0.0
+description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
+documentation: http://www.apache.org/
+symbolicname: org.apache.karaf.wrapper.core
+presentationname: Apache Karaf :: Wrapper :: Core
+license: http://www.apache.org/licenses/LICENSE-2.0.txt
+uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/4.0.0/org.apache.karaf.wrapper.core-4.0.0.jar
+size: 1281352
+version: 4.0.0
+Requirements:
+ service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
+ package:(&(package=javax.management))
+ package:(&(package=org.apache.karaf.wrapper))
+ package:(&(package=org.apache.karaf.wrapper.management))
+ package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
+ package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
+ package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
+Capabilities:
+ bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=4.0.0}
+ service:{service=org.apache.karaf.wrapper.WrapperService}
+ package:{package=org.apache.karaf.wrapper, version=4.0.0}
+ package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=4.0.0}
+----
+
+==== `obr:deploy`
+
+The `obr:deploy` command installs a bundle from the OBR repository, including all bundles required to satisfy the bundle requirements.
+
+----
+karaf@root()> obr:deploy org.ops4j.pax.web.samples.helloworld-hs
+Target resource(s):
+-------------------
+ OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
+
+Required resource(s):
+---------------------
+ Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
+ OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
+
+Deploying...done.
+----
+
+By default, the bundles are just installed, not started. You can use the `-s` option to start the bundles.
+
+The `obr:deploy` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
+It means that you have to use the following command to deploy the wrapper core bundle with version 4.0.0:
+
+----
+karaf@root()> obr:deploy org.apache.karaf.wrapper.core,4.0.0
+----
+
+You can specify multiple bundles separated by space:
+
+----
+karaf@root()> obr:deploy org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
+...
+----
+
+=== `obr:start`
+
+The `obr:start` command does the same as `obr:deploy -s` command. It installs the bundle (and all required bundles to
+satisfy the requirements) and starts all installed bundles.
+
+----
+karaf@root()> obr:start org.ops4j.pax.web.samples.helloworld-hs
+Target resource(s):
+-------------------
+ OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
+
+Required resource(s):
+---------------------
+ Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
+ OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
+
+Deploying...done.
+----
+
+The `obr:start` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
+It means that you have to use the following command to deploy and start the wrapper core bundle with version 4.0.0:
+
+----
+karaf@root()> obr:start org.apache.karaf.wrapper.core,4.0.0
+----
+
+You can specify multiple bundles separated by space:
+
+----
+karaf@root()> obr:start org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
+...
+----
+
+=== JMX ObrMBean
+
+On the JMX layer, Apache Karaf provides a MBean dedicated to the management of the OBR service: the ObrMBean.
+
+The ObjectName to use is `org.apache.karaf:type=obr,name=*`.
+
+==== Attributes
+
+The `Urls` attribute provides the list of registered OBR repositories URLs.
+
+The `Bundles` attribute provides a tabular data containing all bundles available on the registered OBR repositories.
+
+==== Operations
+
+* `addUrl(url)` registers the OBR repository using the `url` to the `repository.xml`.
+* `removeUrl(url)` removes the OBR repository at the given `url`.
+* `refreshUrl(url)` refreshes the OBR repository at the given `url`.
+* `deployBundle(name)` deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service. The bundles are not automatically started.
+* `deployBundle(name, start, deployOptional)` deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service.
+ If `start` is `true`, the bundles are automatically started. If `deployOptional` is `true`, even the optional requirements will be resolved
+ by the OBR service (meaning installing more bundles to satisfy the optional requirements).
+
+The name to identify a bundle uses the following syntax: `symbolic_name,version` where version is optional.
+
+=== Apache Karaf Cave
+
+In addition of being an OBR client, Apache Karaf can act as an OBR repositories server, thanks to Apache Karaf Cave.
+
+See the http://karaf.apache.org/index/subprojects/cave.html for details.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/provisioning.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/provisioning.adoc b/manual/src/main/asciidoc/user-guide/provisioning.adoc
new file mode 100644
index 0000000..aef345b
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/provisioning.adoc
@@ -0,0 +1,685 @@
+//
+// Licensed 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.
+//
+
+== Provisioning
+
+Apache Karaf supports the provisioning of applications and modules using the concept of Karaf Features.
+
+=== Application
+
+By provisioning application, it means install all modules, configuration, and transitive applications.
+
+=== OSGi
+
+It natively supports the deployment of OSGi applications.
+
+An OSGi application is a set of OSGi bundles. An OSGi bundles is a regular jar file, with additional metadata in the jar MANIFEST.
+
+In OSGi, a bundle can depend to other bundles. So, it means that to deploy an OSGi application, most of the time, you have
+to firstly deploy a lot of other bundles required by the application.
+
+So, you have to find these bundles first, install the bundles. Again, these "dependency" bundles may require other bundles
+to satisfy their own dependencies.
+
+More over, typically, an application requires configuration (see the [Configuration section|configuration] of the user guide).
+So, before being able to start your application, in addition of the dependency bundles, you have to create or deploy the
+configuration.
+
+As we can see, the provisioning of an application can be very long and fastidious.
+
+=== Feature and resolver
+
+Apache Karaf provides a simple and flexible way to provision applications.
+
+In Apache Karaf, the application provisioning is an Apache Karaf "feature".
+
+A feature describes an application as:
+
+* a name
+* a version
+* a optional description (eventually with a long description)
+* a set of bundles
+* optionally a set configurations or configuration files
+* optionally a set of dependency features
+
+When you install a feature, Apache Karaf installs all resources described in the feature. It means that it will
+automatically resolves and installs all bundles, configurations, and dependency features described in the feature.
+
+The feature resolver checks the service requirements, and install the bundles providing the services matching the requirements.
+The default mode enables this behavior only for "new style" features repositories (basically, the features repositories XML with
+schema equal or greater to 1.3.0). It doesn't apply for "old style" features repositories (coming from Karaf 2 or 3).
+
+You can change the service requirements enforcement mode in `etc/org.apache.karaf.features.cfg` file, using the `serviceRequirements` property.
+
+----
+serviceRequirements=default
+----
+
+The possible values are:
+
+* disable: service requirements are completely ignored, for both "old style" and "new style" features repositories
+* default: service requirements are ignored for "old style" features repositories, and enabled for "new style" features repositories.
+* enforce: service requirements are always verified, for "old style" and "new style" features repositories.
+
+Additionally, a feature can also define requirements. In that case, Karaf can automatically additional bundles or features
+providing the capabilities to satisfy the requirements.
+
+A feature has a complete lifecycle: install, start, stop, update, uninstall.
+
+=== Features repositories
+
+The features are described in a features XML descriptor. This XML file contains the description of a set of features.
+
+A features XML descriptor is named a "features repository". Before being able to install a feature, you have to register
+the features repository that provides the feature (using `feature:repo-add` command or FeatureMBean as described later).
+
+For instance, the following XML file (or "features repository") describes the `feature1` and `feature2` features:
+
+----
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
+ <feature name="feature1" version="1.0.0">
+ <bundle>...</bundle>
+ <bundle>...</bundle>
+ </feature>
+ <feature name="feature2" version="1.1.0">
+ <feature>feature1</feature>
+ <bundle>...</bundle>
+ </feature>
+</features>
+----
+
+We can note that the features XML has a schema. Take a look on [Features XML Schema section|provisioning-schema] of the user guide
+for details.
+The `feature1` feature is available in version `1.0.0`, and contains two bundles. The `<bundle/>` element contains a URL
+to the bundle artifact (see [Artifacts repositories and URLs section|urls] for details). If you install the `feature1` feature
+(using `feature:install` or the FeatureMBean as described later), Apache Karaf will automatically installs the two bundles
+described.
+The `feature2` feature is available in version `1.1.0`, and contains a reference to the `feature1` feature and a bundle.
+The `<feature/>` element contains the name of a feature. A specific feature version can be defined using the `version`
+attribute to the `<feature/>` element (`<feature version="1.0.0">feature1</feature>`). If the `version` attribute is
+not specified, Apache Karaf will install the latest version available. If you install the `feature2` feature (using `feature:install`
+or the FeatureMBean as described later), Apache Karaf will automatically installs `feature1` (if it's not already installed)
+and the bundle.
+
+A feature repository is registered using the URL to the features XML file.
+
+The features state is stored in the Apache Karaf cache (in the `KARAF_DATA` folder). You can restart Apache Karaf, the
+previously installed features remain installed and available after restart.
+If you do a clean restart or you delete the Apache Karaf cache (delete the `KARAF_DATA` folder), all previously features
+repositories registered and features installed will be lost: you will have to register the features repositories and install
+features by hand again.
+To prevent this behaviour, you can specify features as boot features.
+
+=== Boot features
+
+You can describe some features as boot features. A boot feature will be automatically install by Apache Karaf, even if it has
+not been previously installed using `feature:install` or FeatureMBean.
+
+Apache Karaf features configuration is located in the `etc/org.apache.karaf.features.cfg` configuration file.
+
+This configuration file contains the two properties to use to define boot features:
+
+* `featuresRepositories` contains a list (coma separated) of features repositories (features XML) URLs.
+* `featuresBoot` contains a list (come separated) of features to install at boot.
+
+=== Features upgrade
+
+You can update a release by installing the same feature (with the same SNAPSHOT version or a different version).
+
+Thanks to the features lifecycle, you can control the status of the feature (started, stopped, etc).
+
+You can also use a simulation to see what the update will do.
+
+=== Feature bundles
+
+==== Start Level
+
+By default, the bundles deployed by a feature will have a start-level equals to the value defined in the `etc/config.properties`
+configuration file, in the `karaf.startlevel.bundle` property.
+
+This value can be "overrided" by the `start-level` attribute of the `<bundle/>` element, in the features XML.
+
+----
+ <feature name="my-project" version="1.0.0">
+ <bundle start-level="80">mvn:com.mycompany.myproject/myproject-dao</bundle>
+ <bundle start-level="85">mvn:com.mycompany.myproject/myproject-service</bundle>
+ </feature>
+----
+
+The start-level attribute insure that the `myproject-dao` bundle is started before the bundles that use it.
+
+Instead of using start-level, a better solution is to simply let the OSGi framework know what your dependencies are by
+defining the packages or services you need. It is more robust than setting start levels.
+
+==== Simulate, Start and stop
+
+You can simulate the installation of a feature using the `-t` option to `feature:install` command.
+
+You can install a bundle without starting it. By default, the bundles in a feature are automatically started.
+
+A feature can specify that a bundle should not be started automatically (the bundle stays in resolved state).
+To do so, a feature can specify the `start` attribute to false in the `<bundle/>` element:
+
+----
+ <feature name="my-project" version="1.0.0">
+ <bundle start-level="80" start="false">mvn:com.mycompany.myproject/myproject-dao</bundle>
+ <bundle start-level="85" start="false">mvn:com.mycompany.myproject/myproject-service</bundle>
+ </feature>
+----
+
+==== Dependency
+
+A bundle can be flagged as being a dependency, using the `dependency` attribute set to true on the `<bundle/>` element.
+
+This information can be used by resolvers to compute the full list of bundles to be installed.
+
+=== Dependent features
+
+A feature can depend to a set of other features:
+
+----
+ <feature name="my-project" version="1.0.0">
+ <feature>other</feature>
+ <bundle start-level="80" start="false">mvn:com.mycompany.myproject/myproject-dao</bundle>
+ <bundle start-level="85" start="false">mvn:com.mycompany.myproject/myproject-service</bundle>
+ </feature>
+----
+
+When the `my-project` feature will be installed, the `other` feature will be automatically installed as well.
+
+It's possible to define a version range for a dependent feature:
+
+----
+<feature name="spring-dm">
+ <feature version="[2.5.6,4)">spring</feature>
+ ...
+</feature>
+----
+
+The feature with the highest version available in the range will be installed.
+
+If a single version is specified, this version will be chosen.
+
+If nothing is specified, the highest available will be installed.
+
+=== Feature configurations
+
+The `<config/>` element in a feature XML allows a feature to create and/or populate a configuration (identified by a configuration PID).
+
+----
+<config name="com.foo.bar">
+ myProperty = myValue
+</config>
+----
+
+The `name` attribute of the `<config/>` element corresponds to the configuration PID (see the [Configuration section|configuration] for details).
+
+The installation of the feature will have the same effect as dropping a file named `com.foo.bar.cfg` in the `etc` folder.
+
+The content of the `<config/>` element is a set of properties, following the key=value standard.
+
+=== Feature configuration files
+
+Instead of using the `<config/>` element, a feature can specify `<configfile/>` elements.
+
+----
+<configfile finalname="/etc/myfile.cfg" override="false">URL</configfile>
+----
+
+Instead of directly manipulating the Apache Karaf configuration layer (as when using the `<config/>` element), the
+`<configfile/>` element takes directly a file specified by a URL, and copy the file in the location specified by the
+`finalname` attribute.
+
+If not specified, the location is relative from the `KARAF_BASE` variable. It's also possible to use variable like
+${karaf.home}, ${karaf.base}, ${karaf.etc}, or even system properties.
+
+For instance:
+
+----
+<configfile finalname="${karaf.etc}/myfile.cfg" override="false">URL</configfile>
+----
+
+If the file is already present at the desired location it is kept and the deployment of the configuration file is skipped,
+as a already existing file might contain customization. This behaviour can be overriden by `override` set to true.
+
+The file URL is any URL supported by Apache Karaf (see the [Artifacts repositories and URLs|urls] of the user guide for details).
+
+==== Requirements
+
+A feature can also specify expected requirements. The feature resolver will try to satisfy the requirements. For that, it checks
+the features and bundles capabilities and will automatically install the bundles to satisfy the requirements.
+
+For instance, a feature can contain:
+
+----
+<requirement>osgi.ee;filter:="(&(osgi.ee=JavaSE)(!(version>=1.8)))"</requirement>
+----
+
+The requirement specifies that the feature will work by only if the JDK version is not 1.8 (so basically 1.7).
+
+The features resolver is also able to refresh the bundles when an optional dependency is satisfy, rewiring the optional import.
+
+=== Commands
+
+==== `feature:repo-list`
+
+The `feature:repo-list` command lists all registered features repository:
+
+----
+karaf@root()> feature:repo-list
+Repository | URL
+--------------------------------------------------------------------------------------
+org.ops4j.pax.cdi-0.12.0 | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
+org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
+standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
+spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
+----
+
+Each repository has a name and the URL to the features XML.
+
+Apache Karaf parses the features XML when you register the features repository URL (using `feature:repo-add` command
+or the FeatureMBean as described later). If you want to force Apache Karaf to reload the features repository URL (and
+so update the features definition), you can use the `-r` option:
+
+----
+karaf@root()> feature:repo-list -r
+Reloading all repositories from their urls
+
+Repository | URL
+--------------------------------------------------------------------------------------
+org.ops4j.pax.cdi-0.12.0 | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
+org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
+standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
+spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
+----
+
+==== `feature:repo-add`
+
+To register a features repository (and so having new features available in Apache Karaf), you have to use the
+`feature:repo-add` command.
+
+The `feature:repo-add` command requires the `name/url` argument. This argument accepts:
+
+* a feature repository URL. It's an URL directly to the features XML file. Any URL described in the [Artifacts repositories and URLs section|urls]
+ of the user guide is supported.
+* a feature repository name defined in the `etc/org.apache.karaf.features.repos.cfg` configuration file.
+
+The `etc/org.apache.karaf.features.repos.cfg` defines a list of "pre-installed/available" features repositories:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# This file describes the features repository URL
+# It could be directly installed using feature:repo-add command
+#
+enterprise=mvn:org.apache.karaf.features/enterprise/LATEST/xml/features
+spring=mvn:org.apache.karaf.features/spring/LATEST/xml/features
+cellar=mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
+cave=mvn:org.apache.karaf.cave/apache-karaf-cave/LATEST/xml/features
+camel=mvn:org.apache.camel.karaf/apache-camel/LATEST/xml/features
+camel-extras=mvn:org.apache-extras.camel-extra.karaf/camel-extra/LATEST/xml/features
+cxf=mvn:org.apache.cxf.karaf/apache-cxf/LATEST/xml/features
+cxf-dosgi=mvn:org.apache.cxf.dosgi/cxf-dosgi/LATEST/xml/features
+cxf-xkms=mvn:org.apache.cxf.services.xkms/cxf-services-xkms-features/LATEST/xml
+activemq=mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
+jclouds=mvn:org.apache.jclouds.karaf/jclouds-karaf/LATEST/xml/features
+openejb=mvn:org.apache.openejb/openejb-feature/LATEST/xml/features
+wicket=mvn:org.ops4j.pax.wicket/features/LATEST/xml/features
+hawtio=mvn:io.hawt/hawtio-karaf/LATEST/xml/features
+pax-cdi=mvn:org.ops4j.pax.cdi/pax-cdi-features/LATEST/xml/features
+pax-jdbc=mvn:org.ops4j.pax.jdbc/pax-jdbc-features/LATEST/xml/features
+pax-jpa=mvn:org.ops4j.pax.jpa/pax-jpa-features/LATEST/xml/features
+pax-web=mvn:org.ops4j.pax.web/pax-web-features/LATEST/xml/features
+pax-wicket=mvn:org.ops4j.pax.wicket/pax-wicket-features/LATEST/xml/features
+ecf=http://download.eclipse.org/rt/ecf/latest/site.p2/karaf-features.xml
+decanter=mvn:org.apache.karaf.decanter/apache-karaf-decanter/LATEST/xml/features
+----
+
+You can directly provide a features repository name to the `feature:repo-add` command. For install, to install Apache Karaf Cellar, you can do:
+
+----
+karaf@root()> feature:repo-add cellar
+Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
+----
+
+When you don't provide the optional `version` argument, Apache Karaf installs the latest version of the features repository available.
+You can specify a target version with the `version` argument:
+
+----
+karaf@root()> feature:repo-add cellar 4.0.0.RC1
+Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
+----
+
+Instead of providing a features repository name defined in the `etc/org.apache.karaf.features.repos.cfg` configuration file,
+you can directly provide the features repository URL to the `feature:repo-add` command:
+
+----
+karaf@root()> feature:repo-add mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
+Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
+----
+
+By default, the `feature:repo-add` command just registers the features repository, it doesn't install any feature.
+If you specify the `-i` option, the `feature:repo-add` command registers the features repository and installs all
+features described in this features repository:
+
+----
+karaf@root()> feature:repo-add -i cellar
+----
+
+==== `feature:repo-refresh`
+
+Apache Karaf parses the features repository XML when you register it (using `feature:repo-add` command or the FeatureMBean).
+If the features repository XML changes, you have to indicate to Apache Karaf to refresh the features repository to load the changes.
+
+The `feature:repo-refresh` command refreshes the features repository.
+
+Without argument, the command refreshes all features repository:
+
+----
+karaf@root()> feature:repo-refresh
+Refreshing feature url mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
+Refreshing feature url mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
+Refreshing feature url mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+Refreshing feature url mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
+Refreshing feature url mvn:org.apache.karaf.features/spring/4.0.0/xml/features
+----
+
+Instead of refreshing all features repositories, you can specify the features repository to refresh, by providing the URL
+or the features repository name (and optionally version):
+
+----
+karaf@root()> feature:repo-refresh mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+Refreshing feature url mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+----
+
+----
+karaf@root()> feature:repo-refresh cellar
+Refreshing feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
+----
+
+==== `feature:repo-remove`
+
+The `feature:repo-remove` command removes a features repository from the registered ones.
+
+The `feature:repo-remove` command requires a argument:
+
+* the features repository name (as displayed in the repository column of the `feature:repo-list` command output)
+* the features repository URL (as displayed in the URL column of the `feature:repo-list` command output)
+
+----
+karaf@root()> feature:repo-remove karaf-cellar-4.0.0.RC1
+----
+
+----
+karaf@root()> feature:repo-remove mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
+----
+
+By default, the `feature:repo-remove` command just removes the features repository from the registered ones: it doesn't
+uninstall the features provided by the features repository.
+
+If you use `-u` option, the `feature:repo-remove` command uninstalls all features described by the features repository:
+
+----
+karaf@root()> feature:repo-remove -u karaf-cellar-4.0.0.RC1
+----
+
+==== `feature:list`
+
+The `feature:list` command lists all available features (provided by the different registered features repositories):
+
+----
+Name | Version | Required | State | Repository | Description
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
+pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
+pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
+pax-cdi-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI support
+pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
+pax-cdi-1.2-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.2 support
+pax-cdi-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans CDI support
+pax-cdi-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI support
+pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
+...
+----
+
+If you want to order the features by alphabetical name, you can use the `-o` option:
+
+----
+karaf@root()> feature:list -o
+Name | Version | Required | State | Repository | Description
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+deltaspike-core | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike core support
+deltaspike-data | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike data support
+deltaspike-jpa | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike jpa support
+deltaspike-partial-bean | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike partial bean support
+pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
+pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
+pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
+pax-cdi-1.1-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.1 support
+pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
+pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
+...
+----
+
+By default, the `feature:list` command displays all features, whatever their current state (installed or not installed).
+
+Using the `-i` option displays only installed features:
+
+----
+karaf@root()> feature:list -i
+Name | Version | Required | State | Repository | Description
+-------------------------------------------------------------------------------------------------------------------
+aries-proxy | 4.0.0 | | Started | standard-4.0.0 | Aries Proxy
+aries-blueprint | 4.0.0 | x | Started | standard-4.0.0 | Aries Blueprint
+feature | 4.0.0 | x | Started | standard-4.0.0 | Features Support
+shell | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell
+shell-compat | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell Compatibility
+deployer | 4.0.0 | x | Started | standard-4.0.0 | Karaf Deployer
+bundle | 4.0.0 | x | Started | standard-4.0.0 | Provide Bundle support
+config | 4.0.0 | x | Started | standard-4.0.0 | Provide OSGi ConfigAdmin support
+diagnostic | 4.0.0 | x | Started | standard-4.0.0 | Provide Diagnostic support
+instance | 4.0.0 | x | Started | standard-4.0.0 | Provide Instance support
+jaas | 4.0.0 | x | Started | standard-4.0.0 | Provide JAAS support
+log | 4.0.0 | x | Started | standard-4.0.0 | Provide Log support
+package | 4.0.0 | x | Started | standard-4.0.0 | Package commands and mbeans
+service | 4.0.0 | x | Started | standard-4.0.0 | Provide Service support
+system | 4.0.0 | x | Started | standard-4.0.0 | Provide System support
+kar | 4.0.0 | x | Started | standard-4.0.0 | Provide KAR (KARaf archive) support
+ssh | 4.0.0 | x | Started | standard-4.0.0 | Provide a SSHd server on Karaf
+management | 4.0.0 | x | Started | standard-4.0.0 | Provide a JMX MBeanServer and a set of MBeans in
+wrap | 0.0.0 | x | Started | standard-4.0.0 | Wrap URL handler
+----
+
+==== `feature:install`
+
+The `feature:install` command installs a feature.
+
+It requires the `feature` argument. The `feature` argument is the name of the feature, or the name/version of the feature.
+If only the name of the feature is provided (not the version), the latest version available will be installed.
+
+----
+karaf@root()> feature:install eventadmin
+----
+
+We can simulate an installation using `-t` or `--simulate` option: it just displays what it would do, but it doesn't do it:
+
+----
+karaf@root()> feature:install -t -v eventadmin
+Adding features: eventadmin/[4.0.0,4.0.0]
+No deployment change.
+ Managing bundle:
+ org.apache.felix.metatype / 1.0.12
+----
+
+You can specify a feature version to install:
+
+----
+karaf@root()> feature:install eventadmin/4.0.0
+----
+
+By default, the `feature:install` command is not verbose. If you want to have some details about actions performed by the `feature:install`
+command, you can use the `-v` option:
+
+----
+karaf@root()> feature:install -v eventadmin
+Adding features: eventadmin/[4.0.0,4.0.0]
+No deployment change.
+Done.
+----
+
+If a feature contains a bundle which is already installed, by default, Apache Karaf will refresh this bundle.
+Sometime, this refresh can cause issue to other running applications. If you want to disable the auto-refresh of installed
+bundles, you can use the `-r` option:
+
+----
+karaf@root()> feature:install -v -r eventadmin
+Adding features: eventadmin/[4.0.0,4.0.0]
+No deployment change.
+Done.
+----
+
+You can decide to not start the bundles installed by a feature using the `-s` or `--no-auto-start` option:
+
+----
+karaf@root()> feature:install -s eventadmin
+----
+
+==== `feature:start`
+
+By default, when you install a feature, it's automatically installed. However, you can specify the `-s` option to the `feature:install` command.
+
+As soon as you install a feature (started or not), all packages provided by the bundles defined in the feature will be available, and can be used for
+the wiring in other bundles.
+
+When starting a feature, all bundles are started, and so, the feature also exposes the services.
+
+==== `feature:stop`
+
+You can also stop a feature: it means that all services provided by the feature will be stop and removed from the service registry. However, the packages
+are still available for the wiring (the bundles are in resolved state).
+
+==== `feature:uninstall`
+
+The `feature:uninstall` command uninstalls a feature. As the `feature:install` command, the `feature:uninstall` command
+requires the `feature` argument. The `feature` argument is the name of the feature, or the name/version of the feature.
+If only the name of the feature is provided (not the version), the latest version available will be installed.
+
+----
+karaf@root()> feature:uninstall eventadmin
+----
+
+The features resolver is involved during feature uninstallation: transitive features installed by the uninstalled feature can be uninstalled
+themselves if not used by other feature.
+
+=== Deployer
+
+You can "hot deploy" a features XML by dropping the file directly in the `deploy` folder.
+
+Apache Karaf provides a features deployer.
+
+When you drop a features XML in the deploy folder, the features deployer does:
+* register the features XML as a features repository
+* the features with `install` attribute set to "auto" will be automatically installed by the features deployer.
+
+For instance, dropping the following XML in the deploy folder will automatically install feature1 and feature2, whereas
+feature3 won't be installed:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<features name="my-features" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
+
+ <feature name="feature1" version="1.0" install="auto">
+ ...
+ </feature>
+
+ <feature name="feature2" version="1.0" install="auto">
+ ...
+ </feature>
+
+ <feature name="feature3" version="1.0">
+ ...
+ </feature>
+
+</features>
+----
+
+=== JMX FeatureMBean
+
+On the JMX layer, you have a MBean dedicated to the management of the features and features repositories: the FeatureMBean.
+
+The FeatureMBean object name is: `org.apache.karaf:type=feature,name=*`.
+
+==== Attributes
+
+The FeatureMBean provides two attributes:
+
+* `Features` is a tabular data set of all features available.
+* `Repositories` is a tabular data set of all registered features repositories.
+
+The `Repositories` attribute provides the following information:
+
+* `Name` is the name of the features repository.
+* `Uri` is the URI to the features XML for this repository.
+* `Features` is a tabular data set of all features (name and version) provided by this features repository.
+* `Repositories` is a tabular data set of features repositories "imported" in this features repository.
+
+The `Features` attribute provides the following information:
+
+* `Name` is the name of the feature.
+* `Version` is the version of the feature.
+* `Installed` is a boolean. If true, it means that the feature is currently installed.
+* `Bundles` is a tabular data set of all bundles (bundles URL) described in the feature.
+* `Configurations` is a tabular data set of all configurations described in the feature.
+* `Configuration Files` is a tabular data set of all configuration files described in the feature.
+* `Dependencies` is a tabular data set of all dependent features described in the feature.
+
+==== Operations
+
+* `addRepository(url)` adds the features repository with the `url`. The `url` can be a `name` as in the `feature:repo-add` command.
+* `addRepository(url, install)` adds the features repository with the `url` and automatically installs all bundles if `install` is true. The `url` can be a `name` like in the `feature:repo-add` command.
+* `removeRepository(url)` removes the features repository with the `url`. The `url` can be a `name` as in the `feature:repo-remove` command.
+* `installFeature(name)` installs the feature with the `name`.
+* `installFeature(name, version)` installs the feature with the `name` and `version`.
+* `installFeature(name, noClean, noRefresh)` installs the feature with the `name` without cleaning the bundles in case of failure, and without refreshing already installed bundles.
+* `installFeature(name, version, noClean, noRefresh) ` installs the feature with the `name` and `version` without cleaning the bundles in case of failure, and without refreshing already installed bundles.
+* `uninstallFeature(name)` uninstalls the feature with the `name`.
+* `uninstallFeature(name, version)` uninstalls the feature with the `name` and `version`.
+
+==== Notifications
+
+The FeatureMBean sends two kind of notifications (on which you can subscribe and react):
+
+* When a feature repository changes (added or removed).
+* When a feature changes (installed or uninstalled).
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/remote.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/remote.adoc b/manual/src/main/asciidoc/user-guide/remote.adoc
new file mode 100644
index 0000000..35d551e
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/remote.adoc
@@ -0,0 +1,424 @@
+//
+// Licensed 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.
+//
+
+== Remote
+
+Apache Karaf supports a complete remote mechanism allowing you to remotely connect to a running Apache Karaf instance.
+More over, you can also browse, download, and upload files remotely to a running Apache Karaf instance.
+
+Apache Karaf embeds a complete SSHd server.
+
+=== SSHd server
+
+When you start Apache Karaf, it enables a remote console that can be accessed over SSH.
+
+This remote console provides all the features of the "local" console, and gives a remote user complete control over the
+container and services running inside of it. As the "local" console, the remote console is secured by a RBAC mechanism
+(see the link:security[Security section] of the user guide for details).
+
+In addition of the remote console, Apache Karaf also provides a remote filesystem. This remote filesystem can be accessed
+using a SCP/SFTP client.
+
+==== Configuration
+
+The configuration of the SSHd server is stored in the `etc/org.apache.karaf.shell.cfg` file:
+
+----
+################################################################################
+#
+# 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
+
+#
+# Role name used for SSH access authorization
+# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
+#
+# sshRole = admin
+
+#
+# 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
+----
+
+The `etc/org.apache.karaf.shell.cfg` configuration file contains different properties to configure the SSHd server:
+
+* `sshPort` is the port number where the SSHd server is bound (by default, it's 8101).
+* `sshHost` is the address of the network interface where the SSHd server is bound. The default value is 0.0.0.0,
+ meaning that the SSHd server is bound on all network interfaces. You can bind on a target interface providing the IP
+ address of the network interface.
+* `hostKey` is the location of the `host.key` file. By defaut, it uses `etc/host.key`. This file stores the public
+ and private key pair of the SSHd server.
+* `sshRole` is the default role used for SSH access. The default value is the value of `karaf.admin.role` property
+ defined in `etc/system.properties`. See the [Security section|security] of this user guide for details.
+* `keySize` is the key size used by the SSHd server. The possible values are 1024, 2048, 3072, or 4096. The default
+ value is 1024.
+* `algorithm` is the host key algorithm used by the SSHd server. The possible values are DSA or RSA. The default
+ value is DSA.
+
+The SSHd server configuration can be changed at runtime:
+
+* by editing the `etc/org.apache.karaf.shell.cfg` configuration file
+* by using the `config:*` commands
+
+At runtime, when you change the SSHd server configuration, you have to restart the SSHd server to load the changes.
+You can do it with:
+
+----
+karaf@root()> bundle:restart -f org.apache.karaf.shell.ssh
+----
+
+The Apache Karaf SSHd server supports key/agent authentication and password authentication.
+
+==== Console clients
+
+===== System native clients
+
+The Apache Karaf SSHd server is a pure SSHd server, similar to OpenSSH daemon.
+
+It means that you can use directly a SSH client from your system.
+
+For instance, on Unix, you can directly use OpenSSH:
+
+----
+~$ ssh -p 8101 karaf@localhost
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+On Windows, you can use Putty, Kitty, etc.
+
+If you don't have SSH client installed on your machine, you can use Apache Karaf client.
+
+===== `ssh:ssh` command
+
+Apache Karaf itself provides a SSH client. When you are on the Apache Karaf console, you have the `ssh:ssh` command:
+
+----
+karaf@root()> ssh:ssh --help
+DESCRIPTION
+ ssh:ssh
+
+ Connects to a remote SSH server
+
+SYNTAX
+ ssh:ssh [options] hostname [command]
+
+ARGUMENTS
+ hostname
+ The host name to connect to via SSH
+ command
+ Optional command to execute
+
+OPTIONS
+ --help
+ Display this help message
+ -p, --port
+ The port to use for SSH connection
+ (defaults to 22)
+ -P, --password
+ The password for remote login
+ -q
+ Quiet Mode. Do not ask for confirmations
+ -l, --username
+ The user name for remote login
+
+----
+
+Thanks to the `ssh:ssh` command, you can connect to another running Apache Karaf instance:
+
+----
+karaf@root()> ssh:ssh -p 8101 karaf@192.168.134.2
+Connecting to host 192.168.134.2 on port 8101
+Connecting to unknown server. Add this server to known hosts ? (y/n)
+Storing the server key in known_hosts.
+Connected
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+When you don't provide the `command` argument to the `ssh:ssh` command, you are in the interactive mode: you have
+a complete remote console available, where you can type commands, etc.
+
+You can also provide directly a command to execute using the `command` argument. For instance, to remotely shutdown
+a Apache Karaf instance:
+
+----
+karaf@root()> ssh:ssh -p 8101 karaf@localhost system:shutdown -f
+Connecting to host localhost on port 8101
+Connected
+----
+
+As the `ssh:ssh` command is a pure SSH client, so it means that you can connect to a Unix OpenSSH daemon:
+
+----
+karaf@root()> ssh:ssh user@localhost
+Connecting to host localhost on port 22
+Connecting to unknown server. Add this server to known hosts ? (y/n)
+Storing the server key in known_hosts.
+Agent authentication failed, falling back to password authentication.
+Password: Connected
+Last login: Sun Sep 8 19:21:12 2013
+user@server:~$
+----
+
+===== Apache Karaf client
+
+The `ssh:ssh` command requires to be run into a running Apache Karaf console.
+
+For commodity, the `ssh:ssh` command is "wrapped" as a standalone client: the `bin/client` Unix script (`bin\client.bat` on Windows).
+
+----
+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
+----
+
+For instance, to connect to local Apache Karaf instance (on the default SSHd server 8101 port), you can directly use
+`bin/client` Unix script (`bin\client.bat` on Windows) without any argument or option:
+
+----
+bin/client
+Logging in as karaf
+343 [pool-2-thread-4] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (4.0.0)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+----
+
+When you don't provide the `command` argument to the `bin/client` Unix script (`bin\client.bat` on Windows), you are
+in the interactive mode: you have a complete remote console available, where you can type commands, etc.
+
+You can also provide directly a command to execute using the `command` argument. For instance, to remotely shutdown
+a Apache Karaf instance:
+
+----
+bin/client "system:shutdown -f"
+Logging in as karaf
+330 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+----
+
+As the Apache Karaf client is a pure SSH client, you can use to connect to any SSHd daemon (like Unix OpenSSH daemon):
+
+----
+bin/client -a 22 -h localhost -u user
+Logging in as user
+353 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at localhost/127.0.0.1:22 presented unverified key:
+Password:
+Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-13-generic x86_64)
+
+ * Documentation: https://help.ubuntu.com/
+
+Last login: Tue Dec 3 18:18:31 2013 from localhost
+----
+
+===== Logout
+
+When you are connected to a remote Apache Karaf console, you can logout using:
+
+* using CTRL-D key binding. Note that CTRL-D just logout from the remote console in this case, it doesn't shutdown
+ the Apache Karaf instance (as CTRL-D does when used on a local console).
+* using `shell:logout` command (or simply `logout`)
+
+==== Filsystem clients
+
+Apache Karaf SSHd server also provides complete fileystem access via SSH. For security reason, the available filesystem
+is limited to `KARAF_BASE` directory.
+
+You can use this remote filesystem with any SCP/SFTP compliant clients.
+
+===== Native SCP/SFTP clients
+
+On Unix, you can directly use `scp` command to download/upload files to the Apache Karaf filesystem. For instance,
+to retrieve the `karaf.log` file remotely:
+
+----
+~$ scp -P 8101 karaf@localhost:/data/log/karaf.log .
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+karaf.log
+----
+
+As you have access to the complete `KARAF_BASE` directory, you can remotely change the configuration file in the `etc`
+folder, retrieve log files, populate the `system` folder.
+
+On Windows, you can use WinSCP to access the Apache Karaf filesystem.
+
+It's probably easier to use a SFTP complient client.
+
+For instance, on Unix system, you can use `lftp` or `ncftp`:
+
+----
+$ lftp
+lftp :~> open -u karaf sftp://localhost:8101
+Password:
+lftp karaf@localhost:~> ls
+-rw-r--r-- 1 jbonofre jbonofre 27754 Oct 26 10:50 LICENSE
+-rw-r--r-- 1 jbonofre jbonofre 1919 Dec 3 05:34 NOTICE
+-rw-r--r-- 1 jbonofre jbonofre 3933 Aug 18 2012 README
+-rw-r--r-- 1 jbonofre jbonofre 101041 Dec 3 05:34 RELEASE-NOTES
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 bin
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 18:57 data
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 demos
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 deploy
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 17:59 etc
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 instances
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 lib
+-rw-r--r-- 1 jbonofre jbonofre 0 Dec 3 13:02 lock
+drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 system
+lftp karaf@localhost:/>
+----
+
+You can also use graphic client like `filezilla`, `gftp`, `nautilus`, etc.
+
+On Windows, you can use `filezilla`, `WinSCP`, etc.
+
+===== Apache Maven
+
+Apache Karaf `system` folder is the Karaf repository, that use a Maven directory structure. It's where Apache Karaf
+looks for the artifacts (bundles, features, kars, etc).
+
+Using Apache Maven, you can populate the `system` folder using the `deploy:deploy-file` goal.
+
+For instance, you want to add the Apache ServiceMix facebook4j OSGi bundle, you can do:
+
+----
+mvn deploy:deploy-file -Dfile=org.apache.servicemix.bundles.facebook4j-2.0.2_1.jar -DgroupId=org.apache.servicemix.bundles -DartifactId=org.apache.servicemix.bundles.facebook4j -Dversion=2.0.2_1 -Dpackaging=jar -Durl=scp://localhost:8101/system
+----
+
+[NOTE]
+====
+If you want to turn Apache Karaf as a simple Maven repository, you can use link:http://karaf.apache.org/index/subprojects/cave.html[Apache Karaf Cave].
+====
+
+=== JMX MBeanServer
+
+Apache Karaf provides a JMX MBeanServer.
+
+This MBeanServer is available remotely, using any JMX client like `jconsole`.
+
+You can find details on the [Monitoring section|monitoring] of the user guide.
[10/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/log.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/log.adoc b/manual/src/main/asciidoc/users-guide/log.adoc
deleted file mode 100644
index 95c3304..0000000
--- a/manual/src/main/asciidoc/users-guide/log.adoc
+++ /dev/null
@@ -1,565 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Log
-
-Apache Karaf provides a very dynamic and powerful logging system.
-
-It supports:
-
-* the OSGi Log Service
-* the Apache Log4j framework
-* the Apache Commons Logging framework
-* the Logback framework
-* the SLF4J framework
-* the native Java Util Logging framework
-
-It means that the applications can use any logging framework, Apache Karaf will use the central log system to manage the
-loggers, appenders, etc.
-
-== Configuration files
-
-The initial log configuration is loaded from `etc/org.ops4j.pax.logging.cfg`.
-
-This file is a [standard Log4j configuration file|http://logging.apache.org/log4j/1.2/manual.html].
-
-You find the different Log4j element:
-
-* loggers
-* appenders
-* layouts
-
-You can add your own initial configuration directly in the file.
-
-The default configuration is the following:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-# Root logger
-log4j.rootLogger=INFO, out, osgi:*
-log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-log4j.appender.out.file=${karaf.data}/log/karaf.log
-log4j.appender.out.append=true
-log4j.appender.out.maxFileSize=1MB
-log4j.appender.out.maxBackupIndex=10
-
-# Sift appender
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=karaf
-log4j.appender.sift.appender=org.apache.log4j.FileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
-log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
-----
-
-The default configuration only define the `ROOT` logger, with `INFO` log level, using the `out` file appender.
-You can change the log level to any Log4j valid values (from the most to less verbose): TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
-
-The `osgi:*` appender is a special appender to send the log message to the OSGi Log Service.
-
-A `stdout` console appender is pre-configured, but not enabled by default. This appender allows you to display log
-messages directly to standard output. It's interesting if you plan to run Apache Karaf in server mode (without console).
-
-To enable it, you have to add the `stdout` appender to the `rootLogger`:
-
-----
-log4j.rootLogger=INFO, out, stdout, osgi:*
-----
-
-The `out` appender is the default one. It's rolling file appender that maintain and rotate 10 log files of 1MB each.
-The log files are located in `data/log/karaf.log` by default.
-
-The `sift` appender is not enabled by default. This appender allows you to have one log file per deployed bundle.
-By default, the log file name format uses the bundle symbolic name (in the `data/log` folder).
-
-You can edit this file at runtime: any change will be reloaded and be effective immediately (no need to restart Apache Karaf).
-
-Another configuration file is used by Apache Karaf: `etc/org.apache.karaf.log.cfg`. This files configures the Log Service
-used by the log commands (see later).
-
-== Commands
-
-Instead of changing the `etc/org.ops4j.pax.logging.cfg` file, Apache Karaf provides a set of commands allowing to
-dynamically change the log configuration and see the log content:
-
-=== `log:clear`
-
-The `log:clear` command clears the log entries.
-
-=== `log:display`
-
-The `log:display` command displays the log entries.
-
-By default, it displays the log entries of the `rootLogger`:
-
-----
-karaf@root()> log:display
-2013-11-29 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.9.0 | BouncyCastle not registered, using the default JCE provider
-2013-11-29 19:12:47,368 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
-----
-
-You can also display the log entries from a specific logger, using the `logger` argument:
-
-----
-karaf@root()> log:display ssh
-2013-11-29 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.9.0 | BouncyCastle not registered, using the default JCE provider
-----
-
-By default, all log entries will be displayed. It could be very long if your Apache Karaf container is running since a long time.
-You can limit the number of entries to display using the `-n` option:
-
-----
-karaf@root()> log:display -n 5
-2013-11-30 06:53:24,143 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2013-11-30 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2013-11-30 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2013-11-30 06:53:24,152 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2013-11-30 06:53:24,530 | INFO | FelixStartLevel | RegionsPersistenceImpl | 78 - org.apache.karaf.region.persist - 3.0.0 | Loading region digraph persistence
-----
-
-You can also limit the number of entries stored and retain using the `size` property in `etc/org.apache.karaf.log.cfg` file:
-
-----
-#
-# The number of log statements to be displayed using log:display. It also defines the number
-# of lines searched for exceptions using log:display exception. You can override this value
-# at runtime using -n in log:display.
-#
-size = 500
-----
-
-By default, each log level is displayed with a different color: ERROR/FATAL are in red, DEBUG in purple, INFO in cyan, etc.
-You can disable the coloring using the `--no-color` option.
-
-The log entries format pattern doesn't use the conversion pattern define in `etc/org.ops4j.pax.logging.cfg` file.
-By default, it uses the `pattern` property defined in `etc/org.apache.karaf.log.cfg`.
-
-----
-#
-# The pattern used to format the log statement when using log:display. This pattern is according
-# to the log4j layout. You can override this parameter at runtime using log:display with -p.
-#
-pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-----
-
-You can also change the pattern dynamically (for one execution) using the `-p` option:
-
-----
-karaf@root()> log:display -p "%d - %c - %m%n"
-2013-11-30 07:01:58,007 - org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
-2013-11-30 07:01:58,725 - org.apache.aries.jmx.core - Starting JMX OSGi agent
-2013-11-30 07:01:58,744 - org.apache.aries.jmx.core - Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83] for service with service.id [13]
-2013-11-30 07:01:58,747 - org.apache.aries.jmx.core - Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83
-----
-
-The pattern is a regular Log4j pattern where you can use keywords like %d for the date, %c for the class, %m for the log
-message, etc.
-
-=== `log:exception-display`
-
-The `log:exception-display` command displays the last occurred exception.
-
-As for `log:display` command, the `log:exception-display` command uses the `rootLogger` by default, but you can
-specify a logger with the `logger` argument.
-
-=== `log:get`
-
-The `log:get` command show the current log level of a logger.
-
-By default, the log level showed is the one from the root logger:
-
-----
-karaf@root()> log:get
-Logger | Level
---------------
-ROOT | INFO
-----
-
-You can specify a particular logger using the `logger` argument:
-
-----
-karaf@root()> log:get ssh
-Logger | Level
---------------
-ssh | INFO
-----
-
-The `logger` argument accepts the `ALL` keyword to display the log level of all logger (as a list).
-
-For instance, if you have defined your own logger in `etc/org.ops4j.pax.logging.cfg` file like this:
-
-----
-log4j.logger.my.logger = DEBUG
-----
-
-you can see the list of loggers with the corresponding log level:
-
-----
-karaf@root()> log:get ALL
-Logger | Level
------------------
-ROOT | INFO
-my.logger | DEBUG
-----
-
-The `log:list` command is an alias to `log:get ALL`.
-
-=== `log:log`
-
-The `log:log` command allows you to manually add a message in the log. It's interesting when you create Apache Karaf
-scripts:
-
-----
-karaf@root()> log:log "Hello World"
-karaf@root()> log:display
-2013-11-30 07:20:16,544 | INFO | Local user karaf | command | 59 - org.apache.karaf.log.command - 3.0.0 | Hello World
-----
-
-By default, the log level is INFO, but you can specify a different log level using the `-l` option:
-
-----
-karaf@root()> log:log -l ERROR "Hello World"
-karaf@root()> log:display
-2013-11-30 07:21:38,902 | ERROR | Local user karaf | command | 59 - org.apache.karaf.log.command - 3.0.0 | Hello World
-----
-
-=== `log:set`
-
-The `log:set` command sets the log level of a logger.
-
-By default, it changes the log level of the `rootLogger`:
-
-----
-karaf@root()> log:set DEBUG
-karaf@root()> log:get
-Logger | Level
---------------
-ROOT | DEBUG
-----
-
-You can specify a particular logger using the `logger` argument, after the `level` one:
-
-----
-karaf@root()> log:set INFO my.logger
-karaf@root()> log:get my.logger
-Logger | Level
------------------
-my.logger | INFO
-----
-
-The `level` argument accepts any Log4j log level: TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
-
-By it also accepts the DEFAULT special keyword.
-
-The purpose of the DEFAULT keyword is to delete the current level of the logger (and only the level, the other properties
-like appender are not deleted)
-in order to use the level of the logger parent (logger are hierarchical).
-
-For instance, you have defined the following loggers (in `etc/org.ops4j.pax.logging.cfg` file):
-
-----
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=DEBUG,appender2
-----
-
-You can change the level of `my.logger.custom` logger:
-
-----
-karaf@root()> log:set INFO my.logger.custom
-----
-
-Now we have:
-
-----
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=INFO,appender2
-----
-
-You can use the DEFAULT keyword on `my.logger.custom` logger to remove the level:
-
-----
-karaf@root()> log:set DEFAULT my.logger.custom
-----
-
-Now we have:
-
-----
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=appender2
-----
-
-It means that, at runtime, the `my.logger.custom` logger uses the level of its parent `my.logger`, so `INFO`.
-
-Now, if we use DEFAULT keyword with the `my.logger` logger:
-
-----
-karaf@root()> log:set DEFAULT my.logger
-----
-
-We have:
-
-----
-rootLogger=INFO,out,osgi:*
-my.logger=appender1
-my.logger.custom=appender2
-----
-
-So, both `my.logger.custom` and `my.logger` use the log level of the parent `rootLogger`.
-
-It's not possible to use DEFAULT keyword with the `rootLogger` and it doesn't have parent.
-
-=== `log:tail`
-
-The `log:tail` is exactly the same as `log:display` but it continuously displays the log entries.
-
-You can use the same options and arguments as for the `log:display` command.
-
-By default, it displays the entries from the `rootLogger`:
-
-----
-karaf@root()> log:tail
-2013-11-30 07:40:28,152 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.9.0 | BouncyCastle not registered, using the default JCE provider
-2013-11-30 07:40:28,909 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
-2013-11-30 07:40:28,928 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b] for service with service.id [13]
-2013-11-30 07:40:28,936 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b
-----
-
-To exit from the `log:tail` command, just type CTRL-C.
-
-== JMX LogMBean
-
-All actions that you can perform with the `log:*` command can be performed using the LogMBean.
-
-The LogMBean object name is `org.apache.karaf:type=log,name=*`.
-
-=== Attributes
-
-* `Level` attribute is the level of the ROOT logger.
-
-=== Operations
-
-* `getLevel(logger)` to get the log level of a specific logger. As this operation supports the ALL keyword, it returns a Map with the level of each logger.
-* `setLevel(level, logger)` to set the log level of a specific logger. This operation supports the DEFAULT keyword as for the `log:set` command.
-
-== Advanced configuration
-
-=== Filters
-
-You can use filters on appender. Filters allow log events to be evaluated to determine if or how they should be published.
-
-Log4j provides ready to use filters:
-
-* The DenyAllFilter (`org.apache.log4j.varia.DenyAllFilter`) drops all logging events.
- You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise"
- filtering behaviour to a "deny all unless instructed otherwise" behaviour.
-* The LevelMatchFilter (`org.apache.log4j.varia.LevelMatchFilter` is a very simple filter based on level matching.
- The filter admits two options `LevelToMatch` and `AcceptOnMatch`. If there is an exact match between the value of
- the `LevelToMatch` option and the level of the logging event, then the event is accepted in case the `AcceptOnMatch`
- option value is set to `true`. Else, if the `AcceptOnMatch` option value is set to `false`, the log event is rejected.
-* The LevelRangeFilter (`org.apache.log4j.varia.LevelRangeFilter` is a very simple filter based on level matching,
- which can be used to reject messages with priorities outside a certain range. The filter admits three options `LevelMin`,
- `LevelMax` and `AcceptOnMatch`. If the log event level is between `LevelMin` and `LevelMax`, the log event is
- accepted if `AcceptOnMatch` is true, or rejected if `AcceptOnMatch` is false.
-* The StringMatchFilter (`org.apache.log4j.varia.StringMatchFilter`) is a very simple filter based on string matching.
- The filter admits two options `StringToMatch` and `AcceptOnMatch`. If there is a match between the `StringToMatch`
- and the log event message, the log event is accepted if `AcceptOnMatch` is true, or rejected if `AcceptOnMatch` is false.
-
-The filter is defined directly on the appender, in the `etc/org.ops4j.pax.logging.cfg` configuration file.
-
-The format to use it:
-
-----
-log4j.appender.[appender-name].filter.[filter-name]=[filter-class]
-log4j.appender.[appender-name].filter.[filter-name].[option]=[value]
-----
-
-For instance, you can use the `f1` LevelRangeFilter on the `out` default appender:
-
-----
-log4j.appender.out.filter.f1=org.apache.log4j.varia.LevelRangeFilter
-log4j.appender.out.filter.f1.LevelMax=FATAL
-log4j.appender.out.filter.f1.LevelMin=DEBUG
-----
-
-Thanks to this filter, the log files generated by the `out` appender will contain only log messages with a level
-between DEBUG and FATAL (the log events with TRACE as level are rejected).
-
-=== Nested appenders
-
-A nested appender is a special kind of appender that you use "inside" another appender.
-It allows you to create some kind of "routing" between a chain of appenders.
-
-The most used "nested compliant" appender are:
-
-* The AsyncAppender (`org.apache.log4j.AsyncAppender`) logs events asynchronously. This appender collects the events
- and dispatch them to all the appenders that are attached to it.
-* The RewriteAppender (`org.apache.log4j.rewrite.RewriteAppender`) forwards log events to another appender after possibly
- rewriting the log event.
-
-This kind of appender accepts an `appenders` property in the appender definition:
-
-----
-log4j.appender.[appender-name].appenders=[comma-separated-list-of-appender-names]
-----
-
-For instance, you can create a AsyncAppender named `async` and asynchronously dispatch the log events to a JMS appender:
-
-----
-log4j.appender.async=org.apache.log4j.AsyncAppender
-log4j.appender.async.appenders=jms
-
-log4j.appender.jms=org.apache.log4j.net.JMSAppender
-...
-----
-
-=== Error handlers
-
-Sometime, appenders can fail. For instance, a RollingFileAppender tries to write on the filesystem but the filesystem is full, or a JMS appender tries to send a message but the JMS broker is not there.
-
-As log can be very critical to you, you have to be inform that the log appender failed.
-
-It's the purpose of the error handlers. Appenders may delegate their error handling to error handlers, giving a chance to react to this appender errors.
-
-You have two error handlers available:
-
-* The OnlyOnceErrorHandler (`org.apache.log4j.helpers.OnlyOnceErrorHandler`) implements log4j's default error handling policy
- which consists of emitting a message for the first error in an appender and ignoring all following errors. The error message
- is printed on `System.err`.
- This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails.
-* The FallbackErrorHandler (`org.apache.log4j.varia.FallbackErrorHandler`) allows a secondary appender to take over if the primary appender fails.
- The error message is printed on `System.err`, and logged in the secondary appender.
-
-You can define the error handler that you want to use for each appender using the `errorhandler` property on the appender definition itself:
-
-----
-log4j.appender.[appender-name].errorhandler=[error-handler-class]
-log4j.appender.[appender-name].errorhandler.root-ref=[true|false]
-log4j.appender.[appender-name].errorhandler.logger-ref=[logger-ref]
-log4j.appender.[appender-name].errorhandler.appender-ref=[appender-ref]
-----
-
-=== OSGi specific MDC attributes
-
-The `sift` appender is a OSGi oriented appender allowing you to split the log events based on MDC (Mapped Diagnostic Context) attributes.
-
-MDC allows you to distinguish the different source of log events.
-
-The `sift` appender provides OSGi oritend MDC attributes by default:
-
-* `bundle.id` is the bundle ID
-* `bundle.name` is the bundle symbolic name
-* `bundle.version` is the bundle version
-
-You can use these MDC properties to create a log file per bundle:
-
-----
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=karaf
-log4j.appender.sift.appender=org.apache.log4j.FileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
-log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
-----
-
-=== Enhanced OSGi stack trace renderer
-
-By default, Apache Karaf provides a special stack trace renderer, adding some OSGi specific specific information.
-
-In the stack trace, in addition of the class throwing the exception, you can find a pattern `[id:name:version]` at the
-end of each stack trace line, where:
-
-* `id` is the bundle ID
-* `name` is the bundle name
-* `version` is the bundle version
-
-It's very helpful to diagnosing the source of an issue.
-
-For instance, in the following IllegalArgumentException stack trace, we can see the OSGi details about the source of the exception:
-
-----
-java.lang.IllegalArgumentException: Command not found: *:foo
- at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:225)[21:org.apache.karaf.shell.console:3.0.0]
- at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[21:org.apache.karaf.shell.console:3.0.0]
- at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[21:org.apache.karaf.shell.console:3.0.0]
- at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[21:org.apache.karaf.shell.console:3.0.0]
- at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[21:org.apache.karaf.shell.console:3.0.0]
- at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)[21:org.apache.karaf.shell.console:3.0.0]
- at java.lang.Thread.run(Thread.java:637)[:1.7.0_21]
-----
-
-=== Custom appenders
-
-You can use your own appenders in Apache Karaf.
-
-The easiest way to do that is to package your appender as an OSGi bundle and attach it as a fragment of the
-`org.ops4j.pax.logging.pax-logging-service` bundle.
-
-For instance, you create `MyAppender`:
-
-----
-public class MyAppender extends AppenderSkeleton {
-...
-}
-----
-
-You compile and package as an OSGi bundle containing a MANIFEST looking like:
-
-----
-Manifest:
-Bundle-SymbolicName: org.mydomain.myappender
-Fragment-Host: org.ops4j.pax.logging.pax-logging-service
-...
-----
-
-Copy your bundle in the Apache Karaf `system` folder. The `system` folder uses a standard Maven directory layout: groupId/artifactId/version.
-
-In the `etc/startup.properties` configuration file, you define your bundle in the list before the pax-logging-service bundle.
-
-You have to restart Apache Karaf with a clean run (purging the `data` folder) in order to reload the system bundles.
-You can now use your appender directly in `etc/org.ops4j.pax.logging.cfg` configuration file.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/migration.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/migration.adoc b/manual/src/main/asciidoc/users-guide/migration.adoc
deleted file mode 100644
index f4d30a1..0000000
--- a/manual/src/main/asciidoc/users-guide/migration.adoc
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Migration from Karaf 2.x to 3.x
-
-This section shows the necessary changes you have to consider when upgrading karaf.
-
-== Updating an existing instance
-
-There is no simple upgrade path for an existing instance. The simplest way of upgraing is to redeploy your application to the new karaf instance and copy over the changed configurations.
-
-== Changes in command names
-
-In general the command names now have the scheme <object in singular>:<command on object>.
-For cases when one scope cares for more than one object type like feature:* that cares for features and feature repositories the sheme is partly: <scope>:<object-command>.
-The following table shows side by side the old and new command names.
-
-|| Name 2.x || Name 3.x ||
-| features:add-url | feature:repo-add |
-| features:chooseurl | feature:repo-add |
-| features:chooseurl | feature:repo-add |
-| features:listrepositories | feature:repo-list |
-| features:listurl | feature:repo-list |
-| features:listversions | feature:version-list |
-| features:refreshurl | feature:repo-add |
-| features:removerepository | feature:repo-remove |
-| features:removeurl | feature:repo-remove |
-| features:* | feature:* |
-| osgi:* | bundle:* |
-| dev:dynamic-import | bundle:dynamic-import |
-| dev:framework | system:framework |
-| dev:print-stack-traces | shell:print-stack-traces |
-| dev:restart | system:shutdown -r |
-| dev:show-tree | bundle:tree-show |
-| dev:watch | bundle:watch |
-| admin:* | instance:* |
-| config: | config: |
-| jaas: | jaas: |
-
-== Changes in MBeans
-
-For Karaf 3 we did a major refactoring of the module and package structure of Karaf. So almost all mbean interfaces moved to a new package. So if you use the Java interface to access an mbean you will most likely have to change that.
-
-Like the commands the bean types have bean renamed to the singular form:
-
-|| Type Karaf 2.x || Type Karaf 3.x ||
-| admin | instance |
-| bundles | bundle |
-| features | feature |
-| packages | package |
-| services | service |
-
-Besides the type in the objectname a lot of the operations / attributes changed.
-
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/monitoring.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/monitoring.adoc b/manual/src/main/asciidoc/users-guide/monitoring.adoc
deleted file mode 100644
index 7afcf4b..0000000
--- a/manual/src/main/asciidoc/users-guide/monitoring.adoc
+++ /dev/null
@@ -1,273 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Monitoring and Management using JMX
-
-Apache Karaf provides a complete JMX layer.
-
-You can remotely connect to a running Apache Karaf instance using any JMX client (like jconsole).
-
-The Apache Karaf features provide a set of MBeans, dedicating for the monitoring and management.
-
-== Connecting
-
-Apache Karaf exposes a complete MBean server that you can use remotely.
-
-The default port number is 1099.
-
-The JMX URL to use by default is:
-
-----
-service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
-----
-
-You have to provide an username and password to access to the JMX layer.
-The JMX layer user the security framework, and so, by default, it uses the users defined in `etc/users.properties`.
-
-You can change the port numbers of the JMX layer in the `etc/org.apache.karaf.management.cfg` configuration file.
-
-== Configuration
-
-The Apache Karaf JMX management layer is configured in the `etc/org.apache.karaf.management.cfg` configuration file:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# The properties in this file define the configuration of Apache Karaf's JMX Management
-#
-
-#
-# Port number for RMI registry connection
-#
-rmiRegistryPort = 1099
-
-#
-# Port number for RMI server connection
-#
-rmiServerPort = 44444
-
-#
-# Name of the JAAS realm used for authentication
-#
-jmxRealm = karaf
-
-#
-# The service URL for the JMXConnectorServer
-#
-serviceUrl = service:jmx:rmi://0.0.0.0:${rmiServerPort}/jndi/rmi://0.0.0.0:${rmiRegistryPort}/karaf-${karaf.name}
-
-#
-# Whether any threads started for the JMXConnectorServer should be started as daemon threads
-#
-daemon = true
-
-#
-# Whether the JMXConnectorServer should be started in a separate thread
-#
-threaded = true
-
-#
-# The ObjectName used to register the JMXConnectorServer
-#
-objectName = connector:name=rmi
-
-#
-# Role name used for JMX access authorization
-# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
-#
-# jmxRole=admin
-----
-
-* `rmiRegistryPort` property contains the port number of the JMX RMI registry. Default is `1099`.
-* `rmiServerPort` property contains the port number of the JMX RMI server. Default is `44444`.
-* `jmxRealm` is the security realm to use as authentication backend. By default it uses the `karaf` realm.
-
-== MBeans
-
-Apache Karaf provides a bunch of MBeans.
-
-The MBeans object names have the same format:
-
-----
-org.apache.karaf:type=[feature],name=[instance]
-----
-
-Installing additional Apache Karaf features and external applications can provide new MBeans.
-
-The following MBeans list is non exhaustive:
-
-* `org.apache.karaf:type=bundle,name=*`: management of the OSGi bundles.
-* `org.apache.karaf:type=config,name=*`: management of the configurations.
-* `org.apache.karaf:type=diagnostic,name=*`: creation of dumps containing the current Apache Karaf activity (used for diagnostic).
-* `org.apache.karaf:type=feature,name=*`: management of the Apache Karaf features.
-* `org.apache.karaf:type=http,name=*`: management of the HTTP service (provided by the `http` feature).
-* `org.apache.karaf:type=instance,name=*`: management of the instances.
-* `org.apache.karaf:type=jdbc,name=*`: management of the JDBC service (provided by the `jdbc` feature).
-* `org.apache.karaf:type=jms,name=*`: management of the JMS service (provided by the `jms` feature).
-* `org.apache.karaf:type=jndi,name=*`: management of the JNDI service (provided by the `jndi` feature).
-* `org.apache.karaf:type=kar,name=*`: management of the KAR file.
-* `org.apache.karaf:type=log,name=*`: management of the log service.
-* `org.apache.karaf:type=obr,name=*`: management of the OBR service (provided by the `obr` feature).
-* `org.apache.karaf:type=package,name=*`: details about packages exported/imported.
-* `org.apache.karaf:type=service,name=*`: management of the OSGi services.
-* `org.apache.karaf:type=system,name=*`: management of the Apache Karaf container itself (halt, restart, etc).
-* `org.apache.karaf:type=web,name=*`: management of WebApplications (provided by the `war` feature).
-* `org.apache.karaf:type=wrapper,name=*`: management of the service wrapper (provided by the `wrapper` feature).
-
-== RBAC
-
-Apache Karaf provides a complete Role-Based Access Control to the JMX MBeans and operations.
-
-Whenever a JMX operation is invoked, the roles of the user are checked against the required roles for this operation.
-
-The access lists are defined in configuration file in the `etc` folder.
-
-The relevant configuration is prefixed with `jmx.acl` and based on the JMX ObjectName that it applies to.
-
-For instance, specific configuration for a MBean with the object name `foo.bar:type=Test` can be placed in the
-`etc/jmx.acl.foo.bar.Test.cfg` configuration file.
-
-More generic configurations can be placed in the domain (e.g. jmx.acl.foo.bar.cfg) or at the top level (jmx.acl.cfg).
-
-A simple configuration file looks like:
-
-----
- # operation = role
- test = admin
- getVal = manager, viewer
-----
-
-Apache Karaf looks for required roles using the following process
-.
-The most specific configuration file is tried first. It means that in the previous example, the `etc/jmx.acl.foo.bar.Test.cfg` is looked at first.
-In this configuration, Apache Karaf looks for a:
-
-1. Specific match for the invocation, e.g. `test(int)["17"] = role1`
-
-2. Regex match for the invocation, e.g. `test(int)[/[0-9]/] = role2`
- In both cases, the passed argument is converted to a String for the comparison.
- If any of the above match, the search stops and the associated roles are used.
-
-3. Signature match for the invocation, e.g. `test(int) = role3`
- If matched, the search stops and the associated roles are used.
-
-4. Method name match for the invocation, e.g. `test = role4`
- If matched, the search stops and the associated roles are used.
-
-5. A method name wildcard match, e.g. `te* = role5`
- For all the wildcard matches found in the current configuration file, the roles associated with the longest match are used.
- So if you have te* and * and the method invoked is 'test', then the roles defined with te* are used, not the ones defined with *.
-
-If no matching definition is found, the most specific definition always takes the precedence.
-
-You can find some configuration examples:
-
-* Only a `manager` can call GC on the Memory MBean:
-----
-# etc/jmx.acl.java.lang.Memory.cfg
- gc = manager
-----
-
-* Bundles with ID between 0 and 49 can be stopped only by an `admin`, other bundles can be stopped by a `manager`:
-----
-# etc/jmx.acl.org.apache.karaf.bundles.cfg
- stop(java.lang.String)[/([1-4])?([0-9]/] = admin
- stop = manager
-----
-
-The `etc/jmx.acl.cfg` configuration file contains the global configuration for the invocation on any MBean that
-doesn't have a specific configuration:
-
-----
-# etc/jmx.acl.cfg
- list* = viewer
- get* = viewer
- is* = viewer
- set* = admin
- * = admin
-----
-
-By default, all "read-only" operations (`list*`, `get*`, `is*`) can be performed by a `viewer`, whereas the "read-write" operations can be performed only by an `admin`.
-
-The `org.apache.karaf:type=security,area=jmx` MBean can be used to check whether the current user can access a certain MBean or invoke a specific operation on it.
-This MBean can be used by management clients (monitoring tools, etc) to decide whether to show certain MBeans or operations to the end user.
-
-== JMX-HTTP bridge with Jolokia
-
-It's not always easy to use a JMX client with the RMI protocol.
-
-Some monitoring tools (Nagios, Zabbix, ...) are not native JMX clients.
-
-But most of them can use HTTP.
-
-More over, you may want to write your own application/web application. In that case, HTTP and JSON can be very interesting and easy to remotely manage Apache Karaf.
-
-[Jolokia|http://www.jolokia.org/] can be installed in Apache Karaf as a remote JMX-HTTP bridge.
-
-Karaf provides a jolokia feature, ready to install:
-
-----
-karaf@root()> feature:install jolokia
-----
-
-By default, Jolokia is listening on the port `8181` (see the [WebContainer (JSP/Servlet)|webcontainer] page for details about the HTTP configuration).
-
-If you point a browser on [http://localhost:8181/jolokia] you will see a JSON output like:
-
-----
-{"timestamp":1421765829,"status":200,"request":{"type":"version"},"value":{"protocol":"7.2","config":{"useRestrictorService":"false","canonicalNaming":"true","includeStackTrace":"true","listenForHttpService":"true","historyMaxEntries":"10","agentId":"192.168.134.10-5922-6eb8d517-osgi","debug":"false","realm":"karaf","serializeException":"false","agentContext":"\/jolokia","agentType":"servlet","policyLocation":"classpath:\/jolokia-access.xml","user":"karaf","debugMaxEntries":"100","authMode":"jaas","mimeType":"text\/plain"},"agent":"1.2.4-SNAPSHOT","info":{"product":"felix","vendor":"Apache","version":"4.4.1"`}
-----
-
-You can manipulate the Apache Karaf JMX layer via HTTP and JSON, via system tools (like `curl`, `jmx4perl`, monitoring tools (supporting HTTP/JSON), or web applications.
-
-For instance, you can send a JSON request to get details about the current Apache Karaf heap memory usage.
-
-The format of the request is:
-
-----
-{
- "type":"read",
- "mbean":"java.lang:type=Memory",
- "attribute":"HeapMemoryUsage",
- "path":"used"
-}
-----
-
-We can send this JSON request using `curl` and get the result:
-
-----
-curl -u karaf -d "{\"type\":\"read\",\"mbean\":\"java.lang:type=Memory\",\"attribute\":\"HeapMemoryUsage\",\"path\":\"used\"}" http://localhost:8181/jolokia/ && echo ""
-Enter host password for user 'karaf':
-{"timestamp":1421765948,"status":200,"request":{"mbean":"java.lang:type=Memory","path":"used","attribute":"HeapMemoryUsage","type":"read"},"value":69121000}
-----
-
-You can find details on the [Jolokia website|http://www.jolokia.org] and in the [documentation|http://www.jolokia.org/reference/html/].
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/obr.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/obr.adoc b/manual/src/main/asciidoc/users-guide/obr.adoc
deleted file mode 100644
index ce40226..0000000
--- a/manual/src/main/asciidoc/users-guide/obr.adoc
+++ /dev/null
@@ -1,373 +0,0 @@
-//
-// Licensed 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.
-//
-
-= OBR
-
-The goal of OBR (OSGi Bundle Repository) is:
-
-1. to simplify deploying and using bundles
-2. to encourage independent bundle development.
-
-OBR achieves the first goal by providing a service that can automatically install a bundle, with its deployment dependencies,
-from a bundle repository. This makes it easier for people to experiment with existing bundles.
-
-The second goal is achieved by raising the visibility of the available bundles in a repository.
-
-OBR is an optional Apache Karaf feature. You have to install the `obr` feature to use OBR service:
-
-----
-karaf@root()> feature:install obr
-----
-
-The OBR feature turns Apache Karaf as an OBR client. It means that Apache Karaf can use a OBR repository to the installation
-of the bundles, and during the installation of the features.
-
-The installation of the `obr` feature adds in Apache Karaf:
-
-* the OBR service
-* the features OBR resolver
-* the `obr:*` commands
-* the JMX ObrMBean
-
-The OBR repository contains all bundles. The OBR service knows all requirements and capabilities of each bundle on an
-OBR repository (it's the OBR metadata).
-
-Thanks to that, when you install ("deploy" in OBR wording) a bundle using the OBR service, it looks for all bundles
-providing the capabilities matching the bundle requirements.
-It will automatically install the bundles needed for the bundle.
-
-== Features OBR resolver
-
-If the feature specifies `obr` in the `resolver` attribute, Apache Karaf can use the OBR service to construct the list
-of bundles to install with the features.
-
-The feature default resolver just consider the bundles described in the feature itself.
-
-Using the OBR resolver, Apache Karaf can extend the bundle list at the feature installation time using the OBR service.
-
-== Commands
-
-=== `obr:url-add`
-
-The `obr:url-add` command registers the OBR repository at a given URL in the OBR service.
-
-Basically, an OBR repository is described by a `repository.xml` file.
-
-The `obr:url-add` command expects an `url` argument. The `url` argument is the URL to the OBR repository `repository.xml` file.
-Any URL described in the [Artifacts repositories and URLs section|urls] is supported.
-
-For instance:
-
-----
-karaf@root()> obr:url-add file:///user/.m2/repository/repository.xml
-----
-
-=== `obr:url-list`
-
-The `obr:url-list` command lists the OBR repository (with URL) registered in the OBR service:
-
-----
-karaf@root()> obr:url-list
-Index | OBR URL
----------------------------------------------------------
-0 | file:/user/.m2/repository/repository.xml
-----
-
-=== `obr:url-refresh`
-
-The `obr:url-refresh` command refresh an OBR repository (reloading the URL).
-
-The OBR service doesn't take "on the fly" the changes performed on an OBR repository `repository.xml`. You have to
-reload the `repository.xml` URL to take the changes. It's the purpose of the `obr:url-refresh` command.
-
-Without argument, the `obr:url-refresh` command refreshes all repositories:
-
-----
-karaf@root()> obr:url-refresh
-----
-
-You can refresh only one repository by specifying the URL as argument:
-
-----
-karaf@root()> obr:url-refresh file:/user/.m2/repository/repository.xml
-----
-
-Instead of using the URL, you can use the repository index as displayed by the `obr:url-list` command.
-To do so, you have to use the `-i` option:
-
-----
-karaf@root()> obr:url-refresh -i 0
-----
-
-=== `obr:url-remove`
-
-The `obr:url-remove` command removes an OBR repository from the OBR service.
-
-The `obr:url-remove` command expects the repository URL as argument:
-
-----
-karaf@root()> obr:url-remove file:/user/.m2/repository/repository.xml
-----
-
-Instead of using the URL, you can use the repository index as displayed by the `obr:url-list` command.
-To do so, you have to use the `-i` option:
-
-----
-karaf@root()> obr:url-remove -i 0
-----
-
-=== `obr:list`
-
-The `obr:list` command lists all bundles available on the registered OBR repositories:
-
-----
-karaf@root()> obr:list|more
-Name | Symbolic Name | Version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-activemq-blueprint | org.apache.activemq.activemq-blueprint | 5.10.0.SNAPSHOT
-activemq-camel | org.apache.activemq.activemq-camel | 5.10.0.SNAPSHOT
-activemq-karaf | activemq-karaf | 5.10.0.SNAPSHOT
-activemq-osgi | org.apache.activemq.activemq-osgi | 5.10.0.SNAPSHOT
-Apache Aries Application API | org.apache.aries.application.api | 1.0.1.SNAPSHOT
-...
-----
-
-=== `obr:info`
-
-The `obr:info` command displays the details about bundles available on the OBR service. Especially, it provides details about
-capabilities and requirements of bundles.
-
-The `obr:info` command expects a bundle symbolic name as argument:
-
-----
-karaf@root()> obr:info org.apache.karaf.wrapper.core
--------------------------------
-Apache Karaf :: Wrapper :: Core
--------------------------------
-id: org.apache.karaf.wrapper.core/3.0.0
-description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
-documentation: http://www.apache.org/
-symbolicname: org.apache.karaf.wrapper.core
-presentationname: Apache Karaf :: Wrapper :: Core
-license: http://www.apache.org/licenses/LICENSE-2.0.txt
-uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/3.0.0/org.apache.karaf.wrapper.core-3.0.0.jar
-size: 1281352
-version: 3.0.0
-Requires:
- service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
- package:(&(package=javax.management))
- package:(&(package=org.apache.karaf.wrapper))
- package:(&(package=org.apache.karaf.wrapper.management))
- package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
-Capabilities:
- bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=3.0.0}
- service:{service=org.apache.karaf.wrapper.WrapperService}
- package:{package=org.apache.karaf.wrapper, version=3.0.0}
- package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=3.0.0}
-----
-
-The `obr:info` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
-It means that you have to use the following command to see the info about the wrapper core bundle with version 3.0.0:
-
-----
-karaf@root()> obr:info org.apache.karaf.wrapper.core,3.0.0
-...
-----
-
-You can specific multiple bundles separated by space:
-
-----
-karaf@root()> obr:info org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
-...
-----
-
-=== `obr:source`
-
-In addition of the bundles executable, the OBR service can also store the bundles sources.
-
-The `obr:source` command check the source URL in the OBR metadata for a given bundle, and download the sources on a target folder:
-
-----
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core
-----
-
-The `obr:source` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
-It means that you have to use the following command to download the source of wrapper core bundle with version 3.0.0:
-
-----
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,3.0.0
-----
-
-You can specify multiple bundles separated by space:
-
-----
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
-...
-----
-
-=== `obr:resolve`
-
-The `obr:resolve` command displays the resolution output for a given set of requirements. Actually, it show the bundles providing
-the capabilities to match the requirements. It's what the OBR service does when executing `obr:deploy`.
-
-Optionally, the `obr:resolve` command can deploy the bundles as the `obr:deploy` command does.
-
-For instance, to know the OBR bundle resolving the `org.apache.karaf.wrapper` package requirement, you can do:
-
-----
-karaf@root()> obr:resolve package=org.apache.karaf.wrapper
-Required resource(s):
----------------------
- Apache Karaf :: Wrapper :: Core (3.0.0)
-----
-
-=== `obr:find`
-
-The `obr:find` command is similar to the `obr:resolve` one. It displays the bundles resolving the provided requirements, with details.
-
-For instance, to find the OBR bundle providing the `org.apache.karaf.wrapper` package, you can do:
-
-----
-karaf@root()> obr:find package=org.apache.karaf.wrapper
--------------------------------
-Apache Karaf :: Wrapper :: Core
--------------------------------
-id: org.apache.karaf.wrapper.core/3.0.0
-description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
-documentation: http://www.apache.org/
-symbolicname: org.apache.karaf.wrapper.core
-presentationname: Apache Karaf :: Wrapper :: Core
-license: http://www.apache.org/licenses/LICENSE-2.0.txt
-uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/3.0.0/org.apache.karaf.wrapper.core-3.0.0.jar
-size: 1281352
-version: 3.0.0
-Requirements:
- service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
- package:(&(package=javax.management))
- package:(&(package=org.apache.karaf.wrapper))
- package:(&(package=org.apache.karaf.wrapper.management))
- package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
-Capabilities:
- bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=3.0.0}
- service:{service=org.apache.karaf.wrapper.WrapperService}
- package:{package=org.apache.karaf.wrapper, version=3.0.0}
- package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=3.0.0}
-----
-
-=== `obr:deploy`
-
-The `obr:deploy` command installs a bundle from the OBR repository, including all bundles required to satisfy the bundle requirements.
-
-----
-karaf@root()> obr:deploy org.ops4j.pax.web.samples.helloworld-hs
-Target resource(s):
--------------------
- OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
-
-Required resource(s):
----------------------
- Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
- OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
-
-Deploying...done.
-----
-
-By default, the bundles are just installed, not started. You can use the `-s` option to start the bundles.
-
-The `obr:deploy` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
-It means that you have to use the following command to deploy the wrapper core bundle with version 3.0.0:
-
-----
-karaf@root()> obr:deploy org.apache.karaf.wrapper.core,3.0.0
-----
-
-You can specify multiple bundles separated by space:
-
-----
-karaf@root()> obr:deploy org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
-...
-----
-
-== `obr:start`
-
-The `obr:start` command does the same as `obr:deploy -s` command. It installs the bundle (and all required bundles to
-satisfy the requirements) and starts all installed bundles.
-
-----
-karaf@root()> obr:start org.ops4j.pax.web.samples.helloworld-hs
-Target resource(s):
--------------------
- OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
-
-Required resource(s):
----------------------
- Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
- OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
-
-Deploying...done.
-----
-
-The `obr:start` command uses the following syntax to identify the bundles: `symbolic_name,version` where `version` is optional.
-It means that you have to use the following command to deploy and start the wrapper core bundle with version 3.0.0:
-
-----
-karaf@root()> obr:start org.apache.karaf.wrapper.core,3.0.0
-----
-
-You can specify multiple bundles separated by space:
-
-----
-karaf@root()> obr:start org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
-...
-----
-
-== JMX ObrMBean
-
-On the JMX layer, Apache Karaf provides a MBean dedicated to the management of the OBR service: the ObrMBean.
-
-The ObjectName to use is `org.apache.karaf:type=obr,name=*`.
-
-=== Attributes
-
-The `Urls` attribute provides the list of registered OBR repositories URLs.
-
-The `Bundles` attribute provides a tabular data containing all bundles available on the registered OBR repositories.
-
-=== Operations
-
-* `addUrl(url)` registers the OBR repository using the `url` to the `repository.xml`.
-* `removeUrl(url)` removes the OBR repository at the given `url`.
-* `refreshUrl(url)` refreshes the OBR repository at the given `url`.
-* `deployBundle(name)` deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service. The bundles are not automatically started.
-* `deployBundle(name, start, deployOptional)` deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service.
- If `start` is `true`, the bundles are automatically started. If `deployOptional` is `true`, even the optional requirements will be resolved
- by the OBR service (meaning installing more bundles to satisfy the optional requirements).
-
-The name to identify a bundle uses the following syntax: `symbolic_name,version` where version is optional.
-
-== Apache Karaf Cave
-
-In addition of being an OBR client, Apache Karaf can act as an OBR repositories server, thanks to Apache Karaf Cave.
-
-See the [Apache Karaf Cave sub-project|http://karaf.apache.org/index/subprojects/cave.html] for details.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/provisioning-schema.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/provisioning-schema.adoc b/manual/src/main/asciidoc/users-guide/provisioning-schema.adoc
deleted file mode 100644
index 41af73a..0000000
--- a/manual/src/main/asciidoc/users-guide/provisioning-schema.adoc
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Features XML Schemas (provisioning)
-
-Apache Karaf 3.0.0 supports different versions of the features XML schemas.
-
-The features XML schema can be found directly in the Apache Karaf sources, in the `features/core` module:
-
-----
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.0.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.1.0.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.0.0.xsd
-----
-
-These schemas are also available on the Apache Karaf website:
-
-* [http://karaf.apache.org/xmlns/features/v1.2.0]
-* [http://karaf.apache.org/xmlns/features/v1.1.0]
-* [http://karaf.apache.org/xmlns/features/v1.0.0]
-
-== karaf-features-1.2.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-== karaf-features-1.1.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.1.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-== karaf-features-1.0.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.0.0.xsd|lang=xml|pygmentize=true}
-{snippet}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/remote.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/remote.adoc b/manual/src/main/asciidoc/users-guide/remote.adoc
deleted file mode 100644
index 05fe439..0000000
--- a/manual/src/main/asciidoc/users-guide/remote.adoc
+++ /dev/null
@@ -1,423 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Remote
-
-Apache Karaf supports a complete remote mechanism allowing you to remotely connect to a running Apache Karaf instance.
-More over, you can also browse, download, and upload files remotely to a running Apache Karaf instance.
-
-Apache Karaf embeds a complete SSHd server.
-
-== SSHd server
-
-When you start Apache Karaf, it enables a remote console that can be accessed over SSH.
-
-This remote console provides all the features of the "local" console, and gives a remote user complete control over the
-container and services running inside of it. As the "local" console, the remote console is secured by a RBAC mechanism
-(see the [Security section|security] of the user guide for details).
-
-In addition of the remote console, Apache Karaf also provides a remote filesystem. This remote filesystem can be accessed
-using a SCP/SFTP client.
-
-=== Configuration
-
-The configuration of the SSHd server is stored in the `etc/org.apache.karaf.shell.cfg` file:
-
-----
-################################################################################
-#
-# 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
-
-#
-# Role name used for SSH access authorization
-# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
-#
-# sshRole = admin
-
-#
-# Self defined key size in 1024, 2048, 3072, or 4096
-# If not set, this defaults to 1024.
-#
-# keySize = 1024
-
-#
-# Specify host key algorithm, defaults to DSA
-#
-# algorithm = DSA
-
-#
-# 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
-----
-
-The `etc/org.apache.karaf.shell.cfg` configuration file contains different properties to configure the SSHd server:
-
-* `sshPort` is the port number where the SSHd server is bound (by default, it's 8101).
-* `sshHost` is the address of the network interface where the SSHd server is bound. The default value is 0.0.0.0,
- meaning that the SSHd server is bound on all network interfaces. You can bind on a target interface providing the IP
- address of the network interface.
-* `hostKey` is the location of the `host.key` file. By defaut, it uses `etc/host.key`. This file stores the public
- and private key pair of the SSHd server.
-* `sshRole` is the default role used for SSH access. The default value is the value of `karaf.admin.role` property
- defined in `etc/system.properties`. See the [Security section|security] of this user guide for details.
-* `keySize` is the key size used by the SSHd server. The possible values are 1024, 2048, 3072, or 4096. The default
- value is 1024.
-* `algorithm` is the host key algorithm used by the SSHd server. The possible values are DSA or RSA. The default
- value is DSA.
-
-The SSHd server configuration can be changed at runtime:
-
-* by editing the `etc/org.apache.karaf.shell.cfg` configuration file
-* by using the `config:*` commands
-
-At runtime, when you change the SSHd server configuration, you have to restart the SSHd server to load the changes.
-You can do it with:
-
-----
-karaf@root()> bundle:restart -f org.apache.karaf.shell.ssh
-----
-
-The Apache Karaf SSHd server supports key/agent authentication and password authentication.
-
-=== Console clients
-
-h4. System native clients
-
-The Apache Karaf SSHd server is a pure SSHd server, similar to OpenSSH daemon.
-
-It means that you can use directly a SSH client from your system.
-
-For instance, on Unix, you can directly use OpenSSH:
-
-----
-~$ ssh -p 8101 karaf@localhost
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-On Windows, you can use Putty, Kitty, etc.
-
-If you don't have SSH client installed on your machine, you can use Apache Karaf client.
-
-h4. `ssh:ssh` command
-
-Apache Karaf itself provides a SSH client. When you are on the Apache Karaf console, you have the `ssh:ssh` command:
-
-----
-karaf@root()> ssh:ssh --help
-DESCRIPTION
- ssh:ssh
-
- Connects to a remote SSH server
-
-SYNTAX
- ssh:ssh [options] hostname [command]
-
-ARGUMENTS
- hostname
- The host name to connect to via SSH
- command
- Optional command to execute
-
-OPTIONS
- --help
- Display this help message
- -p, --port
- The port to use for SSH connection
- (defaults to 22)
- -P, --password
- The password for remote login
- -q
- Quiet Mode. Do not ask for confirmations
- -l, --username
- The user name for remote login
-
-----
-
-Thanks to the `ssh:ssh` command, you can connect to another running Apache Karaf instance:
-
-----
-karaf@root()> ssh:ssh -p 8101 karaf@192.168.134.2
-Connecting to host 192.168.134.2 on port 8101
-Connecting to unknown server. Add this server to known hosts ? (y/n)
-Storing the server key in known_hosts.
-Connected
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-When you don't provide the `command` argument to the `ssh:ssh` command, you are in the interactive mode: you have
-a complete remote console available, where you can type commands, etc.
-
-You can also provide directly a command to execute using the `command` argument. For instance, to remotely shutdown
-a Apache Karaf instance:
-
-----
-karaf@root()> ssh:ssh -p 8101 karaf@localhost system:shutdown -f
-Connecting to host localhost on port 8101
-Connected
-----
-
-As the `ssh:ssh` command is a pure SSH client, so it means that you can connect to a Unix OpenSSH daemon:
-
-----
-karaf@root()> ssh:ssh user@localhost
-Connecting to host localhost on port 22
-Connecting to unknown server. Add this server to known hosts ? (y/n)
-Storing the server key in known_hosts.
-Agent authentication failed, falling back to password authentication.
-Password: Connected
-Last login: Sun Sep 8 19:21:12 2013
-user@server:~$
-----
-
-h4. Apache Karaf client
-
-The `ssh:ssh` command requires to be run into a running Apache Karaf console.
-
-For commodity, the `ssh:ssh` command is "wrapped" as a standalone client: the `bin/client` Unix script (`bin\client.bat` on Windows).
-
-----
-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
-----
-
-For instance, to connect to local Apache Karaf instance (on the default SSHd server 8101 port), you can directly use
-`bin/client` Unix script (`bin\client.bat` on Windows) without any argument or option:
-
-----
-bin/client
-Logging in as karaf
-343 [pool-2-thread-4] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
- __ __ ____
- / //_/____ __________ _/ __/
- / ,< / __ `/ ___/ __ `/ /_
- / /| |/ /_/ / / / /_/ / __/
- /_/ |_|\__,_/_/ \__,_/_/
-
- Apache Karaf (3.0.0)
-
-Hit '<tab>' for a list of available commands
-and '[cmd] --help' for help on a specific command.
-Hit 'system:shutdown' to shutdown Karaf.
-Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session.
-
-karaf@root()>
-----
-
-When you don't provide the `command` argument to the `bin/client` Unix script (`bin\client.bat` on Windows), you are
-in the interactive mode: you have a complete remote console available, where you can type commands, etc.
-
-You can also provide directly a command to execute using the `command` argument. For instance, to remotely shutdown
-a Apache Karaf instance:
-
-----
-bin/client "system:shutdown -f"
-Logging in as karaf
-330 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
-----
-
-As the Apache Karaf client is a pure SSH client, you can use to connect to any SSHd daemon (like Unix OpenSSH daemon):
-
-----
-bin/client -a 22 -h localhost -u user
-Logging in as user
-353 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at localhost/127.0.0.1:22 presented unverified key:
-Password:
-Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-13-generic x86_64)
-
- * Documentation: https://help.ubuntu.com/
-
-Last login: Tue Dec 3 18:18:31 2013 from localhost
-----
-
-h4. Logout
-
-When you are connected to a remote Apache Karaf console, you can logout using:
-
-* using CTRL-D key binding. Note that CTRL-D just logout from the remote console in this case, it doesn't shutdown
- the Apache Karaf instance (as CTRL-D does when used on a local console).
-* using `shell:logout` command (or simply `logout`)
-
-=== Filsystem clients
-
-Apache Karaf SSHd server also provides complete fileystem access via SSH. For security reason, the available filesystem
-is limited to `KARAF_BASE` directory.
-
-You can use this remote filesystem with any SCP/SFTP compliant clients.
-
-h4. Native SCP/SFTP clients
-
-On Unix, you can directly use `scp` command to download/upload files to the Apache Karaf filesystem. For instance,
-to retrieve the `karaf.log` file remotely:
-
-----
-~$ scp -P 8101 karaf@localhost:/data/log/karaf.log .
-Authenticated with partial success.
-Authenticated with partial success.
-Authenticated with partial success.
-Password authentication
-Password:
-karaf.log
-----
-
-As you have access to the complete `KARAF_BASE` directory, you can remotely change the configuration file in the `etc`
-folder, retrieve log files, populate the `system` folder.
-
-On Windows, you can use WinSCP to access the Apache Karaf filesystem.
-
-It's probably easier to use a SFTP complient client.
-
-For instance, on Unix system, you can use `lftp` or `ncftp`:
-
-----
-$ lftp
-lftp :~> open -u karaf sftp://localhost:8101
-Password:
-lftp karaf@localhost:~> ls
--rw-r--r-- 1 jbonofre jbonofre 27754 Oct 26 10:50 LICENSE
--rw-r--r-- 1 jbonofre jbonofre 1919 Dec 3 05:34 NOTICE
--rw-r--r-- 1 jbonofre jbonofre 3933 Aug 18 2012 README
--rw-r--r-- 1 jbonofre jbonofre 101041 Dec 3 05:34 RELEASE-NOTES
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 bin
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 18:57 data
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 demos
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 deploy
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 17:59 etc
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 instances
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 13:02 lib
--rw-r--r-- 1 jbonofre jbonofre 0 Dec 3 13:02 lock
-drwxr-xr-x 1 jbonofre jbonofre 4096 Dec 3 12:51 system
-lftp karaf@localhost:/>
-----
-
-You can also use graphic client like `filezilla`, `gftp`, `nautilus`, etc.
-
-On Windows, you can use `filezilla`, `WinSCP`, etc.
-
-h4. Apache Maven
-
-Apache Karaf `system` folder is the Karaf repository, that use a Maven directory structure. It's where Apache Karaf
-looks for the artifacts (bundles, features, kars, etc).
-
-Using Apache Maven, you can populate the `system` folder using the `deploy:deploy-file` goal.
-
-For instance, you want to add the Apache ServiceMix facebook4j OSGi bundle, you can do:
-
-----
-mvn deploy:deploy-file -Dfile=org.apache.servicemix.bundles.facebook4j-2.0.2_1.jar -DgroupId=org.apache.servicemix.bundles -DartifactId=org.apache.servicemix.bundles.facebook4j -Dversion=2.0.2_1 -Dpackaging=jar -Durl=scp://localhost:8101/system
-----
-
-{tip}
-If you want to turn Apache Karaf as a simple Maven repository, you can use [Apache Karaf Cave|http://karaf.apache.org/index/subprojects/cave.html].
-{tip}
-
-== JMX MBeanServer
-
-Apache Karaf provides a JMX MBeanServer.
-
-This MBeanServer is available remotely, using any JMX client like `jconsole`.
-
-You can find details on the [Monitoring section|monitoring] of the user guide.
\ No newline at end of file
[08/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp b/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp
deleted file mode 100644
index 5888547..0000000
--- a/manual/src/main/webapp/WEB-INF/scalate/layouts/print.ssp
+++ /dev/null
@@ -1,817 +0,0 @@
-<%--
-Copyright (C) 2009-2010 the original author or authors.
-See the notice.md file distributed with this work for additional
-information regarding copyright ownership.
-
-Licensed 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.
---%>
-<%@ var body: String %>
-<%@ var title: String = "Apache Karaf ${karaf.version} Guides" %>
-<% escapeMarkup = false %>
-<!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>${title}</title>
-</head>
-<body>
- <div id="titlepage">
- <div id="title">Apache Karaf</div>
- <div id="subtitle">Version ${karaf.version}</div>
- </div>
- <div id="main">
- <%= body %>
- </div>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/WEB-INF/web.xml b/manual/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index d461465..0000000
--- a/manual/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2009-2010 the original author or authors.
- See the notice.md file distributed with this work for additional
- information regarding copyright ownership.
-
- Licensed 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.
-
--->
-
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
-
- <display-name>Apache Karaf Documentation</display-name>
-
- <description>
- Apache Karaf Documentation
- </description>
-
- <filter>
- <filter-name>TemplateEngineFilter</filter-name>
- <filter-class>org.fusesource.scalate.servlet.TemplateEngineFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>TemplateEngineFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <welcome-file-list>
- <welcome-file>index.conf</welcome-file>
- </welcome-file-list>
-
- <error-page>
- <error-code>500</error-code>
- <location>/WEB-INF/scalate/errors/500.scaml</location>
- </error-page>
-</web-app>
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/_banner.ssp
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/_banner.ssp b/manual/src/main/webapp/_banner.ssp
deleted file mode 100644
index 1f9c27d..0000000
--- a/manual/src/main/webapp/_banner.ssp
+++ /dev/null
@@ -1,14 +0,0 @@
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td align="left" class="topbardiv" nowrap="">
-<a href="http://karaf.apache.org/" title="A server side OSGi distribution">
- <img border="0" src="${uri("/images/karaf-logo.png")}" width="400px"></img>
-</a>
- </td>
- <td align="right" nowrap="">
-<a href="http://www.apache.org/" title="The Apache Sofware Foundation">
- <img border="0" src="${uri("/images/asf-logo.png")}">
-</a>
- </td>
- </tr>
- </table>
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/_navigation.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/_navigation.conf b/manual/src/main/webapp/_navigation.conf
deleted file mode 100644
index 7be5518..0000000
--- a/manual/src/main/webapp/_navigation.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-h3. [Home|/index]
-
-- [Overview]
-- [Quick Start]
-
-h3. [Users Guide|/users-guide/index]
-
-- [Installation|/users-guide/installation]
-- [Directory structure|/users-guide/directory-structure]
-- [Start, stop, restart, connect|/users-guide/start-stop]
-- [Integration in the operating system: the Service Wrapper|/users-guide/wrapper]
-- [Console|/users-guide/console]
-- [Remote|/users-guide/remote]
-- [Log|/users-guide/log]
-- [Configuration|/users-guide/configuration]
-- [Artifacts repositories and URLs|/users-guide/urls]
-- [Provisioning and features|/users-guide/provisioning]
-- [Deployers|/users-guide/deployers]
-- [KAR|/users-guide/kar]
-- [Instances|/users-guide/instances]
-- [Security|/users-guide/security]
-- [OBR|/users-guide/obr]
-- [Enterprise|/users-guide/enterprise]
--- [WebContainer (JSP/Servlet)|/users-guide/webcontainer]
--- [Naming (JNDI)|/users-guide/jndi]
--- [Transaction (JTA)|/users-guide/jta]
--- [DataSource (JDBC)|/users-guide/jdbc]
--- [MOM (JMS)|/users-guide/jms]
--- [Persistence (JPA)|/users-guide/jpa]
--- [EJB|/users-guide/ejb]
--- [CDI|/users-guide/cdi]
--- [HA/failover and cluster|/users-guide/failover]
-- [Monitoring and Management using JMX|/users-guide/monitoring]
-- [WebConsole|/users-guide/webconsole]
-- [Tuning|/users-guide/tuning]
-
-h3. [Developers Guide|/developers-guide/index]
-
-- [Developer commands|/developers-guide/developer-commands]
-- [Scripting|/developers-guide/scripting]
-- [Programmatically connect|/developers-guide/connect]
-- [Branding|/developers-guide/branding]
-- [Extending|/developers-guide/extending]
-- [Karaf Maven plugin|/developers-guide/karaf-maven-plugin]
-- [Custom distribution|/developers-guide/custom-distribution]
-- [OSGi services|/developers-guide/services]
-- [Create OSGi bundle|/developers-guide/creating-bundles]
-- [Blueprint|/developers-guide/blueprint]
-- [CDI|/developers-guide/cdi]
-- [Maven Archetypes|/developers-guide/archetypes]
-- [Security Framework|/developers-guide/security-framework]
-- [Troubleshooting, Debugging, Profiling|/developers-guide/debugging]
-- [Integration testing|/developers-guide/writing-tests]
-- [Github Contributions|/developers-guide/github-contributions]
-
-h3. [Commands|/commands/commands]
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/_quicklinks.ssp
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/_quicklinks.ssp b/manual/src/main/webapp/_quicklinks.ssp
deleted file mode 100644
index 1594d7e..0000000
--- a/manual/src/main/webapp/_quicklinks.ssp
+++ /dev/null
@@ -1,8 +0,0 @@
-<p>
-<a href="${uri("/index.html")}" title="Home">Home</a>
-|
-<a href="${uri("/users-guide/index.html")}" title="Users Guide">Users Guide</a>
-|
-<a href="${uri("/developers-guide/index.html")}" title="Developers Guide">Developers Guide</a>
-</p>
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/css/pygmentize.css
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/css/pygmentize.css b/manual/src/main/webapp/css/pygmentize.css
deleted file mode 100644
index 80efdcd..0000000
--- a/manual/src/main/webapp/css/pygmentize.css
+++ /dev/null
@@ -1,134 +0,0 @@
-.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; }
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/css/scalate/console.css
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/css/scalate/console.css b/manual/src/main/webapp/css/scalate/console.css
deleted file mode 100644
index 4b2dfe7..0000000
--- a/manual/src/main/webapp/css/scalate/console.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (C) 2009-2010 the original author or authors.
- * See the notice.md file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Licensed 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.
- */
-
-#scalate-console {
- position:fixed;
- top:40px;
- right:10px;
- background: #FDFCAD;
- padding:10px;
- border: 1px solid #BDBD81;
- font-family:Arial,Verdana,Helvetica,sans-serif;
- font-size: 80%;
- max-width: 400px;
-}
-
-#scalate-console .archetypes ul, #scalate-console .templates ul, #scalate-console .resources ul, #scalate-console .layouts ul {
- padding-left:20px;
- overflow: auto;
-}
-
-#scalate-console .toggle {
- text-align: right;
-}
-
-#scalate-console .toggle img {
- vertical-align: middle;
-}
-
-#scalate-console div.attributes {
- margin: 10px;
- overflow: auto;
- background: white;
-}
-
-#scalate-console div.attributes table th {
- text-align: left;
- color: #993333;
-}
-#scalate-console div.attributes table td {
- padding:2px;
- border-top: 1px solid #BDBD81;
-}
-
-#scalate-console div.body {
- margin: 10px;
- overflow: auto;
- max-height: 300px;
- background: white;
-}
-
-#scalate-console div.systemProperties {
- margin: 10px;
- overflow: auto;
- max-height: 300px;
- background: white;
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/css/style.css
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/css/style.css b/manual/src/main/webapp/css/style.css
deleted file mode 100644
index 496901e..0000000
--- a/manual/src/main/webapp/css/style.css
+++ /dev/null
@@ -1,1588 +0,0 @@
-/**
- * Copyright (C) 2009-2010 the original author or authors.
- * See the notice.md file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * Licensed 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.
- */
-body {
- margin: 0;
- padding: 0;
-}
-
-#cell-0-0 { background: white url( '../images/bg02-white-left-nogr.png' ) repeat-y right top; }
-#cell-0-1 { height: 1em; width: 85%; }
-#cell-0-2 { background: transparent url( '../images/bg02-white-right-nogr.png' ) repeat-y left top; }
-#cell-1-0 { background: transparent url( '../images/bg.png' ) repeat-x top; }
-#cell-1-1 { background: transparent url( '../images/bg02-blue-left.png' ) no-repeat right top; width:13px; }
-#cell-1-2 { background: transparent url( '../images/bg.png' ) repeat-x top; width:85%; }
-#banner { height: 80px; }
-#cell-1-3 { background: transparent url( '../images/bg02-blue-right.png' ) no-repeat left top; width:13px; }
-#cell-1-4 { background: transparent url( '../images/bg.png' ) repeat-x top; }
-#cell-2-0 { background: white url( '../images/bg02-white-left-nogr.png' ) repeat-y right top; }
-#cell-2-1 { height: 1em; width: 85%; }
-#cell-2-2 { background: white url( '../images/bg02-white-right-nogr.png' ) repeat-y left top; }
-#cell-3-0 { background: transparent url( '../images/bg.png' ) repeat-x top; }
-#cell-3-1 { background: transparent url( '../images/bg02-blue-left.png' ) no-repeat right top; width:13px; }
-#cell-3-2 { background: transparent url( '../images/bg.png' ) repeat-x top; width:85%; }
-#cell-3-3 { background: transparent url( '../images/bg02-blue-right.png' ) no-repeat left top; width:13px; }
-#cell-3-4 { background: transparent url( '../images/bg.png' ) repeat-x top; }
-#cell-4-0 { background: white url( '../images/bg02-white-left-nogr.png' ) repeat-y right top; }
-#cell-4-1 { height: 1em; width: 85%; }
-#cell-4-2 { background: transparent url( '../images/bg02-white-right-nogr.png' ) repeat-y left top; }
-
-#banner {
- margin: 0px 20px;
- padding: 0px 50px 0px 50px;
- font-size: 200%;
- text-align: center;
- background: transparent;
-}
-#top-menu {
- margin: 0px 25px;
- padding: 2px;
- line-height: 100%;
- font-family: Verdana, arial, sans-serif;
- font-weight: bold;
- font-size: 11px;
- color: white;
- line-height: 13px;
- overflow: none;
-}
-#top-menu a:link, #top-menu a:visited {
- color: #ffffff;
- text-decoration: none;
-}
-#top-menu a:active, #top-menu a:hover {
- color: #5b8fbe;
- text-decoration: underline;
-}
-#top-menu sup img {
- height: 0px;
- width: 0px;
-}
-
-#footer {
- padding: 0px 50px 0px 50px;
- min-height: 0em;
- text-align: center;
- color: white;
- font-size: 65%;
- font-family: Verdana, arial, sans-serif;
-}
-#site-footer {
- margin: 5px;
-}
-#footer a:link, #footer a:visited {
- color: white;
- text-decoration: none;
-}
-#footer a:hover {
- color: white;
- text-decoration: underline;
-}
-
-#wrapper-menu-page-right {
- background: transparent url( '../images/left-box-right.png' ) repeat-y right;
-}
-
-#wrapper-menu-page-bottom {
- background: transparent url( '../images/left-box-bottom.png' ) no-repeat right bottom;
-}
-
-#wrapper-menu-page-top {
- background: transparent url( '../images/left-box-top.png' ) no-repeat right top;
-}
-
-#menu-page {
- width: 200px;
- color: #5b8fbe;
- font-family: Verdana, arial, sans-serif;
- font-weight: bold;
- margin: 0px;
- padding: 17px 11px 17px 0px;
- text-align: left;
- margin-left: 0px;
- line-height: 1em;
-}
-
-#menu-page ul {
- margin: 0;
- padding: 0;
- padding-left: 35px;
- font-size: 75%;
-}
-
-#menu-page h3 {
- font-size: 75%;
- text-transform: uppercase;
- margin: 1em 0 0.3em 0;
- color: #5b8fbe;
- font-weight: normal;
- letter-spacing: 0.15em;
- background: url('../images/big-bullet.png') no-repeat 0pt;
- background-position:left center;
- margin-left:15px;
- padding-left: 20px;
- font-family: Verdana, arial, sans-serif;
- font-weight: bold;
-}
-
-#menu-page a:link, #menu-page a:visited {
- color: black;
-}
-
-#menu-page a:hover {
- color: #5b8fbe;
-}
-
-#content {
- padding: 20px 0px 0px 0px;
- display: block;
- text-align: left;
- height: 100%;
- width: 100%;
- color: black;
-}
-
-h2 {
- font-size: 110%;
-}
-
-h3 {
- font-size: 100%;
-}
-
-a:link, a:visited {
- color: #5b8fbe;
- text-decoration: none;
-}
-
-a:hover {
- color: #666;
- text-decoration: none;
-}
-
-
-table.align {
- padding: 0px;
- border: none;
-}
-
-td.align {
- padding: 0px;
- border: none;
-}
-
-/*********************************************************************
- CSS Elements that are part of the confluence rendered xhtml
- *********************************************************************/
-.wiki-content {
- font-family: Verdana, arial, sans-serif;
- font-size: 11px;
- line-height: 16px;
- color: #000000;
- font-weight: normal;
- padding-top: 10px;
- padding-bottom: 10px;
-}
-
-/*
-** when this stylesheet is used for the Tiny MCE Wysiwyg editor's edit area, we can't
-** use an id=PageContent or class=wiki-content, so we must
-** set the body style to that used for PageContent, and p to that used for wiki-content.
-*/
-
-.monospaceInput {
- font:12px monospace
-}
-
-.wiki-content p, .commentblock p {
- margin: 16px 0px 16px 0px;
- padding: 0px;
-}
-
-.wiki-content-preview {
- padding: 5px;
- border-left: 1px solid #3c78b5;
- border-right: 1px solid #3c78b5;
-}
-
-ul, ol {
- margin-top: 2px;
- margin-bottom: 2px;
- padding-top: 0px;
- padding-bottom: 0px;
-}
-
-pre {
- padding: 0px;
- margin-top: 5px;
- margin-left: 15px;
- margin-bottom: 5px;
- margin-right: 5px;
- text-align: left;
-}
-
-.helpheading {
- font-weight: bold;
- background-color: #D0D9BD;
- border-bottom: 1px solid #3c78b5;
- padding: 4px 4px 4px 4px;
- margin: 0px;
- margin-top: 10px;
-}
-.helpcontent {
- padding: 4px 4px 20px 4px;
- background-color: #f5f7f1;
-}
-
-.code {
- border: 1px dashed #3c78b5;
- font-size: 11px;
- font-family: Courier;
- margin: 10px;
- line-height: 13px;
-}
-
-.focusedComment {
- background: #ffffce;
-}
-
-.commentBox, .focusedComment {
- padding: 10px;
- margin: 5px 0 5px 0;
- border: 1px #bbb solid;
-}
-
-.codeHeader {
- background-color: #f0f0f0;
- border-bottom: 1px dashed #3c78b5;
- padding: 3px;
- text-align: center;
-}
-
-.codeContent {
- text-align: left;
- background-color: #f0f0f0;
- padding: 3px;
-}
-
-.preformatted {
- border: 1px dashed #3c78b5;
- font-size: 11px;
- font-family: Courier;
- margin: 10px;
- line-height: 13px;
-}
-
-.preformattedHeader {
- background-color: #f0f0f0;
- border-bottom: 1px dashed #3c78b5;
- padding: 3px;
- text-align: center;
-}
-
-.preformattedContent {
- background-color: #f0f0f0;
- padding: 3px;
-}
-
-.panel {
- border: 1px dashed #3c78b5;
- margin: 10px;
- margin-top: 0px;
-}
-
-.panelHeader {
- background-color: #f0f0f0;
- border-bottom: 1px dashed #3c78b5;
- padding: 3px;
- text-align: center;
-}
-
-.panelContent {
- background-color: #f0f0f0;
- padding: 5px;
-}
-
-.anonymousAlert {
- background-color: #f0f0f0;
- border: 1px dashed red;
- font-size: 11px;
- padding: 10px 5px 10px 5px;
- margin: 4px;
- line-height: 13px;
-}
-
-.lockAlert {
- background-color: #f0f0f0;
- width: 50%;
- border: 1px dashed red;
- font-size: 11px;
- padding: 10px 5px 10px 5px;
- margin: 4px;
- line-height: 13px;
-}
-
-
-.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;
-}
-
-.breadcrumbs {
- background-color: #f0f0f0;
- border-color: #3c78b5;
- border-width: 1px 0px 1px 0px;
- border-style: solid;
- font-size: 11px;
- padding: 3px 0px 3px 0px;
-}
-
-.navmenu {
- border: 1px solid #ccc;
-}
-
-.menuheading {
- font-weight: bold;
- background-color: #f0f0f0;
- border-bottom: 1px solid #3c78b5;
- padding: 4px 4px 2px 4px;
-}
-
-.menuitems {
- padding: 4px 4px 20px 4px;
-}
-
-.rightpanel {
- border-left: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
-}
-
-#helpheading {
- text-align: left;
- font-weight: bold;
- background-color: #D0D9BD;
- border-bottom: 1px solid #3c78b5;
- padding: 4px 4px 4px 4px;
- margin: 0px;
-}
-#helpcontent {
- padding: 4px 4px 4px 4px;
- background-color: #f5f7f1;
-}
-.helptab-unselected {
- font-weight: bold;
- padding: 5px;
- background-color: #f5f7f1;
-}
-.helptab-selected {
- font-weight: bold;
- background-color: #D0D9BD;
- padding: 5px;
-}
-.helptabs {
- margin: 0px;
- background-color: #f5f7f1;
- padding: 5px;
-}
-.infopanel-heading {
- font-weight: bold;
- padding: 4px 0px 2px 0px;
-}
-
-.pagebody {
-}
-
-.pageheader {
- padding: 5px 5px 5px 0px;
- border-bottom: 1px solid #3c78b5;
-}
-
-.steptitle {
- font-size: 18px;
- font-weight: bold;
- font-family: Arial, sans-serif;
- color: #003366;
- margin-bottom: 7px;
-}
-
-.substeptitle {
- font-size: 12px;
- font-weight: bold;
- font-family: Arial, sans-serif;
- color: #003366;
- margin: 2px 4px 4px 4px;
- padding: 2px 4px 1px 4px;
-}
-
-.stepdesc {
- font-family: Verdana, arial, sans-serif;
- font-size: 11px;
- line-height: 16px;
- font-weight: normal;
- color: #666666;
- margin-top: 7px;
- margin-bottom: 7px;
-}
-
-.steplabel {
- font-weight: bold;
- margin-right: 4px;
- color: black;
- float: left;
- width: 15%;
- text-align: right;
-}
-
-.stepfield {
- background: #f0f0f0;
- padding: 5px;
-}
-
-.submitButtons{
- margin-top:5px;
- text-align:right;
-}
-
-.formtitle {
- font-size: 12px;
- font-weight: bold;
- font-family: Arial, sans-serif;
- color: #003366;
-}
-
-.sectionbottom {
- border-bottom: 1px solid #3c78b5;
-}
-
-.topRow {
- border-top: 2px solid #3c78b5;
-}
-
-.tabletitle {
- font-size: 14px;
- font-weight: bold;
- font-family: Arial, sans-serif;
- padding: 3px 0px 2px 0px;
- margin: 8px 4px 2px 0px;
- color: #003366;
- border-bottom: 2px solid #3c78b5;
-}
-.pagesubheading {
- color: #666666;
- font-size: 10px;
- padding: 0px 0px 5px 0px;
-}
-
-HR {
- color: 3c78b5;
- height: 1;
-}
-
-A:link, A:visited, A:active, A:hover {
- color: #5b8fbe;
-}
-
-A:hover {
- text-decoration: underline;
-}
-
-h1 A:link, h1 A:visited, h1 A:active {
- text-decoration: none;
-}
-
-h1 A:hover {
- border-bottom: 1px dotted #003366;
-}
-
-.wiki-content > :first-child, .commentblock > :first-child {
- margin-top: 3px;
-}
-
-.logocell {
- padding: 10px;
-}
-
-input {
- font-family: verdana, geneva, arial, sans-serif;
- font-size: 11px;
- color: #000000;
-}
-
-textarea, textarea.editor {
- font-family: verdana, geneva, arial, sans-serif;
- font-size: 11px;
- color: #333333;
-}
-
-/* use logoSpaceLink instead.
-.spacenametitle {
- font: 21px/31px Impact, Arial, Helvetica;
- font-weight: 100;
- color: #999999;
- margin: 0px;
-}
-.spacenametitle img {
- margin: 0 0 -4px 0;
-}
-.spacenametitle a {
- text-decoration: none;
- color: #999999;
-}
-.spacenametitle a:visited {
- text-decoration: none;
- color: #999999;
-}*/
-
-.spacenametitle-printable {
- font: 20px/25px Impact, Arial, Helvetica;
- font-weight: 100;
- color: #999999;
- margin: 0px;
-}
-.spacenametitle-printable a {
- text-decoration: none;
- color: #999999;
-}
-.spacenametitle-printable a:visited {
- text-decoration: none;
- color: #999999;
-}
-
-.blogDate {
- font-weight: bold;
- text-decoration: none;
- color: black;
-}
-
-.blogSurtitle {
- background: #f0f0f0;
- border: 1px solid #ddd;
- padding: 3px;
- margin: 1px 1px 10px 1px;
-}
-
-.blogHeading {
- font-size: 20px;
- line-height: normal;
- font-weight: bold;
- padding: 0px;
- margin: 0px;
-}
-
-.blogHeading a {
- text-decoration: none;
- color: black;
-}
-
-.endsection {
- align: right;
- color: #666666;
- margin-top: 10px;
-}
-.endsectionleftnav {
- align: right;
- color: #666666;
- margin-top: 10px;
-}
-
-h1 {
- font-size: 24px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- color: #003366;
- border-bottom: 1px solid #3c78b5;
- padding: 2px;
- margin: 36px 0px 4px 0px;
-}
-
-h2 {
- font-size: 18px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- border-bottom: 1px solid #3c78b5;
- padding: 2px;
- margin: 27px 0px 4px 0px;
-}
-
-h3 {
- font-size: 14px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- padding: 2px;
- margin: 21px 0px 4px 0px;
-}
-
-h4 {
- font-size: 12px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- padding: 2px;
- margin: 18px 0px 4px 0px;
-}
-
-h4.search {
- font-size: 12px;
- line-height: normal;
- font-weight: normal;
- background-color: #f0f0f0;
- padding: 4px;
- margin: 18px 0px 4px 0px;
-}
-
-h5 {
- font-size: 10px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- padding: 2px;
- margin: 14px 0px 4px 0px;
-}
-
-h6 {
- font-size: 8px;
- line-height: normal;
- font-weight: bold;
- background-color: #f0f0f0;
- padding: 2px;
- margin: 14px 0px 4px 0px;
-}
-
-.smallfont {
- font-size: 10px;
-}
-.descfont {
- font-size: 10px;
- color: #666666;
-}
-.smallerfont {
- font-size: 9px;
-}
-.smalltext {
- color: #666666;
- font-size: 10px;
-}
-.smalltext a {
- color: #666666;
-}
-.smalltext-blue {
- color: #3c78b5;
- font-size: 10px;
-}
-.surtitle {
- margin-left: 1px;
- margin-bottom: 5px;
- font-size: 14px;
- color: #666666;
-}
-
-/* css hack found here: http://www.fo3nix.pwp.blueyonder.co.uk/tutorials/css/hacks/ */
-.navItemOver { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #003366; cursor: hand; voice-family: '\'}\''; voice-family:inherit; cursor: pointer;}
-.navItemOver a { color: #ffffff; background-color:#003366; text-decoration: none; }
-.navItemOver a:visited { color: #ffffff; background-color:#003366; text-decoration: none; }
-.navItemOver a:hover { color: #ffffff; background-color:#003366; text-decoration: none; }
-.navItem { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; }
-.navItem a { color: #ffffff; text-decoration: none; }
-.navItem a:hover { color: #ffffff; text-decoration: none; }
-.navItem a:visited { color: #ffffff; text-decoration: none; }
-
-div.padded { padding: 4px; }
-div.thickPadded { padding: 10px; }
-h3.macrolibrariestitle {
- margin: 0px 0px 0px 0px;
-}
-
-div.centered { text-align: center; margin: 10px; }
-div.centered table {margin: 0px auto; text-align: left; }
-
-.tableview table {
- margin: 0;
-}
-
-.tableview th {
- text-align: left;
- color: #003366;
- font-size: 12px;
- padding: 5px 0px 0px 5px;
- border-bottom: 2px solid #3c78b5;
-}
-.tableview td {
- text-align: left;
- border-color: #ccc;
- border-width: 0px 0px 1px 0px;
- border-style: solid;
- margin: 0;
- padding: 4px 10px 4px 5px;
-}
-
-.grid {
- margin: 2px 0px 5px 0px;
- border-collapse: collapse;
-}
-.grid th {
- border: 1px solid #ccc;
- padding: 2px 4px 2px 4px;
- background: #f0f0f0;
- text-align: center;
-}
-.grid td {
- border: 1px solid #ccc;
- padding: 3px 4px 3px 4px;
-}
-.gridHover {
- background-color: #f9f9f9;
-}
-
-td.infocell {
- background-color: #f0f0f0;
-}
-.label {
- font-weight: bold;
- color: #003366;
-}
-.error {
- background-color: #fcc;
-}
-
-.errorBox {
- background-color: #fcc;
- border: 1px solid #c00;
- padding: 5px;
- margin: 5px;
-}
-
-.errorMessage {
- color: #c00;
-}
-
-.success {
- background-color: #dfd;
-}
-
-.successBox {
- background-color: #dfd;
- border: 1px solid #090;
- padding: 5px;
- margin-top:5px;
- margin-bottom:5px;
-}
-
-blockquote {
- padding-left: 10px;
- padding-right: 10px;
- margin-left: 5px;
- margin-right: 0px;
- border-left: 1px solid #3c78b5;
-}
-
-table.confluenceTable
-{
- margin: 5px;
- border-collapse: collapse;
-}
-
-/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
-table.confluenceTable td.confluenceTd
-{
- border-width: 1px;
- border-style: solid;
- border-color: #ccc;
- padding: 3px 4px 3px 4px;
-}
-
-/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
-table.confluenceTable th.confluenceTh
-{
- border-width: 1px;
- border-style: solid;
- border-color: #ccc;
- padding: 3px 4px 3px 4px;
- background-color: #f0f0f0;
- text-align: center;
-}
-
-td.confluenceTd
-{
- border-width: 1px;
- border-style: solid;
- border-color: #ccc;
- padding: 3px 4px 3px 4px;
-}
-
-th.confluenceTh
-{
- border-width: 1px;
- border-style: solid;
- border-color: #ccc;
- padding: 3px 4px 3px 4px;
- background-color: #f0f0f0;
- text-align: center;
-}
-
-DIV.small {
- font-size: 9px;
-}
-
-H1.pagename {
- margin-top: 0px;
-}
-
-IMG.inline {}
-
-.loginform {
- margin: 5px;
- border: 1px solid #ccc;
-}
-
-/* The text how the "This is a preview" comment should be shown. */
-.previewnote { text-align: center;
- font-size: 11px;
- color: red; }
-
-/* How the preview content should be shown */
-.previewcontent { background: #E0E0E0; }
-
-/* How the system messages should be shown (DisplayMessage.jsp) */
-.messagecontent { background: #E0E0E0; }
-
-/* How the "This page has been modified..." -comment should be shown. */
-.conflictnote { }
-
-.createlink {
- color: maroon;
-}
-a.createlink {
- color: maroon;
-}
-.templateparameter {
- font-size: 9px;
- color: darkblue;
-}
-
-.diffadded {
- background: #ddffdd;
- padding: 1px 1px 1px 4px;
- border-left: 4px solid darkgreen;
-}
-.diffdeleted {
- color: #999;
- background: #ffdddd;
- padding: 1px 1px 1px 4px;
- border-left: 4px solid darkred;
-}
-.diffnochange {
- padding: 1px 1px 1px 4px;
- border-left: 4px solid lightgrey;
-}
-.differror {
- background: brown;
-}
-.diff {
- font-family: lucida console, courier new, fixed-width;
- font-size: 12px;
- line-height: 14px;
-}
-.diffaddedchars {
- background-color:#99ff99;
- font-weight:bolder;
-}
-.diffremovedchars {
- background-color:#ff9999;
- text-decoration: line-through;
- font-weight:bolder;
-}
-
-.greybackground {
- background: #f0f0f0
-}
-
-.greybox {
- border: 1px solid #ddd;
- padding: 3px;
- margin: 1px 1px 10px 1px;
-}
-
-.borderedGreyBox {
- border: 1px solid #cccccc;
- background-color: #f0f0f0;
- padding: 10px;
-}
-
-.greyboxfilled {
- border: 1px solid #ddd;
- padding: 5px;
- margin: 10px 1px 10px 1px;
- background: #f0f0f0;
-}
-
-.navBackgroundBox {
- padding: 5px 5px 5px 5px;
- font-size: 22px;
- font-weight: bold;
- font-family: Arial, sans-serif;
- color: white;
- background: #3c78b5;
- text-decoration: none;
-}
-
-.previewBoxTop {
- background-color: #f0f0f0;
- border-width: 1px 1px 0px 1px;
- border-style: solid;
- border-color: #3c78b5;
- padding: 5px;
- margin: 5px 0px 0px 0px;
- text-align: center;
-}
-.previewContent {
- background-color: #fff;
- border-color: #3c78b5;
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- padding: 10px;
- margin: 0px;
-}
-.previewBoxBottom {
- background-color: #f0f0f0;
- border-width: 0px 1px 1px 1px;
- border-style: solid;
- border-color: #3c78b5;
- padding: 5px;
- margin: 0px 0px 5px 0px;
- text-align: center;
-}
-
-.functionbox {
- background-color: #f0f0f0;
- border: 1px solid #3c78b5;
- padding: 3px;
- margin: 1px 1px 10px 1px;
-}
-
-.functionbox-greyborder {
- background-color: #f0f0f0;
- border: 1px solid #ddd;
- padding: 3px;
- margin: 1px 1px 10px 1px;
-}
-
-.search-highlight {
- background-color: #ffffcc;
-}
-
-/* normal (white) background */
-.rowNormal {
- background-color: #ffffff;
- }
-
-/* alternate (pale yellow) background */
-.rowAlternate {
- background-color: #f7f7f7;
-}
-
-/* used in the list attachments table */
-.rowAlternateNoBottomColor {
- background-color: #f7f7f7;
-}
-
-.rowAlternateNoBottomNoColor {
-}
-
-.rowAlternateNoBottomColor td {
- border-bottom: 0px;
-}
-
-.rowAlternateNoBottomNoColor td {
- border-bottom: 0px;
-}
-
-/* row highlight (grey) background */
-.rowHighlight {
- background-color: #f0f0f0;
-
-}
-
-TD.greenbar {FONT-SIZE: 2px; BACKGROUND: #00df00; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
-TD.redbar {FONT-SIZE: 2px; BACKGROUND: #df0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
-TD.darkredbar {FONT-SIZE: 2px; BACKGROUND: #af0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
-
-TR.testpassed {FONT-SIZE: 2px; BACKGROUND: #ddffdd; PADDING: 0px; }
-TR.testfailed {FONT-SIZE: 2px; BACKGROUND: #ffdddd; PADDING: 0px; }
-
-.toolbar {
- margin: 0px;
- border-collapse: collapse;
-}
-
-.toolbar td {
- border: 1px solid #ccc;
- padding: 2px 2px 2px 2px;
- color: #ccc;
-}
-
-td.noformatting {
- border-width: 0px;
- border-style: none;
- text-align: center;
- padding: 0px;
-}
-
-.commentblock {
- margin: 12px 0 12px 0;
-}
-
-/*
- * Divs displaying the license information, if necessary.
- */
-.license-eval, .license-none, .license-nonprofit {
- border-top: 1px solid #bbbbbb;
- text-align: center;
- font-size: 10px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
-}
-
-.license-eval, .license-none {
- background-color: #ffcccc;
-}
-
-.license-eval b, .license-none b {
- color: #990000
-}
-
-.license-nonprofit {
- background-color: #ffffff;
-}
-
-/*
- * The shadow at the bottom of the page between the main content and the
- * "powered by" section.
- */
-.bottomshadow {
- height: 12px;
- background-image: url("$req.contextPath/images/border/border_bottom.gif");
- background-repeat: repeat-x;
-}
-
-/*
- * Styling of the operations box
- */
-.navmenu .operations li, .navmenu .operations ul {
- list-style: none;
- margin-left: 0;
- padding-left: 0;
-}
-
-.navmenu .operations ul {
- margin-bottom: 9px;
-}
-
-.navmenu .label {
- font-weight: inherit;
-}
-
-/*
- * Styling of ops as a toolbar
- */
-.toolbar div {
- display: none;
-}
-
-.toolbar .label {
- display: none;
-}
-
-.toolbar .operations {
- display: block;
-}
-
-.toolbar .operations ul {
- display: inline;
- list-style: none;
- margin-left: 10px;
- padding-left: 0;
-}
-
-.toolbar .operations li {
- list-style: none;
- display: inline;
-}
-
-/* list page navigational tabs */
-#foldertab {
-padding: 3px 0px 3px 8px;
-margin-left: 0;
-border-bottom: 1px solid #3c78b5;
-font: bold 11px Verdana, sans-serif;
-}
-
-#foldertab li {
-list-style: none;
-margin: 0;
-display: inline;
-}
-
-#foldertab li a {
-padding: 3px 0.5em;
-margin-left: 3px;
-border: 1px solid #3c78b5;
-border-bottom: none;
-background: #3c78b5;
-text-decoration: none;
-}
-
-#foldertab li a:link { color: #ffffff; }
-#foldertab li a:visited { color: #ffffff; }
-
-#foldertab li a:hover {
-color: #ffffff;
-background: #003366;
-border-color: #003366;
-}
-
-#foldertab li a.current {
-background: white;
-border-bottom: 1px solid white;
-color: black;
-}
-
-#foldertab li a.current:link { color: black; }
-#foldertab li a.current:visited { color: black; }
-#foldertab li a.current:hover {
-background: white;
-border-bottom: 1px solid white;
-color: black;
-}
-
-/* alphabet list */
-ul#squaretab {
-margin-left: 0;
-padding-left: 0;
-white-space: nowrap;
-font: bold 8px Verdana, sans-serif;
-}
-
-#squaretab li {
-display: inline;
-list-style-type: none;
-}
-
-#squaretab a {
-padding: 2px 6px;
-border: 1px solid #3c78b5;
-}
-
-#squaretab a:link, #squaretab a:visited {
-color: #fff;
-background-color: #3c78b5;
-text-decoration: none;
-}
-
-#squaretab a:hover {
-color: #ffffff;
-background-color: #003366;
-border-color: #003366;
-text-decoration: none;
-}
-
-#squaretab li a#current {
-background: white;
-color: black;
-}
-
-.blogcalendar * {
- font-family:verdana, arial, sans-serif;
- font-size:x-small;
- font-weight:normal;
- line-height:140%;
- padding:2px;
-}
-
-
-table.blogcalendar {
- border: 1px solid #3c78b5;
-}
-
-.blogcalendar th.calendarhead, a.calendarhead {
- font-size:x-small;
- font-weight:bold;
- padding:2px;
- text-transform:uppercase;
- background-color: #3c78b5;
- color: #ffffff;
- letter-spacing: .3em;
- text-transform: uppercase;
-}
-
-.calendarhead:visited {color: white;}
-.calendarhead:active {color: white;}
-.calendarhead:hover {color: white;}
-
-.blogcalendar th {
- font-size:x-small;
- font-weight:bold;
- padding:2px;
- background-color:#f0f0f0;
-}
-
-.blogcalendar td {
- font-size:x-small;
- font-weight:normal;
-}
-
-.searchGroup { padding: 0 0 10px 0; background: #f0f0f0; }
-.searchGroupHeading { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; padding: 2px 4px 1px 4px; }
-.searchItem { padding: 1px 4px 1px 4px; }
-.searchItemSelected { padding: 1px 4px 1px 4px; font-weight: bold; background: #ddd; }
-
-/* permissions page styles */
-.permissionHeading {
- border-bottom: #bbb; border-width: 0 0 1px 0; border-style: solid; font-size: 16px; text-align: left;
-}
-.permissionTab {
- border-width: 0 0 0 1px; border-style: solid; background: #3c78b5; color: #ffffff; font-size: 10px;
-}
-.permissionSuperTab {
- border-width: 0 0 0 1px; border-style: solid; background: #003366; color: #ffffff;
-}
-.permissionCell {
- border-left: #bbb; border-width: 0 0 0 1px; border-style: solid;
-}
-
-/* warning panel */
-.warningPanel { background: #FFFFCE; border:#F0C000 1px solid; padding: 8px; margin: 10px; }
-/* alert panel */
-.alertPanel { background: #FFCCCC; border:#C00 1px solid; padding: 8px; margin: 10px; }
-
-/* side menu highlighting (e.g. space content screen) */
-.optionPadded { padding: 2px; }
-.optionSelected { background-color: #ffffcc; padding: 2px; border: 1px solid #ddd; margin: -1px; }
-.optionSelected a { font-weight: bold; text-decoration: none; color: black; }
-
-/* information macros */
-.noteMacro { border-style: solid; border-width: 1px; border-color: #F0C000; background-color: #FFFFCE; text-align:left; margin-top: 5px; margin-bottom: 5px}
-.warningMacro { border-style: solid; border-width: 1px; border-color: #c00; background-color: #fcc; text-align:left; margin-top: 5px; margin-bottom: 5px}
-.infoMacro { border-style: solid; border-width: 1px; border-color: #3c78b5; background-color: #D8E4F1; text-align:left; margin-top: 5px; margin-bottom: 5px}
-.tipMacro { border-style: solid; border-width: 1px; border-color: #090; background-color: #dfd; text-align:left; margin-top: 5px; margin-bottom: 5px}
-.informationMacroPadding { padding: 5px 0 0 5px; }
-
-table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro td, table.sectionMacro td {
- border: none;
-}
-
-table.sectionMacroWithBorder td.columnMacro { border-style: dashed; border-width: 1px; border-color: #cccccc;}
-
-/* styles for links in the top bar */
-.topBarDiv a:link {color: #ffffff;}
-.topBarDiv a:visited {color: #ffffff;}
-.topBarDiv a:active {color: #ffffff;}
-.topBarDiv a:hover {color: #ffffff;}
-.topBarDiv {color: #ffffff;}
-
-.topBar {
- background-color: #003366;
-}
-
-
-/* styles for extended operations */
-.greyLinks a:link {color: #666666; text-decoration:underline;}
-.greyLinks a:visited {color: #666666; text-decoration:underline;}
-.greyLinks a:active {color: #666666; text-decoration:underline;}
-.greyLinks a:hover {color: #666666; text-decoration:underline;}
-.greyLinks {color: #666666; display:block; padding: 10px}
-
-.logoSpaceLink {color: #999999; text-decoration: none}
-.logoSpaceLink a:link {color: #999999; text-decoration: none}
-.logoSpaceLink a:visited {color: #999999; text-decoration: none}
-.logoSpaceLink a:active {color: #999999; text-decoration: none}
-.logoSpaceLink a:hover {color: #003366; text-decoration: none}
-
-/* basic panel (basicpanel.vmd) style */
-.basicPanelContainer {border: 1px solid #3c78b5; margin-top: 2px; margin-bottom: 8px; width: 100%}
-.basicPanelTitle {padding: 5px; margin: 0px; background-color: #f0f0f0; color: black; font-weight: bold;}
-.basicPanelBody {padding: 5px; margin: 0px}
-
-.separatorLinks a:link {color: white}
-.separatorLinks a:visited {color: white}
-.separatorLinks a:active {color: white}
-
-.greynavbar {background-color: #f0f0f0; border-top: 1px solid #3c78b5; margin-top: 2px}
-
-div.headerField {
- float: left;
- width: auto;
- height: 100%;
-}
-
-.headerFloat {
- margin-left: auto;
- width: 50%;
-}
-
-.headerFloatLeft {
- float: left;
- margin-right: 20px;
- margin-bottom: 10px;
-}
-
-#headerRow {
- padding: 10px;
-}
-
-div.license-personal {
- background-color: #003366;
- color: #ffffff;
-}
-
-div.license-personal a {
- color: #ffffff;
-}
-
-.greyFormBox {
- border: 1px solid #cccccc;
- padding: 5px;
-}
-
-/* IE automatically adds a margin before and after form tags. Use this style to remove that */
-.marginlessForm {
- margin: 0px;
-}
-
-.openPageHighlight {
- background-color: #ffffcc;
- padding: 2px;
- border: 1px solid #ddd;
-}
-
-.editPageInsertLinks, .editPageInsertLinks a
-{
- color: #666666;
- font-weight: bold;
- font-size: 10px;
-}
-
-/* Style for label heatmap. */
-.top10 a {
- font-weight: bold;
- font-size: 2em;
- color: #003366;
-}
-.top25 a {
- font-weight: bold;
- font-size: 1.6em;
- color: #003366;
-}
-.top50 a {
- font-size: 1.4em;
- color: #003366;
-}
-.top100 a {
- font-size: 1.2em;
- color: #003366;
-}
-
-.heatmap {
- list-style:none;
- width: 95%;
- margin: 0px auto;
-}
-
-.heatmap a {
- text-decoration:none;
-}
-
-.heatmap a:hover {
- text-decoration:underline;
-}
-
-.heatmap li {
- display: inline;
-}
-
-.minitab {
-padding: 3px 0px 3px 8px;
-margin-left: 0;
-margin-top: 1px;
-margin-bottom: 0px;
-border-bottom: 1px solid #3c78b5;
-font: bold 9px Verdana, sans-serif;
-text-decoration: none;
-float:none;
-}
-.selectedminitab {
-padding: 3px 0.5em;
-margin-left: 3px;
-margin-top: 1px;
-border: 1px solid #3c78b5;
-background: white;
-border-bottom: 1px solid white;
-color: #000000;
-text-decoration: none;
-}
-.unselectedminitab {
-padding: 3px 0.5em;
-margin-left: 3px;
-margin-top: 1px;
-border: 1px solid #3c78b5;
-border-bottom: none;
-background: #3c78b5;
-color: #ffffff;
-text-decoration: none;
-}
-
-a.unselectedminitab:hover {
-color: #ffffff;
-background: #003366;
-border-color: #003366;
-}
-
-a.unselectedminitab:link { color: white; }
-a.unselectedminitab:visited { color: white; }
-
-a.selectedminitab:link { color: black; }
-a.selectedminitab:visited { color: black; }
-
-.linkerror { background-color: #fcc;}
-
-a.labelOperationLink:link {text-decoration: underline}
-a.labelOperationLink:active {text-decoration: underline}
-a.labelOperationLink:visited {text-decoration: underline}
-a.labelOperationLink:hover {text-decoration: underline}
-
-a.newLabel:link {background-color: #ddffdd}
-a.newLabel:active {background-color: #ddffdd}
-a.newLabel:visited {background-color: #ddffdd}
-a.newLabel:hover {background-color: #ddffdd}
-
-ul.square {list-style-type: square}
-
-.inline-control-link {
- background: #ffc;
- font-size: 9px;
- color: #666;
- padding: 2px;
- text-transform: uppercase;
- text-decoration: none;
-}
-
-
-.inline-control-link a:link {text-decoration: none}
-.inline-control-link a:active {text-decoration: none}
-.inline-control-link a:visited {text-decoration: none}
-.inline-control-link a:hover {text-decoration: none}
-
-.inline-control-link {
- background: #ffc;
- font-size: 9px;
- color: #666;
- padding: 2px;
- text-transform: uppercase;
- text-decoration: none;
- cursor: pointer;
-}
-
-div.auto_complete {
- width: 350px;
- background: #fff;
-}
-div.auto_complete ul {
- border: 1px solid #888;
- margin: 0;
- padding: 0;
- width: 100%;
- list-style-type: none;
-}
-div.auto_complete ul li {
- margin: 0;
- padding: 3px;
-}
-div.auto_complete ul li.selected {
- background-color: #ffb;
-}
-div.auto_complete ul strong.highlight {
- color: #800;
- margin: 0;
- padding: 0;
-}
-
-/******* Edit Page Styles *******/
-.toogleFormDiv{
- border:1px solid #A7A6AA;
- background-color:white;
- padding:5px;
- margin-top: 5px;
-}
-
-.toogleInfoDiv{
- border:1px solid #A7A6AA;
- background-color:white;
- display:none;
- padding:5px;
- margin-top: 10px;
-}
-
-.inputSection{
- margin-bottom:20px;
-}
-
-#editBox{
- border:1px solid lightgray;
- background-color:#F0F0F0;
-}
-
-/******* Left Navigation Theme Styles ********/
-.leftnav li a {
- text-decoration:none;
- color:white;
- margin:0px;
- display:block;
- padding:2px;
- padding-left:5px;
- background-color: #3c78b5;
- border-top:1px solid #3c78b5;
-}
-
-.leftnav li a:active {color:white;}
-.leftnav li a:visited {color:white;}
-.leftnav li a:hover {background-color: #003366; color:white;}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/developers-guide/archetypes.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/developers-guide/archetypes.conf b/manual/src/main/webapp/developers-guide/archetypes.conf
deleted file mode 100644
index be8bc1e..0000000
--- a/manual/src/main/webapp/developers-guide/archetypes.conf
+++ /dev/null
@@ -1,360 +0,0 @@
-
-
-h1. Archetypes
-
-Karaf provides archetypes to easily create commands, manage [features or repository and create a kar archive.
-This section describes each of them and explain How to use it.
-
-h2. Create a command (karaf-command-archetype)
-
-This archetype creates a Maven skeleton project that you will use to develop new Karaf commands.
-
-h3. Command line
-
-Using the command line, we can create our project:
-{code}
-mvn archetype:generate \
- -DarchetypeGroupId=org.apache.karaf.archetypes \
- -DarchetypeArtifactId=karaf-command-archetype \
- -DarchetypeVersion=4.0.0 \
- -DgroupId=com.mycompany \
- -DartifactId=com.mycompany.command \
- -Dversion=1.0-SNAPSHOT \
- -Dpackage=com.mycompany.package
-{code}
-
-h3. Additional parameters
-
-During the maven creation process, additional questions will be asked on the console :
-
-** Define value for property 'command':
- The name of the command (list, add-item, ...)
-** Define value for property 'description':
- Provide a description of the command that you want to create. This description will be displayed in the Karaf console when
- the parameter --help is used
-** Define value for property 'scope':
- This value represents the family name to which the command belongs (features, osgi, admin, jaas, ...)
-
-h3. Result of Maven command execution
-
-{code}
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
-[INFO]
-[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-command-archetype:4.0.0] found in catalog local
-[INFO] Using property: groupId = com.mycompany
-[INFO] Using property: artifactId = com.mycompany.command
-[INFO] Using property: version = 1.0-SNAPSHOT
-[INFO] Using property: package = com.mycompany.package
-Define value for property 'command': : list
-Define value for property 'description': : List sample command
-Define value for property 'scope': : my
-Confirm properties configuration:
-groupId: com.mycompany
-artifactId: com.mycompany.command
-version: 1.0-SNAPSHOT
-package: com.mycompany.package
-command: list
-description: List sample command
-scope: my
- Y: :
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: karaf-command-archetype:4.0.0
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.command
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: scope, Value: my
-[INFO] Parameter: description, Value: List sample command
-[INFO] Parameter: command, Value: list
-[INFO] Parameter: artifactId, Value: com.mycompany.command
-[WARNING] Don't override file /com.mycompany.command/pom.xml
-[INFO] project created from Archetype in dir: /com.mycompany.command
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 27.204s
-[INFO] Finished at: Mon Dec 19 09:38:49 CET 2011
-[INFO] Final Memory: 7M/111M
-[INFO] ------------------------------------------------------------------------
-{code}
-
-Next, you can import your project in Eclipse/IntelliJ and developp the karaf command.
-
-h2. Create an OSGi bundle (karaf-bundle-archetype)
-
-This archetype creates a Maven skeleton to create an OSGi bundle, including a bundle Activator (a special callback class for bundle start/stop).
-
-h3. Command line
-
-Using the command line, we can create our project:
-{code}
-mvn archetype:generate \
- -DarchetypeGroupId=org.apache.karaf.archetypes \
- -DarchetypeArtifactId=karaf-bundle-archetype \
- -DarchetypeVersion=4.0.0 \
- -DgroupId=com.mycompany \
- -DartifactId=com.mycompany.bundle \
- -Dversion=1.0-SNAPSHOT \
- -Dpackage=com.mycompany.package
-{code}
-
-h3. Result of Maven command execution
-
-{code}
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
-[INFO]
-[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-bundle-archetype:4.0.0] found in catalog local
-[INFO] Using property: groupId = com.mycompany
-[INFO] Using property: artifactId = com.mycompany.bundle
-[INFO] Using property: version = 1.0-SNAPSHOT
-[INFO] Using property: package = com.mycompany.package
-Confirm properties configuration:
-groupId: com.mycompany
-artifactId: com.mycompany.bundle
-version: 1.0-SNAPSHOT
-package: com.mycompany.package
- Y: :
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: karaf-bundle-archetype:4.0.0
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.bundle
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.bundle
-[INFO] project created from Archetype in dir: /com.mycompany.bundle
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 7.895s
-[INFO] Finished at: Mon Dec 19 11:41:44 CET 2011
-[INFO] Final Memory: 8M/111M
-[INFO] ------------------------------------------------------------------------
-{code}
-
-h2. Create an OSGi blueprint bundle (karaf-blueprint-archetype)
-
-This archetype creates a Maven skeleton project to create an OSGi blueprint bundle, including a sample bean exposed as an OSGi service in the blueprint XML descriptor.
-
-h3. Command line
-
-Using the command line, we can create our project:
-{code}
-mvn archetype:generate \
- -DarchetypeGroupId=org.apache.karaf.archetypes \
- -DarchetypeArtifactId=karaf-blueprint-archetype \
- -DarchetypeVersion=4.0.0 \
- -DgroupId=com.mycompany \
- -DartifactId=com.mycompany.blueprint \
- -Dversion=1.0-SNAPSHOT \
- -Dpackage=com.mycompany.blueprint
-{code}
-
-h3. Result of Maven command execution
-
-{code}
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
-[INFO]
-[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-blueprint-archetype:4.0.0] found in catalog local
-[INFO] Using property: groupId = com.mycompany
-[INFO] Using property: artifactId = com.mycompany.blueprint
-[INFO] Using property: version = 1.0-SNAPSHOT
-[INFO] Using property: package = com.mycompany.package
-Confirm properties configuration:
-groupId: com.mycompany
-artifactId: com.mycompany.blueprint
-version: 1.0-SNAPSHOT
-package: com.mycompany.package
- Y: :
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: karaf-blueprint-archetype:4.0.0
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.blueprint
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.blueprint
-[INFO] project created from Archetype in dir: /com.mycompany.blueprint
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 1:06:36.741s
-[INFO] Finished at: Mon Dec 19 13:04:43 CET 2011
-[INFO] Final Memory: 7M/111M
-[INFO] ------------------------------------------------------------------------
-{code}
-
-h2. Create a features XML (karaf-feature-archetype)
-
-This archetype creates a Maven skeleton project which create a features XML file, using the dependencies that you define in the POM.
-
-h3. Command line
-
-Using the command line, we can create our project:
-{code}
-mvn archetype:generate \
- -DarchetypeGroupId=org.apache.karaf.archetypes \
- -DarchetypeArtifactId=karaf-feature-archetype \
- -DarchetypeVersion=4.0.0 \
- -DgroupId=my.company \
- -DartifactId=my.company.feature \
- -Dversion=1.0-SNAPSHOT \
- -Dpackage=my.company.package
-{code}
-
-h3. Result of maven command execution
-
-{code}
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
-[INFO]
-[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-feature-archetype:4.0.0] found in catalog local
-[INFO] Using property: groupId = com.mycompany
-[INFO] Using property: artifactId = com.mycompany.feature
-[INFO] Using property: version = 1.0-SNAPSHOT
-[INFO] Using property: package = com.mycompany.package
-Confirm properties configuration:
-groupId: com.mycompany
-artifactId: com.mycompany.feature
-version: 1.0-SNAPSHOT
-package: com.mycompany.package
- Y: :
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: karaf-feature-archetype:4.0.0
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.feature
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.feature
-[INFO] project created from Archetype in dir: /com.mycompany.feature
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 7.262s
-[INFO] Finished at: Mon Dec 19 13:20:00 CET 2011
-[INFO] Final Memory: 7M/111M
-[INFO] ------------------------------------------------------------------------
-{code}
-
-h2. Create a KAR file (karaf-kar-archetype)
-
-This archetype creates a Maven skeleton project including a features XML sample, used to generate a KAR file.
-
-h3. Command line
-
-Using the command line, we can create our project:
-{code}
-mvn archetype:generate \
- -DarchetypeGroupId=org.apache.karaf.archetypes \
- -DarchetypeArtifactId=karaf-kar-archetype \
- -DarchetypeVersion=4.0.0 \
- -DgroupId=com.mycompany \
- -DartifactId=com.mycompany.kar \
- -Dversion=1.0-SNAPSHOT \
- -Dpackage=com.mycompany.package
-{code}
-
-h3. Result of maven command execution
-
-{code}
-[INFO] Scanning for projects...
-[INFO]
-[INFO] ------------------------------------------------------------------------
-[INFO] Building Maven Stub Project (No POM) 1
-[INFO] ------------------------------------------------------------------------
-[INFO]
-[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom >>>
-[INFO]
-[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom <<<
-[INFO]
-[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom ---
-[INFO] Generating project in Interactive mode
-[INFO] Archetype repository missing. Using the one from [org.apache.karaf.archetypes:karaf-kar-archetype:4.0.0] found in catalog local
-[INFO] Using property: groupId = com.mycompany
-[INFO] Using property: artifactId = com.mycompany.kar
-[INFO] Using property: version = 1.0-SNAPSHOT
-[INFO] Using property: package = com.mycompany.package
-Confirm properties configuration:
-groupId: com.mycompany
-artifactId: com.mycompany.kar
-version: 1.0-SNAPSHOT
-package: com.mycompany.package
- Y: :
-[INFO] ----------------------------------------------------------------------------
-[INFO] Using following parameters for creating project from Archetype: karaf-kar-archetype:4.0.0
-[INFO] ----------------------------------------------------------------------------
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.kar
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: packageInPathFormat, Value: com/mycompany/package
-[INFO] Parameter: package, Value: com.mycompany.package
-[INFO] Parameter: version, Value: 1.0-SNAPSHOT
-[INFO] Parameter: groupId, Value: com.mycompany
-[INFO] Parameter: artifactId, Value: com.mycompany.kar
-[INFO] project created from Archetype in dir: /com.mycompany.kar
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 7.465s
-[INFO] Finished at: Mon Dec 19 13:30:15 CET 2011
-[INFO] Final Memory: 8M/157M
-[INFO] ------------------------------------------------------------------------
-{code}
[15/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/jdbc.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/jdbc.adoc b/manual/src/main/asciidoc/user-guide/jdbc.adoc
new file mode 100644
index 0000000..177a6da
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/jdbc.adoc
@@ -0,0 +1,224 @@
+//
+// Licensed 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.
+//
+
+=== DataSources (JDBC)
+
+The Apache Karaf DataSources (JDBC) is an optional enterprise feature.
+
+You have to install the following features first:
+
+----
+karaf@root()> feature:repo-add pax-jdbc
+karaf@root()> feature:install pax-jdbc
+karaf@root()> feature:install pax-jdbc-config
+karaf@root()> feature:install jdbc
+----
+
+Pax JDBC provides ready to use adapters for different databases:
+
+* pax-jdbc-derby
+* pax-jdbc-derbyclient
+* pax-jdbc-h2
+* pax-jdbc-mariadb
+* pax-jdbc-mysql
+* pax-jdbc-oracle
+* pax-jdbc-postgresql
+* pax-jdbc-sqlite
+* pax-jdbc-mssql
+
+This feature provides an OSGi service to create/delete JDBC datasources in the container and perform database operations (SQL queries).
+
+This JDBC OSGi service can be manipulated programmatically (see the developer guide for details), using the `jdbc:*` commands, or using the JDBC MBean.
+
+==== Commands
+
+===== `jdbc:ds-create`
+
+The `jdbc:ds-create` command automatically creates a datasource definition file by leveraging pax-jdbc.
+
+The `jdbc:ds-create` command requires either:
+
+* the `--driverName` containing the JDBC driver name
+* or the `--driverClass` containing the JDBC driver class name
+
+The `jdbc:ds-create` accepts a set of options and the name argument:
+
+----
+DESCRIPTION
+ jdbc:ds-create
+
+ Create a JDBC datasource config for pax-jdbc-config from a DataSourceFactory
+
+SYNTAX
+ jdbc:ds-create [options] name
+
+ARGUMENTS
+ name
+ The JDBC datasource name
+
+OPTIONS
+ -dbName
+ Database name to use
+ --help
+ Display this help message
+ -dn, --driverName
+ org.osgi.driver.name property of the DataSourceFactory
+ -u, --username
+ The database username
+ -dc, --driverClass
+ org.osgi.driver.class property of the DataSourceFactory
+ -p, --password
+ The database password
+ -url
+ The JDBC URL to use
+----
+
+* the `name` argument is required. It's the name of the datasource. The name is used to identify the datasource, and to create the datasource definition file (`deploy/datasource-[name].xml`).
+* the `-u` option is optional. It defines the database username.
+* the `-url` option is optional. It defines the JDBC URL to access to the database.
+* the `-p` option is optional. It defines the database password.
+
+For instance, to create an embedded Apache Derby database in Apache Karaf, you can do:
+
+----
+karaf@root()> jdbc:ds-create -dn derby -dbName test -url jdbc:derby:test test
+----
+
+We can see that this command created a configuration PID containing the datasource properties.
+
+==== `jdbc:ds-delete`
+
+The `jdbc:ds-delete` command deletes a datasource.
+
+----
+karaf@root()> jdbc:ds-delete test
+----
+
+==== `jdbc:ds-list`
+
+The `jdbc:ds-list` command lists the JDBC datasources:
+
+----
+karaf@root()> jdbc:ds-list
+Name | Product | Version | URL | Status
+---------------------------------------
+
+----
+
+==== `jdbc:ds-info`
+
+The `jdbc:ds-info` command provides details about a JDBC datasource:
+
+----
+karaf@root()> jdbc:ds-info test
+Property | Value
+--------------------------------------------------
+driver.version | 10.8.2.2 - (1181258)
+username | APP
+db.version | 10.8.2.2 - (1181258)
+db.product | Apache Derby
+driver.name | Apache Derby Embedded JDBC Driver
+url | jdbc:derby:test
+----
+
+==== `jdbc:execute`
+
+The `jdbc:execute` command executes a SQL query that doesn't return any result on a given JDBC datasource.
+
+Typically, you can use the `jdbc:execute` command to create tables, insert values into tables, etc.
+
+For instance, we can create a `person` table on our `test` datasource:
+
+----
+karaf@root()> jdbc:execute test "create table person(name varchar(100), nick varchar(100))"
+----
+
+And we can insert some records in the `person` table:
+
+----
+karaf@root()> jdbc:execute test "insert into person(name, nick) values('foo','bar')"
+karaf@root()> jdbc:execute test "insert into person(name, nick) values('test','test')"
+----
+
+==== `jdbc:query`
+
+The `jdbc:query` command is similar to the `jdbc:execute` one but it displays the query result.
+
+For instance, to display the content of the `person` table, we can do:
+
+----
+karaf@root()> jdbc:query test "select * from person"
+NICK | NAME
+--------------------------------
+bar | foo
+test | test
+----
+
+==== `jdbc:tables`
+
+The `jdbc:tables` command displays all tables available on a given JDBC datasource:
+
+----
+karaf@root()> jdbc:tables test
+REF_GENERATION | TYPE_NAME | TABLE_NAME | TYPE_CAT | REMARKS | TYPE_SCHEM | TABLE_TYPE | TABLE_SCHEM | TABLE_CAT | SELF_REFERENCING_COL_NAME
+----------------------------------------------------------------------------------------------------------------------------------------------------
+ | | SYSALIASES | | | | SYSTEM TABLE | SYS | |
+ | | SYSCHECKS | | | | SYSTEM TABLE | SYS | |
+ | | SYSCOLPERMS | | | | SYSTEM TABLE | SYS | |
+ | | SYSCOLUMNS | | | | SYSTEM TABLE | SYS | |
+ | | SYSCONGLOMERATES | | | | SYSTEM TABLE | SYS | |
+ | | SYSCONSTRAINTS | | | | SYSTEM TABLE | SYS | |
+ | | SYSDEPENDS | | | | SYSTEM TABLE | SYS | |
+ | | SYSFILES | | | | SYSTEM TABLE | SYS | |
+ | | SYSFOREIGNKEYS | | | | SYSTEM TABLE | SYS | |
+ | | SYSKEYS | | | | SYSTEM TABLE | SYS | |
+ | | SYSPERMS | | | | SYSTEM TABLE | SYS | |
+ | | SYSROLES | | | | SYSTEM TABLE | SYS | |
+ | | SYSROUTINEPERMS | | | | SYSTEM TABLE | SYS | |
+ | | SYSSCHEMAS | | | | SYSTEM TABLE | SYS | |
+ | | SYSSEQUENCES | | | | SYSTEM TABLE | SYS | |
+ | | SYSSTATEMENTS | | | | SYSTEM TABLE | SYS | |
+ | | SYSSTATISTICS | | | | SYSTEM TABLE | SYS | |
+ | | SYSTABLEPERMS | | | | SYSTEM TABLE | SYS | |
+ | | SYSTABLES | | | | SYSTEM TABLE | SYS | |
+ | | SYSTRIGGERS | | | | SYSTEM TABLE | SYS | |
+ | | SYSVIEWS | | | | SYSTEM TABLE | SYS | |
+ | | SYSDUMMY1 | | | | SYSTEM TABLE | SYSIBM | |
+ | | PERSON | | | | TABLE | APP | |
+----
+
+==== JMX JDBC MBean
+
+The JMX JDBC MBean provides the JDBC datasources, and the operations to manipulate datasources and database.
+
+The object name to use is `org.apache.karaf:type=jdbc,name=*`.
+
+===== Attributes
+
+The `Datasources` attribute provides a tabular data of all JDBC datasource, containing:
+
+* `name` is the JDBC datasource name
+* `product` is the database product backend
+* `url` is the JDBC URL used by the datasource
+* `version` is the database version backend.
+
+===== Operations
+
+* `create(name, type, jdbcDriverClassName, version, url, user, password, installBundles)` creates a JDBC datasource (the arguments correspond to the options of the `jdbc:create` command).
+* `delete(name)` deletes a JDBC datasource.
+* `info(datasource)` returns a Map (String/String) of details about a JDBC `datasource`.
+* `tables(datasource)` returns a tabular data containing the tables available on a JDBC `datasource`.
+* `execute(datasource, command` executes a SQL command on the given JDBC `datasource`.
+* `query(datasource, query` executes a SQL query on the given JDBC `datasource` and return the execution result as tabular data.
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/jms.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/jms.adoc b/manual/src/main/asciidoc/user-guide/jms.adoc
new file mode 100644
index 0000000..8d2585d
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/jms.adoc
@@ -0,0 +1,318 @@
+//
+// Licensed 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.
+//
+
+=== JMS
+
+The Apache Karaf MOM (Messaging Oriented Middleware/JMS) is an optional enterprise feature.
+
+You have to install the `jms` feature first:
+
+----
+karaf@root()> feature:install jms
+----
+
+The `jms` feature doesn't install a JMS broker: it just installs the OSGi service, commands, and MBean to interact with
+a JMS broker (not the broker itself).
+
+It means that you have to install a JMS broker itself.
+
+This JMS broker can be available:
+
+* outside of Apache Karaf, as a standalone broker. In that case, Apache Karaf JMS will remotely connect to the JMS broker.
+ For instance, you can use this topology with Apache ActiveMQ or IBM WebsphereMQ.
+* embedded in Apache Karaf. With this topology, Apache Karaf itself provides a JMS broker service. Apache ActiveMQ provides
+ a native support in Apache Karaf.
+
+For instance, you can install Apache ActiveMQ directly in Apache Karaf:
+
+----
+karaf@root()> feature:repo-add activemq
+Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
+karaf@root()> feature:install activemq-broker
+----
+
+The `activemq-broker` feature installs:
+
+* a Apache ActiveMQ broker directly in Apache Karaf, bind to the `61616` port number by default.
+* the Apache ActiveMQ WebConsole bound to `http://0.0.0.0:8181/activemqweb` by default.
+
+The Apache Karaf `jms` feature provides an OSGi service to create/delete JMS connection factories in the container
+and perform JMS operations (send or consume messages, get information about a JMS broker, list the destinations, ...).
+
+This JMS OSGi service can be manipulated programmatically (see the developer guide for details), using the `jms:*` commands, or using the JMS MBean.
+
+==== Commands
+
+===== `jms:create`
+
+The `jms:create` command creates a JMS connection factory in the Apache Karaf container. It automatically creates a
+blueprint XML file in the `deploy` folder containing the JMS connection factory definition corresponding
+to the type that you mentioned.
+
+The `jms:create` command accepts different arguments and options:
+
+----
+karaf@root()> jms:create --help
+DESCRIPTION
+ jms:create
+
+ Create a JMS connection factory.
+
+SYNTAX
+ jms:create [options] name
+
+ARGUMENTS
+ name
+ The JMS connection factory name
+
+OPTIONS
+ -t, --type
+ The JMS connection factory type (ActiveMQ or WebsphereMQ)
+ (defaults to ActiveMQ)
+ -u, --username
+ Username to connect to the JMS broker
+ (defaults to karaf)
+ --help
+ Display this help message
+ --url
+ URL of the JMS broker. For WebsphereMQ type, the URL is hostname/port/queuemanager/channel
+ (defaults to tcp://localhost:61616)
+ -p, --password
+ Password to connect to the JMS broker
+ (defaults to karaf)
+
+----
+
+* the `name` argument is required. It's the name of the JMS connection factory. The name is used to identify the connection factory, and to create the connection factory definition file (`deploy/connectionfactory-[name].xml`).
+* the `-t` (`--type`) option is required. It's the type of the JMS connection factory. Currently on `activemq` and `webspheremq` type are supported. If you want to use another type of JMS connection factory, you can create the `deploy/connectionfactory-[name].xml` file by hand (using one as template).
+* the `--url` option is required. It's the URL used by the JMS connection factory to connect to the broker. If the type is `activemq`, the URL looks like `tcp://localhost:61616`. If the type is `webspheremq`, the URL looks like `host/port/queuemanager/channel`.
+* the `-u` (`--username`) option is optional (karaf by default). In the case of the broker requires authentication, it's the username used.
+* the `-p` (`--password`) option is optional (karaf by default). In the case of the broker requires authentication, it's the password used.
+
+For instance, to create a JMS connection factory for a Apache ActiveMQ broker, you can do:
+
+----
+karaf@root()> jms:create -t activemq --url tcp://localhost:61616 test
+----
+
+[NOTE]
+====
+The `jms:create` command doesn't install any feature or bundle providing the JMS connection factory classes (and dependencies).
+You have to install the required features (for instance `activemq-broker` feature for Apache ActiveMQ), or bundles (for IBM WebsphereMQ) providing the JMS connection factory packages and classes.
+====
+
+In the previous example, we assume that you previously installed the `activemq-broker` feature.
+
+We can see the created JMS connection factory:
+
+----
+karaf@root()> la
+...
+151 | Active | 80 | 0.0.0 | connectionfactory-test.xml
+----
+
+The `connectionfactory-test.xml` file has been created in the `deploy` folder.
+
+By default, the `jms:create` command constructs a JNDI name for the connection factory: `/jms/[name]`.
+
+It means that the connection factory name to use for the other `jms:*` commands is `/jms/[name]`.
+
+===== `jms:delete`
+
+The `jms:delete` command deletes a JMS connection factory. The `name` argument is the name that you used at creation time:
+
+----
+karaf@root()> jms:delete test
+----
+
+===== `jms:connectionfactories`
+
+The `jms:connectionfactories` command lists the JMS connection factories:
+
+----
+karaf@root()> jms:connectionfactories
+JMS Connection Factory
+----------------------
+/jms/test
+----
+
+===== `jms:info`
+
+The `jms:info` command provides details about the JMS connection factory:
+
+----
+karaf@root()> jms:info /jms/test
+Property | Value
+-------------------
+product | ActiveMQ
+version | 5.9.0
+----
+
+You can see the JMS broker product and version.
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+===== `jms:queues`
+
+The `jms:queues` command lists the JMS queues available on a JMS broker. For instance:
+
+----
+karaf@root()> jms:queues /jms/test
+JMS Queues
+----------
+MyQueue
+----
+
+where `/jms/test` is the name of the JMS connection factory.
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+[NOTE]
+====
+Depending of the JMS connection factory type, this command may not work.
+For now, the command works only with Apache ActiveMQ.
+====
+
+===== `jms:topics`
+
+The `jms:topics` command lists the JMS topics available on a JMS broker. For instance:
+
+----
+karaf@root()> jms:topics /jms/test
+JMS Topics
+----------
+MyTopic
+----
+
+where `/jms/test` is the name of the JMS connection factory.
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+[NOTE]
+====
+Depending of the JMS connection factory type, this command may not work.
+For now, the command works only with Apache ActiveMQ.
+====
+
+===== `jms:send`
+
+The `jms:send` command sends a message to a given JMS queue.
+
+For instance, to send a message containing `Hello World` in the `MyQueue` queue, you can do:
+
+----
+karaf@root()> jms:send /jms/test MyQueue "Hello World"
+----
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+===== `jms:consume`
+
+The `jms:consume` command consumes messages from a JMS queue.
+
+For instance, to consume all messages from `MyQueue`, you can do:
+
+----
+karaf@root()> jms:consume /jms/test MyQueue
+2 message(s) consumed
+----
+
+If you want to consume only some messages, you can define a selector using the `-s` (`--selector`) option.
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+[NOTE]
+====
+The `jms:consume` command just consumes (so removes) messages from a JMS queue. It doesn't display the messages.
+If you want to see the details of messages, you can use the `jms:browse` command.
+====
+
+===== `jms:count`
+
+The `jms:count` command counts the number of pending messages into a JMS queue.
+
+For instance, if you want to know the number of messages on `MyQueue`, you can do:
+
+----
+karaf@root()> jms:count /jms/test MyQueue
+Messages Count
+--------------
+8
+----
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+===== `jms:browse`
+
+The `jms:browse` command browses a JMS queue and display details about messages.
+
+For instance, to browse the `MyQueue` queue:
+
+----
+karaf@root()> jms:browse /jms/test MyQueue
+Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013
+ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013
+ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013
+----
+
+By default, the messages properties are not displayed. You can use the `-v` (`--verbose`) option to display the properties:
+
+----
+karaf@root()> jms:browse -v /jms/test MyQueue
+Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp | Properties
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013 |
+ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013 |
+ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013 |
+----
+
+If you want to browse only some messages, you can define a selector using the `-s` (`--selector`) option.
+
+If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
+
+===== `jms:move`
+
+The `jms:move` command consumes all messages from a JMS queue and send it to another one.
+
+For instance, to move all messages from `MyQueue` queue to `AnotherQueue` queue, you can do:
+
+----
+karaf@root()> jms:move /jms/test MyQueue AnotherQueue
+3 message(s) moved
+----
+
+==== JMX JMS MBean
+
+The JMX JMS MBean provides the attributes and operations to manipulate the JMS connection factories and JMS messages.
+
+The object name to use is `org.apache.karaf:type=jms,name=*`.
+
+===== Attributes
+
+The `Connectionfactories` attribute provides the list of all JMS connection factories names.
+
+===== Operations
+
+* `create(name, type, url)` creates a JMS connection factory.
+* `delete(name)` deletes a JMS connection factory.
+* `Map<String, String> info(connectionFactory, username, password)` gets details about a JMS connection factory and broker.
+* `int count(connectionFactory, queue, username, password)` counts the number of pending messages on a JMS queue.
+* `List<String> queues(connectionFactory, username, password)` lists the JMS queues available on the JMS broker.
+* `List<String> topics(connectionFactory, username, password)` lists the JMS topics available on the JMS broker.
+* `TabularData browse(connectionFactory, queue, selector, username, password)` browses a JMS queue and provides a table of JMS messages.
+* `send(connectionFactory, queue, content, replyTo, username, password)` sends a JMS message to a target queue.
+* `int consume(connectionFactory, queue, selector, username, password)` consumes JMS messages from a JMS queue.
+* `int move(connectionFactory, source, destination, selector, username, password)` moves messages from a JMS queue to another.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/jndi.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/jndi.adoc b/manual/src/main/asciidoc/user-guide/jndi.adoc
new file mode 100644
index 0000000..12e44a6
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/jndi.adoc
@@ -0,0 +1,224 @@
+//
+// Licensed 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.
+//
+
+=== Naming (JNDI)
+
+The Apache Karaf Naming (JNDI) is an optional enterprise feature.
+
+You have to install the `jndi` feature first:
+
+----
+karaf@root()> feature:install jndi
+----
+
+Apache Karaf provides a complete JNDI support.
+
+You have two parts in the Apache Karaf JNDI support:
+
+* a fully compliant implementation of the OSGi Alliance JNDI Service specification.
+* a more "regular" JNDI context, containing different names that you can administrate.
+
+==== OSGi Services Registry and JNDI
+
+The OSGi Service Registry provides a centralized register/query capabilities for OSGi services.
+
+A common pattern outside of OSGi is to make use of JNDI API to access services from a directory system.
+The OSGi service registry can be viewed as an example of such a system.
+
+Apache Karaf supports the `osgi:service` lookup scheme as defined by the JNDI Service Specification.
+
+The schema is:
+
+----
+osgi:service/<interface>[/<filter>]
+----
+
+For instance, you can directly use JNDI to get a OSGi service:
+
+----
+Context ctx = new InitialContext();
+Runnable r = (Runnable) ctx.lookup("osgi:service/java.lang.Runnable");
+----
+
+==== JNDI service
+
+Apache Karaf also supports regular JNDI, including a directoy system where you can register name bindings, sub-context, etc.
+
+It supports the standard JNDI API:
+
+----
+Context ctx = new InitialContext();
+Runnable r = (Runnable) ctx.lookup("this/is/the/name");
+----
+
+It also allows you to bind some OSGi services as "pure" JNDI name. In that case, you don't have to use the specific
+`osgi:service` scheme.
+
+==== Commands
+
+Apache Karaf provides specific commands to manipulate the JNDI service.
+
+===== `jndi:names`
+
+The `jndi:names` command lists all JNDI names. It groups both the JNDI names from the `osgi:service` scheme and the
+regular JNDI names:
+
+----
+karaf@root()> jndi:names
+JNDI Name | Class Name
+------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
+----
+
+We can see here the `osgi:service/jndi` name (using the `osgi:service` scheme) and `jndi/service` name (using the
+regular JNDI service).
+
+The `jndi:names` command accepts an optional `context` argument to list names on the given context.
+
+For instance, you can list only names in the `jndi` sub-context:
+
+----
+karaf@root()> jndi:names jndi
+JNDI Name | Class Name
+----------------------------------------------------------
+service | org.apache.karaf.jndi.internal.JndiServiceImpl
+----
+
+[NOTE]
+====
+The `jndi:names` lists only names (the full qualified name). It means that the empty JNDI sub-contexts are not displayed.
+To display all JNDI sub-contexts (empty or not), you can use the `jndi:contexts` command.
+====
+
+===== `jndi:contexts`
+
+The `jndi:contexts` command lists all JNDI sub-contexts:
+
+----
+karaf@root()> jndi:contexts
+JNDI Sub-Context
+----------------
+other/context
+foo/bar
+----
+
+===== `jndi:create`
+
+The `jndi:create` command creates a new JNDI sub-context:
+
+----
+karaf@root()> jndi:create my/company
+----
+
+===== `jndi:delete`
+
+The `jndi:delete` command deletes a JNDI sub-context:
+
+----
+karaf@root()> jndi:delete my/company
+----
+
+===== `jndi:alias`
+
+The `jndi:alias` command creates a new JNDI name (alias) with an existing one.
+
+The existing JNDI name can be a regular one:
+
+----
+karaf@root()> jndi:alias bean/services/jndi aliases/services/jndi
+karaf@root()> jndi:names
+JNDI Name | Class Name
+----------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+bean/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+aliases/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+----
+
+or a name from the `osgi:service` schema:
+
+----
+karaf@root()> jndi:alias osgi:service/jndi alias/jndi/service
+karaf@root()> jndi:names
+JNDI Name | Class Name
+-------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+alias/jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
+----
+
+[NOTE]
+====
+The `jndi:alias` automatically creates all required JNDI sub-contexts.
+====
+
+===== `jndi:bind`
+
+The `jndi:bind` command binds an OSGi service with a JNDI name.
+
+The `jndi:bind` command requires an OSGi service ID and a JNDI name. The OSGi service ID can be found using the `service:list` command.
+
+For instance, we can bind the OSGi service with ID 344 with the JNDI name `services/kar`:
+
+----
+karaf@root()> jndi:bind 344 services/kar
+karaf@root()> jndi:names
+JNDI Name | Class Name
+-------------------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+services/kar | org.apache.karaf.kar.internal.KarServiceImpl
+----
+
+===== `jndi:unbind`
+
+The `jndi:unbind` command unbind a given JNDI name:
+
+----
+karaf@root()> jndi:names
+JNDI Name | Class Name
+-------------------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+services/kar | org.apache.karaf.kar.internal.KarServiceImpl
+karaf@root()> jndi:unbind services/kar
+karaf@root()> jndi:names
+JNDI Name | Class Name
+-------------------------------------------------------------------------------
+osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
+----
+
+[NOTE]
+====
+It's not possible to unbind a name from the `osgi:service` schema, as it's linked to a OSGi service.
+====
+
+==== JMX JndiMBean
+
+The JMX JndiMBean provides the JNDI names, and the operations to manipulate the JNDI service.
+
+The object name to use is `org.apache.karaf:type=jndi,name=*`.
+
+===== Attributes
+
+The `Names` attribute provides a map containing all JNDI names and class names from both `osgi:service` scheme
+and the regular JNDI service.
+
+The `Contexts` attribute provides a list containing all JNDI sub-contexts.
+
+===== Operations
+
+* `getNames(context)` provides a map containing JNDI names and class names in a given JNDI sub-context.
+* `create(context)` creates a new JNDI sub-context.
+* `delete(context)` deletes a JNDI sub-context.
+* `alias(name, alias` creates a JNDI name (alias) for a given one.
+* `bind(serviceId, name` binds a JNDI name using an OSGi service (identified by its ID).
+* `unbind(name)` unbinds a JNDI name.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/jpa.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/jpa.adoc b/manual/src/main/asciidoc/user-guide/jpa.adoc
new file mode 100644
index 0000000..aa94112
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/jpa.adoc
@@ -0,0 +1,44 @@
+//
+// Licensed 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.
+//
+
+=== Persistence (JPA)
+
+Apache Karaf provides JPA persistence providers (such as Apache OpenJPA) to be easy to use (in a OSGi way) and provide
+container managed persistence for applications (using Blueprint).
+
+Apache Karaf embeds Aries JPA, providing a very easy way to develop applications that use JPA persistence.
+
+See the developer guide for details about developing applications that use JPA.
+
+==== Persistence engine features
+
+Apache Karaf provides a set of ready to use persistence engine features:
+
+* Apache OpenJPA. The `openjpa` feature installs the `jpa` feature with the Apache OpenJPA as persistence engine:
+
+----
+karaf@root()> feature:install openjpa
+----
+
+* Hibernate. The `hibernate` feature installs the `jpa` feature with the Hibernate persistence engine:
+
+----
+karaf@root()> feature:install hibernate
+----
+
+* EclipseLink. The `eclipselink` feature installs the `jpa` featue with the ElipseLink persistence engine:
+
+----
+karaf@root()> feature:install eclipselink
+----
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/jta.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/jta.adoc b/manual/src/main/asciidoc/user-guide/jta.adoc
new file mode 100644
index 0000000..e3439e5
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/jta.adoc
@@ -0,0 +1,120 @@
+//
+// Licensed 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.
+//
+
+=== Transaction (JTA)
+
+Apache Karaf provides container managed transactions, available as OSGi services.
+
+As most of the enterprise features, it's an optional feature that you can install with:
+
+----
+karaf@root()> feature:install transaction
+----
+
+However, the `transaction` feature is installed (as a transitive dependency) when installing enterprise features
+(like `jdbc` or `jms` features for instance).
+
+==== Apache Aries Transaction and ObjectWeb HOWL
+
+The `transaction` feature uses Apache Aries and ObjectWeb HOWL. Aapache Aries Transaction "exposes" the transaction
+manager as OSGi service. The actual implementation of the transaction manager is ObjectWeb HOWL.
+
+ObjectWeb HOWL is a logger implementation providing features required by the ObjectWeb JOTM project, with a public API
+that is generally usable by any Transaction Manager.
+ObjectWeb HOWL uses unformatted binary logs to maximize performance and specifies a journalization API with methods
+necessary to support JOTM recovery operations.
+
+ObjectWeb HOWL is intended to be used for logging of temporary data such as XA transaction events.
+It is not a replacement for traditional log kits such as LOG4J and Java SE Logging.
+
+In Apache Karaf, ObjectWeb HOWL (High-speed ObjectWeb Logger) is used to implement TransactionLog (in Aries Transaction),
+providing a very performant transaction manager in an OSGi way.
+
+==== Configuration
+
+The installation of the `transaction` feature installs a new configuration: `org.apache.aries.transaction`.
+
+You can see the configuration properties using:
+
+----
+karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
+----------------------------------------------------------------
+Pid: org.apache.aries.transaction
+BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
+Properties:
+ aries.transaction.recoverable = true
+ aries.transaction.timeout = 600
+ service.pid = org.apache.aries.transaction
+ org.apache.karaf.features.configKey = org.apache.aries.transaction
+ aries.transaction.howl.maxBlocksPerFile = 512
+ aries.transaction.howl.maxLogFiles = 2
+ aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
+ aries.transaction.howl.bufferSizeKBytes = 4
+----
+
+* `aries.transaction.recoverable` property is a flag to enable support of recoverable resource or not. A recoverable
+ resource is a transactional object whose state is saved to stable storage if the transaction is committed, and whose
+ state can be reset to what it was at the beginning of the transaction if the transaction is rolled back.
+ At commit time, the transaction manager uses the two-phase XA protocol when communicating with the recoverable resource
+ to ensure transactional integrity when more than one recoverable resource is involved in the transaction being committed.
+ Transactional databases and message brokers like Apache ActiveMQ are examples of recoverable resources.
+ A recoverable resource is represented using the javax.transaction.xa.XAResource interface in JTA.
+ Default is `true`.
+* `aries.transaction.timeout` property is the transaction timeout. If a transaction has a lifetime longer than this timeout
+ a transaction exception is raised and the transaction is rollbacked. Default is `600` (10 minutes).
+* `aries.transaction.howl.logFileDir` property is the directory where the transaction logs (journal) are stored.
+ Default is `KARAF_DATA/txlog`.
+* `aries.transaction.howl.maxLogFiles` property is the maximum number of transaction log files to retain. Combined with the
+ `aries.transaction.howl.maxBlocksPerFile`, it defines the transaction retention.
+
+You can change the configuration directly using the `config:*` commands, or the Config MBean.
+
+For instance, to increase the transaction timeout, you can do:
+
+----
+karaf@root()> config:edit org.apache.aries.transaction
+karaf@root()> config:property-set aries.transaction.timeout 1200
+karaf@root()> config:update
+karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
+----------------------------------------------------------------
+Pid: org.apache.aries.transaction
+BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
+Properties:
+ aries.transaction.recoverable = true
+ aries.transaction.timeout = 1200
+ service.pid = org.apache.aries.transaction
+ org.apache.karaf.features.configKey = org.apache.aries.transaction
+ aries.transaction.howl.maxBlocksPerFile = 512
+ aries.transaction.howl.maxLogFiles = 2
+ aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
+ aries.transaction.howl.bufferSizeKBytes = 4
+----
+
+[NOTE]
+====
+The `transaction` feature defines the configuration in memory by default. It means that changes that you can do will
+be lost in case of Apache Karaf restart.
+If you want to define your own transaction configuration at startup, you have to create a `etc/org.apache.aries.transaction.cfg`
+configuration file and set the properties and values in the file. For instance:
+
+----
+# etc/org.apache.aries.transaction.cfg
+aries.transaction.recoverable = true
+aries.transaction.timeout = 1200
+aries.transaction.howl.maxBlocksPerFile = 512
+aries.transaction.howl.maxLogFiles = 2
+aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
+aries.transaction.howl.bufferSizeKBytes = 4
+----
+====
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/kar.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/kar.adoc b/manual/src/main/asciidoc/user-guide/kar.adoc
new file mode 100644
index 0000000..50c343d
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/kar.adoc
@@ -0,0 +1,298 @@
+//
+// Licensed 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.
+//
+
+== KAR
+
+As described in the link:provisioning[Provisioning section], Apache Karaf features describe applications.
+
+A feature defines different resources to resolve using URL (for instance, bundles URLs, or configuration files URLs).
+As described in the [Artifacts repositories and URLs section|urls], Apache Karaf looks for artifacts (bundles,
+configuration files, ...) in the artifact repositories.
+Apache Karaf may require to download artifacts from remote repositories.
+
+Apache Karaf provides a special type of artifact that package a features XML and all resources described in the features
+of this XML. This artifact is named a KAR (KAraf aRchive).
+
+A KAR file is a zip archive containing the
+
+Basically, the kar format is a jar (so a zip file) which contains a set of feature descriptor and bundle jar files.
+
+A KAR file contains a `repository` folder containing:
+
+* a set of features XML files
+* the artifacts following the Maven directory structure (`groupId/artifactId/version/artifactId-version.type`).
+
+For instance, the `spring-4.0.0.kar` contains:
+
+----
+~$ unzip -l spring-4.0.0.kar
+Archive: spring-4.0.0.kar
+ Length Date Time Name
+--------- ---------- ----- ----
+ 143 2013-12-06 10:52 META-INF/MANIFEST.MF
+ 12186 2013-12-06 10:52 repository/org/apache/karaf/features/spring/4.0.0/spring-4.0.0-features.xml
+ 575389 2013-12-06 10:52 repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
+ 232019 2013-12-06 10:52 repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar
+ 673109 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.struts/1.3.10_1/org.apache.servicemix.bundles.struts-1.3.10_1.jar
+ 37084 2013-12-06 10:52 repository/org/springframework/org.springframework.web.struts/3.2.4.RELEASE/org.springframework.web.struts-3.2.4.RELEASE.jar
+ 7411 2013-12-06 10:52 repository/org/springframework/org.springframework.instrument/3.2.4.RELEASE/org.springframework.instrument-3.2.4.RELEASE.jar
+ 246881 2013-12-06 10:52 repository/org/springframework/org.springframework.transaction/3.2.4.RELEASE/org.springframework.transaction-3.2.4.RELEASE.jar
+ 16513 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.aopalliance/1.0_6/org.apache.servicemix.bundles.aopalliance-1.0_6.jar
+ 881124 2013-12-06 10:52 repository/org/springframework/org.springframework.core/3.2.4.RELEASE/org.springframework.core-3.2.4.RELEASE.jar
+ 199240 2013-12-06 10:52 repository/org/springframework/org.springframework.expression/3.2.4.RELEASE/org.springframework.expression-3.2.4.RELEASE.jar
+ 614646 2013-12-06 10:52 repository/org/springframework/org.springframework.beans/3.2.4.RELEASE/org.springframework.beans-3.2.4.RELEASE.jar
+ 340841 2013-12-06 10:52 repository/org/springframework/org.springframework.aop/3.2.4.RELEASE/org.springframework.aop-3.2.4.RELEASE.jar
+ 877369 2013-12-06 10:52 repository/org/springframework/org.springframework.context/3.2.4.RELEASE/org.springframework.context-3.2.4.RELEASE.jar
+ 130224 2013-12-06 10:52 repository/org/springframework/org.springframework.context.support/3.2.4.RELEASE/org.springframework.context.support-3.2.4.RELEASE.jar
+ 30640 2013-12-06 10:52 repository/org/apache/karaf/deployer/org.apache.karaf.deployer.spring/4.0.0/org.apache.karaf.deployer.spring-4.0.0.jar
+ 51951 2013-12-06 10:52 repository/org/springframework/org.springframework.aspects/3.2.4.RELEASE/org.springframework.aspects-3.2.4.RELEASE.jar
+ 411175 2013-12-06 10:52 repository/org/springframework/org.springframework.jdbc/3.2.4.RELEASE/org.springframework.jdbc-3.2.4.RELEASE.jar
+ 48049 2013-12-06 10:52 repository/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
+ 190883 2013-12-06 10:52 repository/org/springframework/org.springframework.web.portlet/3.2.4.RELEASE/org.springframework.web.portlet-3.2.4.RELEASE.jar
+ 635680 2013-12-06 10:52 repository/org/springframework/org.springframework.web/3.2.4.RELEASE/org.springframework.web-3.2.4.RELEASE.jar
+ 645946 2013-12-06 10:52 repository/org/springframework/org.springframework.web.servlet/3.2.4.RELEASE/org.springframework.web.servlet-3.2.4.RELEASE.jar
+ 464911 2013-12-06 10:52 repository/org/springframework/org.springframework.test/3.2.4.RELEASE/org.springframework.test-3.2.4.RELEASE.jar
+ 69784 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-web/1.2.1/spring-osgi-web-1.2.1.jar
+ 16030 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
+ 32359 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar
+ 208684 2013-12-06 10:52 repository/org/springframework/org.springframework.jms/3.2.4.RELEASE/org.springframework.jms-3.2.4.RELEASE.jar
+ 75672 2013-12-06 10:52 repository/org/springframework/org.springframework.oxm/3.2.4.RELEASE/org.springframework.oxm-3.2.4.RELEASE.jar
+ 393607 2013-12-06 10:52 repository/org/springframework/org.springframework.orm/3.2.4.RELEASE/org.springframework.orm-3.2.4.RELEASE.jar
+ 338559 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/3.0_1/org.apache.servicemix.bundles.cglib-3.0_1.jar
+ 35859 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-io/1.2.1/spring-osgi-io-1.2.1.jar
+ 362889 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-core/1.2.1/spring-osgi-core-1.2.1.jar
+ 120822 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-extender/1.2.1/spring-osgi-extender-1.2.1.jar
+ 24231 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-annotation/1.2.1/spring-osgi-annotation-1.2.1.jar
+ 12597 2013-12-06 10:52 repository/org/apache/karaf/bundle/org.apache.karaf.bundle.springstate/4.0.0/org.apache.karaf.bundle.springstate-4.0.0.jar
+ 31903 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-io/1.0.0.RELEASE/gemini-blueprint-io-1.0.0.RELEASE.jar
+ 578205 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-core/1.0.0.RELEASE/gemini-blueprint-core-1.0.0.RELEASE.jar
+ 178525 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-extender/1.0.0.RELEASE/gemini-blueprint-extender-1.0.0.RELEASE.jar
+--------- -------
+ 9803140 38 files
+----
+
+As a KAR file is a simple zip file, you can create the KAR file by hand.
+
+For instance, the following Unix commands create a very simple KAR file:
+
+----
+~$ mkdir repository
+~$ cp /path/to/features.xml repository/features.xml
+~$ cp /path/to/my.jar repository/my/project/my/1.0.0/my-1.0.0.jar
+~$ zip -r my.kar repository
+updating: repository/ (stored 0%)
+ adding: repository/my/project/my/1.0.0/my-1.0.0.jar (deflated 0%)
+----
+
+You can create KAR files using Apache Maven, or directly in the Apache Karaf console.
+
+=== Maven
+
+Apache Karaf provides a Maven plugin: `karaf-maven-plugin`.
+
+The Apache Karaf Maven plugin provides the `kar` goal.
+
+The `kar` goal does:
+. Reads all features specified in the features XML.
+. For each feature described in the features XML, the goal resolves the bundles described in the feature.
+. The goal finally packages the features XML, and the resolved bundles in a zip file.
+
+For instance, the following Maven POM create `my-kar.kar`
+
+For instance, you can use the following POM to create a kar:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>my.groupId</groupId>
+ <artifactId>my-kar</artifactId>
+ <version>1.0</version>
+ <packaging>kar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>4.0.0</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+----
+
+To create the KAR file, simply type:
+
+----
+~$ mvn install
+----
+
+Uou will have your kar in the `target` directory.
+
+=== Commands
+
+Apache Karaf provides `kar:*` commands to manage KAR archives.
+
+==== `kar:list`
+
+The `kar:list` command lists the installed KAR archives.
+
+----
+karaf@root()> kar:list
+KAR Name
+-------------------
+my-kar-1.0-SNAPSHOT
+----
+
+A KAR is identified by its name.
+
+==== `kar:create`
+
+Instead of using the `karaf-maven-plugin` or create the KAR archive by hand, you can use the `kar:create` command.
+
+The `kar:create` command creates a KAR file using a registered features repository.
+
+For instance, you want to create a KAR file for the Pax Web repository.
+
+The `feature:repo-list` command gives you the list of registered features repositories:
+
+----
+karaf@root()> feature:repo-list
+Repository | URL
+-------------------------------------------------------------------------------------------------------
+standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
+enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
+spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
+org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
+----
+
+You can use one of these features repositories to create the kar file:
+
+----
+karaf@root()> kar:create org.ops4j.pax.web-4.1.4
+Adding feature pax-jetty
+Adding feature pax-http-whiteboard
+Adding feature pax-war
+Adding feature pax-http-tomcat
+Adding feature pax-war-tomcat
+Adding feature pax-http
+Adding feature pax-http-jetty
+Adding feature pax-jsf-support
+Adding feature pax-jetty-spdy
+Kar file created : /home/jbonofre/Downloads/apache-karaf-4.0.0/data/kar/org.ops4j.pax.web-4.1.4.kar
+----
+
+You can see that the KAR file has been created in the `KARAF_DATA/kar` folder.
+
+By default, the `kar:create` command creates a KAR file, packaging all features in the features descriptor.
+
+You can provide the list of features that you want to package into the KAR file:
+
+----
+karaf@root()> kar:create org.ops4j.pax.web-4.1.4 pax-jetty pax-tomcat
+Adding feature pax-jetty
+Adding feature pax-tomcat
+Kar file created : /opt/apache-karaf-4.1.4/data/kar/org.ops4j.pax.web-4.1.4.kar
+----
+
+==== `kar:install`
+
+You can deploy a KAR file using `kar:install` command.
+
+The `kar:install` command expects the KAR URL. Any URL described in the [Artifacts repositories and URLs section|urls]
+is supported by the `kar:install` command:
+
+----
+karaf@root()> kar:install file:/tmp/my-kar-1.0-SNAPSHOT.kar
+----
+
+The KAR file is uncompressed and populated the `KARAF_BASE/system` folder.
+
+The Apache Karaf KAR service is looking for features XML files in the KAR file, registers the features XML and automatically
+installs all features described in the features repositories present in the KAR file.
+
+==== `kar:uninstall`
+
+The `kar:uninstall` command uninstall a KAR file (identified by a name).
+
+By uninstall, it means that:
+
+* the features previously installed by the KAR file are uninstalled
+* delete (from the `KARAF_DATA/system` repository) all files previously "populated" by the KAR file
+
+For instance, to uninstall the previously installed `my-kar-1.0-SNAPSHOT.kar` KAR file:
+
+----
+karaf@root()> kar:uninstall my-kar-1.0-SNAPSHOT
+----
+
+=== Deployer
+
+Apache Karaf also provides a KAR deployer. It means that you can drop a KAR file directly in the `deploy` folder.
+
+Apache Karaf will automatically install KAR files from the `deploy` folder.
+
+You can change the behaviours of the KAR deployer in the `etc/org.apache.karaf.kar.cfg`:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# Enable or disable the refresh of the bundles when installing
+# the features contained in a KAR file
+#
+noAutoRefreshBundles=false
+----
+
+By default, when the KAR deployer install features, by default, it refresh the bundles already installed.
+You can disable the automatic bundles refresh by setting the `noAutoRefreshBundles` property to `false`.
+
+=== JMX KarMBean
+
+On the JMX layer, you have a MBean dedicated to the management of the KAR files.
+
+The ObjectName to use is `org.apache.karaf:type=kar,name=*`.
+
+==== Attributes
+
+The `Kars` attributes provides the list of KAR files (name) installed.
+
+==== Operations
+
+* `install(url)` installs the KAR file at the given `url`.
+* `create(repository, features)` creates a KAR file using the given features `repository` name, and optionally the
+list of `features` to include in the KAR file.
+* `uninstall(name)` uninstalls a KAR file with the given `name`.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/user-guide/log.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/log.adoc b/manual/src/main/asciidoc/user-guide/log.adoc
new file mode 100644
index 0000000..faaf16e
--- /dev/null
+++ b/manual/src/main/asciidoc/user-guide/log.adoc
@@ -0,0 +1,607 @@
+//
+// Licensed 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.
+//
+
+== Log
+
+Apache Karaf provides a very dynamic and powerful logging system.
+
+It supports:
+
+* the OSGi Log Service
+* the Apache Log4j v1 and v2 framework
+* the Apache Commons Logging framework
+* the Logback framework
+* the SLF4J framework
+* the native Java Util Logging framework
+
+It means that the applications can use any logging framework, Apache Karaf will use the central log system to manage the
+loggers, appenders, etc.
+
+=== Configuration files
+
+The initial log configuration is loaded from `etc/org.ops4j.pax.logging.cfg`.
+
+This file is a link:http://logging.apache.org/log4j/1.2/manual.html[standard Log4j configuration file].
+
+You find the different Log4j element:
+
+* loggers
+* appenders
+* layouts
+
+You can add your own initial configuration directly in the file.
+
+The default configuration is the following:
+
+----
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+# Root logger
+log4j.rootLogger=INFO, out, osgi:*
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j.appender.out.file=${karaf.data}/log/karaf.log
+log4j.appender.out.append=true
+log4j.appender.out.maxFileSize=1MB
+log4j.appender.out.maxBackupIndex=10
+
+# Sift appender
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=karaf
+log4j.appender.sift.appender=org.apache.log4j.FileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
+log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+----
+
+The default configuration only define the `ROOT` logger, with `INFO` log level, using the `out` file appender.
+You can change the log level to any Log4j valid values (from the most to less verbose): TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
+
+The `osgi:*` appender is a special appender to send the log message to the OSGi Log Service.
+
+A `stdout` console appender is pre-configured, but not enabled by default. This appender allows you to display log
+messages directly to standard output. It's interesting if you plan to run Apache Karaf in server mode (without console).
+
+To enable it, you have to add the `stdout` appender to the `rootLogger`:
+
+----
+log4j.rootLogger=INFO, out, stdout, osgi:*
+----
+
+The `out` appender is the default one. It's rolling file appender that maintain and rotate 10 log files of 1MB each.
+The log files are located in `data/log/karaf.log` by default.
+
+The `sift` appender is not enabled by default. This appender allows you to have one log file per deployed bundle.
+By default, the log file name format uses the bundle symbolic name (in the `data/log` folder).
+
+You can edit this file at runtime: any change will be reloaded and be effective immediately (no need to restart Apache Karaf).
+
+Another configuration file is used by Apache Karaf: `etc/org.apache.karaf.log.cfg`. This files configures the Log Service
+used by the log commands (see later).
+
+=== Log4j v2 support
+
+Karaf supports log4j v2 backend.
+
+To enable log4j v2 support you have to:
+
+. Edit `etc/startup.properties` to replace the line `org/ops4j/pax/logging/pax-logging-service/1.8.4/pax-logging-service-1.8.4.jar=8` with `org/ops4j/pax/logging/pax-logging-log4j2/1.8.4/pax-logging-log4j2-1.8.4.jar=8`
+. Add pax-logging-log4j2 jar file in `system/org/ops4j/pax/logging/pax-logging-log4j2/x.x/pax-logging-log4j2-x.x.jar where x.x is the version as defined in `etc/startup.properties`
+. Edit `etc/org.ops4j.pax.logging.cfg` configuration file and add `org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml`
+. Add the `etc/log4j2.xml` configuration file.
+
+A default configuration in `etc/log4j2.xml` could be:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n"/>
+ </Console>
+ <RollingFile name="out" fileName="${karaf.data}/log/karaf.log"
+ append="true" filePattern="${karaf.data}/log/$${date:yyyy-MM}/fuse-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="250 MB"/>
+ </Policies>
+ </RollingFile>
+ <PaxOsgi name="paxosgi" filter="VmLogAppender"/>
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="console"/>
+ <AppenderRef ref="out"/>
+ <AppenderRef ref="paxosgi"/>
+ </Root>
+ </Loggers>
+</Configuration>
+----
+
+=== Commands
+
+Instead of changing the `etc/org.ops4j.pax.logging.cfg` file, Apache Karaf provides a set of commands allowing to
+dynamically change the log configuration and see the log content:
+
+==== `log:clear`
+
+The `log:clear` command clears the log entries.
+
+==== `log:display`
+
+The `log:display` command displays the log entries.
+
+By default, it displays the log entries of the `rootLogger`:
+
+----
+karaf@root()> log:display
+2015-07-01 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.12.0 | BouncyCastle not registered, using the default JCE provider
+2015-07-01 19:12:47,368 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
+----
+
+You can also display the log entries from a specific logger, using the `logger` argument:
+
+----
+karaf@root()> log:display ssh
+2015-07-01 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.12.0 | BouncyCastle not registered, using the default JCE provider
+----
+
+By default, all log entries will be displayed. It could be very long if your Apache Karaf container is running since a long time.
+You can limit the number of entries to display using the `-n` option:
+
+----
+karaf@root()> log:display -n 5
+2015-07-01 06:53:24,143 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
+2015-07-01 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
+2015-07-01 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
+2015-07-01 06:53:24,152 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
+2015-07-01 06:53:24,501 | INFO | FelixStartLevel | RegionsPersistenceImpl | 78 - org.apache.karaf.region.persist - 4.0.0 | Loading region digraph persistence
+----
+
+You can also limit the number of entries stored and retain using the `size` property in `etc/org.apache.karaf.log.cfg` file:
+
+----
+#
+# The number of log statements to be displayed using log:display. It also defines the number
+# of lines searched for exceptions using log:display exception. You can override this value
+# at runtime using -n in log:display.
+#
+size = 500
+----
+
+By default, each log level is displayed with a different color: ERROR/FATAL are in red, DEBUG in purple, INFO in cyan, etc.
+You can disable the coloring using the `--no-color` option.
+
+The log entries format pattern doesn't use the conversion pattern define in `etc/org.ops4j.pax.logging.cfg` file.
+By default, it uses the `pattern` property defined in `etc/org.apache.karaf.log.cfg`.
+
+----
+#
+# The pattern used to format the log statement when using log:display. This pattern is according
+# to the log4j layout. You can override this parameter at runtime using log:display with -p.
+#
+pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+----
+
+You can also change the pattern dynamically (for one execution) using the `-p` option:
+
+----
+karaf@root()> log:display -p "%d - %c - %m%n"
+2015-07-01 07:01:58,007 - org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
+2015-07-01 07:01:58,725 - org.apache.aries.jmx.core - Starting JMX OSGi agent
+2015-07-01 07:01:58,744 - org.apache.aries.jmx.core - Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83] for service with service.id [13]
+2015-07-01 07:01:58,747 - org.apache.aries.jmx.core - Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83
+----
+
+The pattern is a regular Log4j pattern where you can use keywords like %d for the date, %c for the class, %m for the log
+message, etc.
+
+==== `log:exception-display`
+
+The `log:exception-display` command displays the last occurred exception.
+
+As for `log:display` command, the `log:exception-display` command uses the `rootLogger` by default, but you can
+specify a logger with the `logger` argument.
+
+==== `log:get`
+
+The `log:get` command show the current log level of a logger.
+
+By default, the log level showed is the one from the root logger:
+
+----
+karaf@root()> log:get
+Logger | Level
+--------------
+ROOT | INFO
+----
+
+You can specify a particular logger using the `logger` argument:
+
+----
+karaf@root()> log:get ssh
+Logger | Level
+--------------
+ssh | INFO
+----
+
+The `logger` argument accepts the `ALL` keyword to display the log level of all logger (as a list).
+
+For instance, if you have defined your own logger in `etc/org.ops4j.pax.logging.cfg` file like this:
+
+----
+log4j.logger.my.logger = DEBUG
+----
+
+you can see the list of loggers with the corresponding log level:
+
+----
+karaf@root()> log:get ALL
+Logger | Level
+-----------------
+ROOT | INFO
+my.logger | DEBUG
+----
+
+The `log:list` command is an alias to `log:get ALL`.
+
+==== `log:log`
+
+The `log:log` command allows you to manually add a message in the log. It's interesting when you create Apache Karaf
+scripts:
+
+----
+karaf@root()> log:log "Hello World"
+karaf@root()> log:display
+2015-07-01 07:20:16,544 | INFO | Local user karaf | command | 59 - org.apache.karaf.log.command - 4.0.0 | Hello World
+----
+
+By default, the log level is INFO, but you can specify a different log level using the `-l` option:
+
+----
+karaf@root()> log:log -l ERROR "Hello World"
+karaf@root()> log:display
+2015-07-01 07:21:38,902 | ERROR | Local user karaf | command | 59 - org.apache.karaf.log.command - 4.0.0 | Hello World
+----
+
+==== `log:set`
+
+The `log:set` command sets the log level of a logger.
+
+By default, it changes the log level of the `rootLogger`:
+
+----
+karaf@root()> log:set DEBUG
+karaf@root()> log:get
+Logger | Level
+--------------
+ROOT | DEBUG
+----
+
+You can specify a particular logger using the `logger` argument, after the `level` one:
+
+----
+karaf@root()> log:set INFO my.logger
+karaf@root()> log:get my.logger
+Logger | Level
+-----------------
+my.logger | INFO
+----
+
+The `level` argument accepts any Log4j log level: TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
+
+By it also accepts the DEFAULT special keyword.
+
+The purpose of the DEFAULT keyword is to delete the current level of the logger (and only the level, the other properties
+like appender are not deleted)
+in order to use the level of the logger parent (logger are hierarchical).
+
+For instance, you have defined the following loggers (in `etc/org.ops4j.pax.logging.cfg` file):
+
+----
+rootLogger=INFO,out,osgi:*
+my.logger=INFO,appender1
+my.logger.custom=DEBUG,appender2
+----
+
+You can change the level of `my.logger.custom` logger:
+
+----
+karaf@root()> log:set INFO my.logger.custom
+----
+
+Now we have:
+
+----
+rootLogger=INFO,out,osgi:*
+my.logger=INFO,appender1
+my.logger.custom=INFO,appender2
+----
+
+You can use the DEFAULT keyword on `my.logger.custom` logger to remove the level:
+
+----
+karaf@root()> log:set DEFAULT my.logger.custom
+----
+
+Now we have:
+
+----
+rootLogger=INFO,out,osgi:*
+my.logger=INFO,appender1
+my.logger.custom=appender2
+----
+
+It means that, at runtime, the `my.logger.custom` logger uses the level of its parent `my.logger`, so `INFO`.
+
+Now, if we use DEFAULT keyword with the `my.logger` logger:
+
+----
+karaf@root()> log:set DEFAULT my.logger
+----
+
+We have:
+
+----
+rootLogger=INFO,out,osgi:*
+my.logger=appender1
+my.logger.custom=appender2
+----
+
+So, both `my.logger.custom` and `my.logger` use the log level of the parent `rootLogger`.
+
+It's not possible to use DEFAULT keyword with the `rootLogger` and it doesn't have parent.
+
+==== `log:tail`
+
+The `log:tail` is exactly the same as `log:display` but it continuously displays the log entries.
+
+You can use the same options and arguments as for the `log:display` command.
+
+By default, it displays the entries from the `rootLogger`:
+
+----
+karaf@root()> log:tail
+2015-07-01 07:40:28,152 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.9.0 | BouncyCastle not registered, using the default JCE provider
+2015-07-01 07:40:28,909 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
+2015-07-01 07:40:28,928 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b] for service with service.id [13]
+2015-07-01 07:40:28,936 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b
+----
+
+To exit from the `log:tail` command, just type CTRL-C.
+
+=== JMX LogMBean
+
+All actions that you can perform with the `log:*` command can be performed using the LogMBean.
+
+The LogMBean object name is `org.apache.karaf:type=log,name=*`.
+
+==== Attributes
+
+* `Level` attribute is the level of the ROOT logger.
+
+==== Operations
+
+* `getLevel(logger)` to get the log level of a specific logger. As this operation supports the ALL keyword, it returns a Map with the level of each logger.
+* `setLevel(level, logger)` to set the log level of a specific logger. This operation supports the DEFAULT keyword as for the `log:set` command.
+
+=== Advanced configuration
+
+==== Filters
+
+You can use filters on appender. Filters allow log events to be evaluated to determine if or how they should be published.
+
+Log4j provides ready to use filters:
+
+* The DenyAllFilter (`org.apache.log4j.varia.DenyAllFilter`) drops all logging events.
+ You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise"
+ filtering behaviour to a "deny all unless instructed otherwise" behaviour.
+* The LevelMatchFilter (`org.apache.log4j.varia.LevelMatchFilter` is a very simple filter based on level matching.
+ The filter admits two options `LevelToMatch` and `AcceptOnMatch`. If there is an exact match between the value of
+ the `LevelToMatch` option and the level of the logging event, then the event is accepted in case the `AcceptOnMatch`
+ option value is set to `true`. Else, if the `AcceptOnMatch` option value is set to `false`, the log event is rejected.
+* The LevelRangeFilter (`org.apache.log4j.varia.LevelRangeFilter` is a very simple filter based on level matching,
+ which can be used to reject messages with priorities outside a certain range. The filter admits three options `LevelMin`,
+ `LevelMax` and `AcceptOnMatch`. If the log event level is between `LevelMin` and `LevelMax`, the log event is
+ accepted if `AcceptOnMatch` is true, or rejected if `AcceptOnMatch` is false.
+* The StringMatchFilter (`org.apache.log4j.varia.StringMatchFilter`) is a very simple filter based on string matching.
+ The filter admits two options `StringToMatch` and `AcceptOnMatch`. If there is a match between the `StringToMatch`
+ and the log event message, the log event is accepted if `AcceptOnMatch` is true, or rejected if `AcceptOnMatch` is false.
+
+The filter is defined directly on the appender, in the `etc/org.ops4j.pax.logging.cfg` configuration file.
+
+The format to use it:
+
+----
+log4j.appender.[appender-name].filter.[filter-name]=[filter-class]
+log4j.appender.[appender-name].filter.[filter-name].[option]=[value]
+----
+
+For instance, you can use the `f1` LevelRangeFilter on the `out` default appender:
+
+----
+log4j.appender.out.filter.f1=org.apache.log4j.varia.LevelRangeFilter
+log4j.appender.out.filter.f1.LevelMax=FATAL
+log4j.appender.out.filter.f1.LevelMin=DEBUG
+----
+
+Thanks to this filter, the log files generated by the `out` appender will contain only log messages with a level
+between DEBUG and FATAL (the log events with TRACE as level are rejected).
+
+==== Nested appenders
+
+A nested appender is a special kind of appender that you use "inside" another appender.
+It allows you to create some kind of "routing" between a chain of appenders.
+
+The most used "nested compliant" appender are:
+
+* The AsyncAppender (`org.apache.log4j.AsyncAppender`) logs events asynchronously. This appender collects the events
+ and dispatch them to all the appenders that are attached to it.
+* The RewriteAppender (`org.apache.log4j.rewrite.RewriteAppender`) forwards log events to another appender after possibly
+ rewriting the log event.
+
+This kind of appender accepts an `appenders` property in the appender definition:
+
+----
+log4j.appender.[appender-name].appenders=[comma-separated-list-of-appender-names]
+----
+
+For instance, you can create a AsyncAppender named `async` and asynchronously dispatch the log events to a JMS appender:
+
+----
+log4j.appender.async=org.apache.log4j.AsyncAppender
+log4j.appender.async.appenders=jms
+
+log4j.appender.jms=org.apache.log4j.net.JMSAppender
+...
+----
+
+==== Error handlers
+
+Sometime, appenders can fail. For instance, a RollingFileAppender tries to write on the filesystem but the filesystem is full, or a JMS appender tries to send a message but the JMS broker is not there.
+
+As log can be very critical to you, you have to be inform that the log appender failed.
+
+It's the purpose of the error handlers. Appenders may delegate their error handling to error handlers, giving a chance to react to this appender errors.
+
+You have two error handlers available:
+
+* The OnlyOnceErrorHandler (`org.apache.log4j.helpers.OnlyOnceErrorHandler`) implements log4j's default error handling policy
+ which consists of emitting a message for the first error in an appender and ignoring all following errors. The error message
+ is printed on `System.err`.
+ This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails.
+* The FallbackErrorHandler (`org.apache.log4j.varia.FallbackErrorHandler`) allows a secondary appender to take over if the primary appender fails.
+ The error message is printed on `System.err`, and logged in the secondary appender.
+
+You can define the error handler that you want to use for each appender using the `errorhandler` property on the appender definition itself:
+
+----
+log4j.appender.[appender-name].errorhandler=[error-handler-class]
+log4j.appender.[appender-name].errorhandler.root-ref=[true|false]
+log4j.appender.[appender-name].errorhandler.logger-ref=[logger-ref]
+log4j.appender.[appender-name].errorhandler.appender-ref=[appender-ref]
+----
+
+==== OSGi specific MDC attributes
+
+The `sift` appender is a OSGi oriented appender allowing you to split the log events based on MDC (Mapped Diagnostic Context) attributes.
+
+MDC allows you to distinguish the different source of log events.
+
+The `sift` appender provides OSGi oritend MDC attributes by default:
+
+* `bundle.id` is the bundle ID
+* `bundle.name` is the bundle symbolic name
+* `bundle.version` is the bundle version
+
+You can use these MDC properties to create a log file per bundle:
+
+----
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=karaf
+log4j.appender.sift.appender=org.apache.log4j.FileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
+log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+----
+
+==== Enhanced OSGi stack trace renderer
+
+By default, Apache Karaf provides a special stack trace renderer, adding some OSGi specific specific information.
+
+In the stack trace, in addition of the class throwing the exception, you can find a pattern `[id:name:version]` at the
+end of each stack trace line, where:
+
+* `id` is the bundle ID
+* `name` is the bundle name
+* `version` is the bundle version
+
+It's very helpful to diagnosing the source of an issue.
+
+For instance, in the following IllegalArgumentException stack trace, we can see the OSGi details about the source of the exception:
+
+----
+java.lang.IllegalArgumentException: Command not found: *:foo
+ at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:225)[21:org.apache.karaf.shell.console:4.0.0]
+ at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[21:org.apache.karaf.shell.console:4.0.0]
+ at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[21:org.apache.karaf.shell.console:4.0.0]
+ at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[21:org.apache.karaf.shell.console:4.0.0]
+ at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[21:org.apache.karaf.shell.console:4.0.0]
+ at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)[21:org.apache.karaf.shell.console:4.0.0]
+ at java.lang.Thread.run(Thread.java:637)[:1.7.0_21]
+----
+
+==== Custom appenders
+
+You can use your own appenders in Apache Karaf.
+
+The easiest way to do that is to package your appender as an OSGi bundle and attach it as a fragment of the
+`org.ops4j.pax.logging.pax-logging-service` bundle.
+
+For instance, you create `MyAppender`:
+
+----
+public class MyAppender extends AppenderSkeleton {
+...
+}
+----
+
+You compile and package as an OSGi bundle containing a MANIFEST looking like:
+
+----
+Manifest:
+Bundle-SymbolicName: org.mydomain.myappender
+Fragment-Host: org.ops4j.pax.logging.pax-logging-service
+...
+----
+
+Copy your bundle in the Apache Karaf `system` folder. The `system` folder uses a standard Maven directory layout: groupId/artifactId/version.
+
+In the `etc/startup.properties` configuration file, you define your bundle in the list before the pax-logging-service bundle.
+
+You have to restart Apache Karaf with a clean run (purging the `data` folder) in order to reload the system bundles.
+You can now use your appender directly in `etc/org.ops4j.pax.logging.cfg` configuration file.
[03/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/log.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/log.conf b/manual/src/main/webapp/users-guide/log.conf
deleted file mode 100644
index 86166b6..0000000
--- a/manual/src/main/webapp/users-guide/log.conf
+++ /dev/null
@@ -1,551 +0,0 @@
-h1. Log
-
-Apache Karaf provides a very dynamic and powerful logging system.
-
-It supports:
-
-* the OSGi Log Service
-* the Apache Log4j framework
-* the Apache Commons Logging framework
-* the Logback framework
-* the SLF4J framework
-* the native Java Util Logging framework
-
-It means that the applications can use any logging framework, Apache Karaf will use the central log system to manage the
-loggers, appenders, etc.
-
-h2. Configuration files
-
-The initial log configuration is loaded from {{etc/org.ops4j.pax.logging.cfg}}.
-
-This file is a [standard Log4j configuration file|http://logging.apache.org/log4j/1.2/manual.html].
-
-You find the different Log4j element:
-
-* loggers
-* appenders
-* layouts
-
-You can add your own initial configuration directly in the file.
-
-The default configuration is the following:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-# Root logger
-log4j.rootLogger=INFO, out, osgi:*
-log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-log4j.appender.out.file=${karaf.data}/log/karaf.log
-log4j.appender.out.append=true
-log4j.appender.out.maxFileSize=1MB
-log4j.appender.out.maxBackupIndex=10
-
-# Sift appender
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=karaf
-log4j.appender.sift.appender=org.apache.log4j.FileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
-log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
-{code}
-
-The default configuration only define the {{ROOT}} logger, with {{INFO}} log level, using the {{out}} file appender.
-You can change the log level to any Log4j valid values (from the most to less verbose): TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
-
-The {{osgi:*}} appender is a special appender to send the log message to the OSGi Log Service.
-
-A {{stdout}} console appender is pre-configured, but not enabled by default. This appender allows you to display log
-messages directly to standard output. It's interesting if you plan to run Apache Karaf in server mode (without console).
-
-To enable it, you have to add the {{stdout}} appender to the {{rootLogger}}:
-
-{code}
-log4j.rootLogger=INFO, out, stdout, osgi:*
-{code}
-
-The {{out}} appender is the default one. It's rolling file appender that maintain and rotate 10 log files of 1MB each.
-The log files are located in {{data/log/karaf.log}} by default.
-
-The {{sift}} appender is not enabled by default. This appender allows you to have one log file per deployed bundle.
-By default, the log file name format uses the bundle symbolic name (in the {{data/log}} folder).
-
-You can edit this file at runtime: any change will be reloaded and be effective immediately (no need to restart Apache Karaf).
-
-Another configuration file is used by Apache Karaf: {{etc/org.apache.karaf.log.cfg}}. This files configures the Log Service
-used by the log commands (see later).
-
-h2. Commands
-
-Instead of changing the {{etc/org.ops4j.pax.logging.cfg}} file, Apache Karaf provides a set of commands allowing to
-dynamically change the log configuration and see the log content:
-
-h3. {{log:clear}}
-
-The {{log:clear}} command clears the log entries.
-
-h3. {{log:display}}
-
-The {{log:display}} command displays the log entries.
-
-By default, it displays the log entries of the {{rootLogger}}:
-
-{code}
-karaf@root()> log:display
-2015-07-01 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.12.0 | BouncyCastle not registered, using the default JCE provider
-2015-07-01 19:12:47,368 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
-{code}
-
-You can also display the log entries from a specific logger, using the {{logger}} argument:
-
-{code}
-karaf@root()> log:display ssh
-2015-07-01 19:12:46,208 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.12.0 | BouncyCastle not registered, using the default JCE provider
-{code}
-
-By default, all log entries will be displayed. It could be very long if your Apache Karaf container is running since a long time.
-You can limit the number of entries to display using the {{-n}} option:
-
-{code}
-karaf@root()> log:display -n 5
-2015-07-01 06:53:24,143 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=bundleState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2015-07-01 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=packageState,version=1.5,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2015-07-01 06:53:24,150 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=serviceState,version=1.7,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2015-07-01 06:53:24,152 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.framework.wiring.BundleWiringStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.core:type=wiringState,version=1.1,framework=org.apache.felix.framework,uuid=5335370f-9dee-449f-9b1c-cabe74432ed1
-2015-07-01 06:53:24,501 | INFO | FelixStartLevel | RegionsPersistenceImpl | 78 - org.apache.karaf.region.persist - 4.0.0 | Loading region digraph persistence
-{code}
-
-You can also limit the number of entries stored and retain using the {{size}} property in {{etc/org.apache.karaf.log.cfg}} file:
-
-{code}
-#
-# The number of log statements to be displayed using log:display. It also defines the number
-# of lines searched for exceptions using log:display exception. You can override this value
-# at runtime using -n in log:display.
-#
-size = 500
-{code}
-
-By default, each log level is displayed with a different color: ERROR/FATAL are in red, DEBUG in purple, INFO in cyan, etc.
-You can disable the coloring using the {{--no-color}} option.
-
-The log entries format pattern doesn't use the conversion pattern define in {{etc/org.ops4j.pax.logging.cfg}} file.
-By default, it uses the {{pattern}} property defined in {{etc/org.apache.karaf.log.cfg}}.
-
-{code}
-#
-# The pattern used to format the log statement when using log:display. This pattern is according
-# to the log4j layout. You can override this parameter at runtime using log:display with -p.
-#
-pattern = %d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-{code}
-
-You can also change the pattern dynamically (for one execution) using the {{-p}} option:
-
-{code}
-karaf@root()> log:display -p "%d - %c - %m%n"
-2015-07-01 07:01:58,007 - org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
-2015-07-01 07:01:58,725 - org.apache.aries.jmx.core - Starting JMX OSGi agent
-2015-07-01 07:01:58,744 - org.apache.aries.jmx.core - Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83] for service with service.id [13]
-2015-07-01 07:01:58,747 - org.apache.aries.jmx.core - Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=6361fc65-8df4-4886-b0a6-479df2d61c83
-{code}
-
-The pattern is a regular Log4j pattern where you can use keywords like %d for the date, %c for the class, %m for the log
-message, etc.
-
-h3. {{log:exception-display}}
-
-The {{log:exception-display}} command displays the last occurred exception.
-
-As for {{log:display}} command, the {{log:exception-display}} command uses the {{rootLogger}} by default, but you can
-specify a logger with the {{logger}} argument.
-
-h3. {{log:get}}
-
-The {{log:get}} command show the current log level of a logger.
-
-By default, the log level showed is the one from the root logger:
-
-{code}
-karaf@root()> log:get
-Logger | Level
---------------
-ROOT | INFO
-{code}
-
-You can specify a particular logger using the {{logger}} argument:
-
-{code}
-karaf@root()> log:get ssh
-Logger | Level
---------------
-ssh | INFO
-{code}
-
-The {{logger}} argument accepts the {{ALL}} keyword to display the log level of all logger (as a list).
-
-For instance, if you have defined your own logger in {{etc/org.ops4j.pax.logging.cfg}} file like this:
-
-{code}
-log4j.logger.my.logger = DEBUG
-{code}
-
-you can see the list of loggers with the corresponding log level:
-
-{code}
-karaf@root()> log:get ALL
-Logger | Level
------------------
-ROOT | INFO
-my.logger | DEBUG
-{code}
-
-The {{log:list}} command is an alias to {{log:get ALL}}.
-
-h3. {{log:log}}
-
-The {{log:log}} command allows you to manually add a message in the log. It's interesting when you create Apache Karaf
-scripts:
-
-{code}
-karaf@root()> log:log "Hello World"
-karaf@root()> log:display
-2015-07-01 07:20:16,544 | INFO | Local user karaf | command | 59 - org.apache.karaf.log.command - 4.0.0 | Hello World
-{code}
-
-By default, the log level is INFO, but you can specify a different log level using the {{-l}} option:
-
-{code}
-karaf@root()> log:log -l ERROR "Hello World"
-karaf@root()> log:display
-2015-07-01 07:21:38,902 | ERROR | Local user karaf | command | 59 - org.apache.karaf.log.command - 4.0.0 | Hello World
-{code}
-
-h3. {{log:set}}
-
-The {{log:set}} command sets the log level of a logger.
-
-By default, it changes the log level of the {{rootLogger}}:
-
-{code}
-karaf@root()> log:set DEBUG
-karaf@root()> log:get
-Logger | Level
---------------
-ROOT | DEBUG
-{code}
-
-You can specify a particular logger using the {{logger}} argument, after the {{level}} one:
-
-{code}
-karaf@root()> log:set INFO my.logger
-karaf@root()> log:get my.logger
-Logger | Level
------------------
-my.logger | INFO
-{code}
-
-The {{level}} argument accepts any Log4j log level: TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
-
-By it also accepts the DEFAULT special keyword.
-
-The purpose of the DEFAULT keyword is to delete the current level of the logger (and only the level, the other properties
-like appender are not deleted)
-in order to use the level of the logger parent (logger are hierarchical).
-
-For instance, you have defined the following loggers (in {{etc/org.ops4j.pax.logging.cfg}} file):
-
-{code}
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=DEBUG,appender2
-{code}
-
-You can change the level of {{my.logger.custom}} logger:
-
-{code}
-karaf@root()> log:set INFO my.logger.custom
-{code}
-
-Now we have:
-
-{code}
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=INFO,appender2
-{code}
-
-You can use the DEFAULT keyword on {{my.logger.custom}} logger to remove the level:
-
-{code}
-karaf@root()> log:set DEFAULT my.logger.custom
-{code}
-
-Now we have:
-
-{code}
-rootLogger=INFO,out,osgi:*
-my.logger=INFO,appender1
-my.logger.custom=appender2
-{code}
-
-It means that, at runtime, the {{my.logger.custom}} logger uses the level of its parent {{my.logger}}, so {{INFO}}.
-
-Now, if we use DEFAULT keyword with the {{my.logger}} logger:
-
-{code}
-karaf@root()> log:set DEFAULT my.logger
-{code}
-
-We have:
-
-{code}
-rootLogger=INFO,out,osgi:*
-my.logger=appender1
-my.logger.custom=appender2
-{code}
-
-So, both {{my.logger.custom}} and {{my.logger}} use the log level of the parent {{rootLogger}}.
-
-It's not possible to use DEFAULT keyword with the {{rootLogger}} and it doesn't have parent.
-
-h3. {{log:tail}}
-
-The {{log:tail}} is exactly the same as {{log:display}} but it continuously displays the log entries.
-
-You can use the same options and arguments as for the {{log:display}} command.
-
-By default, it displays the entries from the {{rootLogger}}:
-
-{code}
-karaf@root()> log:tail
-2015-07-01 07:40:28,152 | INFO | FelixStartLevel | SecurityUtils | 16 - org.apache.sshd.core - 0.9.0 | BouncyCastle not registered, using the default JCE provider
-2015-07-01 07:40:28,909 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Starting JMX OSGi agent
-2015-07-01 07:40:28,928 | INFO | FelixStartLevel | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b] for service with service.id [13]
-2015-07-01 07:40:28,936 | INFO | JMX OSGi Agent | core | 68 - org.apache.aries.jmx.core - 1.1.1 | Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@27cc75cb with name osgi.compendium:service=cm,version=1.3,framework=org.apache.felix.framework,uuid=b44a44b7-41cd-498f-936d-3b12d7aafa7b
-{code}
-
-To exit from the {{log:tail}} command, just type CTRL-C.
-
-h2. JMX LogMBean
-
-All actions that you can perform with the {{log:*}} command can be performed using the LogMBean.
-
-The LogMBean object name is {{org.apache.karaf:type=log,name=*}}.
-
-h3. Attributes
-
-* {{Level}} attribute is the level of the ROOT logger.
-
-h3. Operations
-
-* {{getLevel(logger)}} to get the log level of a specific logger. As this operation supports the ALL keyword, it returns a Map with the level of each logger.
-* {{setLevel(level, logger)}} to set the log level of a specific logger. This operation supports the DEFAULT keyword as for the {{log:set}} command.
-
-h2. Advanced configuration
-
-h3. Filters
-
-You can use filters on appender. Filters allow log events to be evaluated to determine if or how they should be published.
-
-Log4j provides ready to use filters:
-
-* The DenyAllFilter ({{org.apache.log4j.varia.DenyAllFilter}}) drops all logging events.
- You can add this filter to the end of a filter chain to switch from the default "accept all unless instructed otherwise"
- filtering behaviour to a "deny all unless instructed otherwise" behaviour.
-* The LevelMatchFilter ({{org.apache.log4j.varia.LevelMatchFilter}} is a very simple filter based on level matching.
- The filter admits two options {{LevelToMatch}} and {{AcceptOnMatch}}. If there is an exact match between the value of
- the {{LevelToMatch}} option and the level of the logging event, then the event is accepted in case the {{AcceptOnMatch}}
- option value is set to {{true}}. Else, if the {{AcceptOnMatch}} option value is set to {{false}}, the log event is rejected.
-* The LevelRangeFilter ({{org.apache.log4j.varia.LevelRangeFilter}} is a very simple filter based on level matching,
- which can be used to reject messages with priorities outside a certain range. The filter admits three options {{LevelMin}},
- {{LevelMax}} and {{AcceptOnMatch}}. If the log event level is between {{LevelMin}} and {{LevelMax}}, the log event is
- accepted if {{AcceptOnMatch}} is true, or rejected if {{AcceptOnMatch}} is false.
-* The StringMatchFilter ({{org.apache.log4j.varia.StringMatchFilter}}) is a very simple filter based on string matching.
- The filter admits two options {{StringToMatch}} and {{AcceptOnMatch}}. If there is a match between the {{StringToMatch}}
- and the log event message, the log event is accepted if {{AcceptOnMatch}} is true, or rejected if {{AcceptOnMatch}} is false.
-
-The filter is defined directly on the appender, in the {{etc/org.ops4j.pax.logging.cfg}} configuration file.
-
-The format to use it:
-
-{code}
-log4j.appender.[appender-name].filter.[filter-name]=[filter-class]
-log4j.appender.[appender-name].filter.[filter-name].[option]=[value]
-{code}
-
-For instance, you can use the {{f1}} LevelRangeFilter on the {{out}} default appender:
-
-{code}
-log4j.appender.out.filter.f1=org.apache.log4j.varia.LevelRangeFilter
-log4j.appender.out.filter.f1.LevelMax=FATAL
-log4j.appender.out.filter.f1.LevelMin=DEBUG
-{code}
-
-Thanks to this filter, the log files generated by the {{out}} appender will contain only log messages with a level
-between DEBUG and FATAL (the log events with TRACE as level are rejected).
-
-h3. Nested appenders
-
-A nested appender is a special kind of appender that you use "inside" another appender.
-It allows you to create some kind of "routing" between a chain of appenders.
-
-The most used "nested compliant" appender are:
-
-* The AsyncAppender ({{org.apache.log4j.AsyncAppender}}) logs events asynchronously. This appender collects the events
- and dispatch them to all the appenders that are attached to it.
-* The RewriteAppender ({{org.apache.log4j.rewrite.RewriteAppender}}) forwards log events to another appender after possibly
- rewriting the log event.
-
-This kind of appender accepts an {{appenders}} property in the appender definition:
-
-{code}
-log4j.appender.[appender-name].appenders=[comma-separated-list-of-appender-names]
-{code}
-
-For instance, you can create a AsyncAppender named {{async}} and asynchronously dispatch the log events to a JMS appender:
-
-{code}
-log4j.appender.async=org.apache.log4j.AsyncAppender
-log4j.appender.async.appenders=jms
-
-log4j.appender.jms=org.apache.log4j.net.JMSAppender
-...
-{code}
-
-h3. Error handlers
-
-Sometime, appenders can fail. For instance, a RollingFileAppender tries to write on the filesystem but the filesystem is full, or a JMS appender tries to send a message but the JMS broker is not there.
-
-As log can be very critical to you, you have to be inform that the log appender failed.
-
-It's the purpose of the error handlers. Appenders may delegate their error handling to error handlers, giving a chance to react to this appender errors.
-
-You have two error handlers available:
-
-* The OnlyOnceErrorHandler ({{org.apache.log4j.helpers.OnlyOnceErrorHandler}}) implements log4j's default error handling policy
- which consists of emitting a message for the first error in an appender and ignoring all following errors. The error message
- is printed on {{System.err}}.
- This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails.
-* The FallbackErrorHandler ({{org.apache.log4j.varia.FallbackErrorHandler}}) allows a secondary appender to take over if the primary appender fails.
- The error message is printed on {{System.err}}, and logged in the secondary appender.
-
-You can define the error handler that you want to use for each appender using the {{errorhandler}} property on the appender definition itself:
-
-{code}
-log4j.appender.[appender-name].errorhandler=[error-handler-class]
-log4j.appender.[appender-name].errorhandler.root-ref=[true|false]
-log4j.appender.[appender-name].errorhandler.logger-ref=[logger-ref]
-log4j.appender.[appender-name].errorhandler.appender-ref=[appender-ref]
-{code}
-
-h3. OSGi specific MDC attributes
-
-The {{sift}} appender is a OSGi oriented appender allowing you to split the log events based on MDC (Mapped Diagnostic Context) attributes.
-
-MDC allows you to distinguish the different source of log events.
-
-The {{sift}} appender provides OSGi oritend MDC attributes by default:
-
-* {{bundle.id}} is the bundle ID
-* {{bundle.name}} is the bundle symbolic name
-* {{bundle.version}} is the bundle version
-
-You can use these MDC properties to create a log file per bundle:
-
-{code}
-log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
-log4j.appender.sift.key=bundle.name
-log4j.appender.sift.default=karaf
-log4j.appender.sift.appender=org.apache.log4j.FileAppender
-log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
-log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
-{code}
-
-h3. Enhanced OSGi stack trace renderer
-
-By default, Apache Karaf provides a special stack trace renderer, adding some OSGi specific specific information.
-
-In the stack trace, in addition of the class throwing the exception, you can find a pattern {{[id:name:version]}} at the
-end of each stack trace line, where:
-
-* {{id}} is the bundle ID
-* {{name}} is the bundle name
-* {{version}} is the bundle version
-
-It's very helpful to diagnosing the source of an issue.
-
-For instance, in the following IllegalArgumentException stack trace, we can see the OSGi details about the source of the exception:
-
-{code}
-java.lang.IllegalArgumentException: Command not found: *:foo
- at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:225)[21:org.apache.karaf.shell.console:4.0.0]
- at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[21:org.apache.karaf.shell.console:4.0.0]
- at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[21:org.apache.karaf.shell.console:4.0.0]
- at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[21:org.apache.karaf.shell.console:4.0.0]
- at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[21:org.apache.karaf.shell.console:4.0.0]
- at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)[21:org.apache.karaf.shell.console:4.0.0]
- at java.lang.Thread.run(Thread.java:637)[:1.7.0_21]
-{code}
-
-h3. Custom appenders
-
-You can use your own appenders in Apache Karaf.
-
-The easiest way to do that is to package your appender as an OSGi bundle and attach it as a fragment of the
-{{org.ops4j.pax.logging.pax-logging-service}} bundle.
-
-For instance, you create {{MyAppender}}:
-
-{code}
-public class MyAppender extends AppenderSkeleton {
-...
-}
-{code}
-
-You compile and package as an OSGi bundle containing a MANIFEST looking like:
-
-{code}
-Manifest:
-Bundle-SymbolicName: org.mydomain.myappender
-Fragment-Host: org.ops4j.pax.logging.pax-logging-service
-...
-{code}
-
-Copy your bundle in the Apache Karaf {{system}} folder. The {{system}} folder uses a standard Maven directory layout: groupId/artifactId/version.
-
-In the {{etc/startup.properties}} configuration file, you define your bundle in the list before the pax-logging-service bundle.
-
-You have to restart Apache Karaf with a clean run (purging the {{data}} folder) in order to reload the system bundles.
-You can now use your appender directly in {{etc/org.ops4j.pax.logging.cfg}} configuration file.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/monitoring.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/monitoring.conf b/manual/src/main/webapp/users-guide/monitoring.conf
deleted file mode 100644
index 23229e8..0000000
--- a/manual/src/main/webapp/users-guide/monitoring.conf
+++ /dev/null
@@ -1,265 +0,0 @@
-h1. Monitoring and Management using JMX
-
-Apache Karaf provides a complete JMX layer.
-
-You can remotely connect to a running Apache Karaf instance using any JMX client (like jconsole).
-
-The Apache Karaf features provide a set of MBeans, dedicating for the monitoring and management.
-
-h2. Connecting
-
-Apache Karaf exposes a complete MBean server that you can use remotely.
-
-The default port number is 1099.
-
-The JMX URL to use by default is:
-
-{code}
-service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
-{code}
-
-If don't need the remote JMX at all, users can remove
-{code}
--Dcom.sun.management.jmxremote
-{code}
-from bin/karaf|bin/karaf.bat to avoid opening the RMI listening port.
-
-You have to provide an username and password to access to the JMX layer.
-The JMX layer user the security framework, and so, by default, it uses the users defined in {{etc/users.properties}}.
-
-You can change the port numbers of the JMX layer in the {{etc/org.apache.karaf.management.cfg}} configuration file.
-
-h2. Configuration
-
-The Apache Karaf JMX management layer is configured in the {{etc/org.apache.karaf.management.cfg}} configuration file:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# The properties in this file define the configuration of Apache Karaf's JMX Management
-#
-
-#
-# Port number for RMI registry connection
-#
-rmiRegistryPort = 1099
-
-#
-# Port number for RMI server connection
-#
-rmiServerPort = 44444
-
-#
-# Name of the JAAS realm used for authentication
-#
-jmxRealm = karaf
-
-#
-# The service URL for the JMXConnectorServer
-#
-serviceUrl = service:jmx:rmi://0.0.0.0:${rmiServerPort}/jndi/rmi://0.0.0.0:${rmiRegistryPort}/karaf-${karaf.name}
-
-#
-# Whether any threads started for the JMXConnectorServer should be started as daemon threads
-#
-daemon = true
-
-#
-# Whether the JMXConnectorServer should be started in a separate thread
-#
-threaded = true
-
-#
-# The ObjectName used to register the JMXConnectorServer
-#
-objectName = connector:name=rmi
-
-#
-# Role name used for JMX access authorization
-# If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties
-#
-# jmxRole=admin
-{code}
-
-* {{rmiRegistryPort}} property contains the port number of the JMX RMI registry. Default is {{1099}}.
-* {{rmiServerPort}} property contains the port number of the JMX RMI server. Default is {{44444}}.
-* {{jmxRealm}} is the security realm to use as authentication backend. By default it uses the {{karaf}} realm.
-
-h2. MBeans
-
-Apache Karaf provides a bunch of MBeans.
-
-The MBeans object names have the same format:
-
-{code}
-org.apache.karaf:type=[feature],name=[instance]
-{code}
-
-Installing additional Apache Karaf features and external applications can provide new MBeans.
-
-The following MBeans list is non exhaustive:
-
-* {{org.apache.karaf:type=bundle,name=*}}: management of the OSGi bundles.
-* {{org.apache.karaf:type=config,name=*}}: management of the configurations.
-* {{org.apache.karaf:type=diagnostic,name=*}}: creation of dumps containing the current Apache Karaf activity (used for diagnostic).
-* {{org.apache.karaf:type=feature,name=*}}: management of the Apache Karaf features.
-* {{org.apache.karaf:type=http,name=*}}: management of the HTTP service (provided by the {{http}} feature).
-* {{org.apache.karaf:type=instance,name=*}}: management of the instances.
-* {{org.apache.karaf:type=jdbc,name=*}}: management of the JDBC service (provided by the {{jdbc}} feature).
-* {{org.apache.karaf:type=jms,name=*}}: management of the JMS service (provided by the {{jms}} feature).
-* {{org.apache.karaf:type=jndi,name=*}}: management of the JNDI service (provided by the {{jndi}} feature).
-* {{org.apache.karaf:type=kar,name=*}}: management of the KAR file.
-* {{org.apache.karaf:type=log,name=*}}: management of the log service.
-* {{org.apache.karaf:type=obr,name=*}}: management of the OBR service (provided by the {{obr}} feature).
-* {{org.apache.karaf:type=package,name=*}}: details about packages exported/imported.
-* {{org.apache.karaf:type=service,name=*}}: management of the OSGi services.
-* {{org.apache.karaf:type=system,name=*}}: management of the Apache Karaf container itself (halt, restart, etc).
-* {{org.apache.karaf:type=web,name=*}}: management of WebApplications (provided by the {{war}} feature).
-* {{org.apache.karaf:type=wrapper,name=*}}: management of the service wrapper (provided by the {{wrapper}} feature).
-
-h2. RBAC
-
-Apache Karaf provides a complete Role-Based Access Control to the JMX MBeans and operations.
-
-Whenever a JMX operation is invoked, the roles of the user are checked against the required roles for this operation.
-
-The access lists are defined in configuration file in the {{etc}} folder.
-
-The relevant configuration is prefixed with {{jmx.acl}} and based on the JMX ObjectName that it applies to.
-
-For instance, specific configuration for a MBean with the object name {{foo.bar:type=Test}} can be placed in the
-{{etc/jmx.acl.foo.bar.Test.cfg}} configuration file.
-
-More generic configurations can be placed in the domain (e.g. jmx.acl.foo.bar.cfg) or at the top level (jmx.acl.cfg).
-
-A simple configuration file looks like:
-
-{code}
- # operation = role
- test = admin
- getVal = manager, viewer
-{code}
-
-Apache Karaf looks for required roles using the following process
-.
-The most specific configuration file is tried first. It means that in the previous example, the {{etc/jmx.acl.foo.bar.Test.cfg}} is looked at first.
-In this configuration, Apache Karaf looks for a:
-
-1. Specific match for the invocation, e.g. {{test(int)["17"] = role1}}
-
-2. Regex match for the invocation, e.g. {{test(int)[/[0-9]/] = role2}}
- In both cases, the passed argument is converted to a String for the comparison.
- If any of the above match, the search stops and the associated roles are used.
-
-3. Signature match for the invocation, e.g. {{test(int) = role3}}
- If matched, the search stops and the associated roles are used.
-
-4. Method name match for the invocation, e.g. {{test = role4}}
- If matched, the search stops and the associated roles are used.
-
-5. A method name wildcard match, e.g. {{te* = role5}}
- For all the wildcard matches found in the current configuration file, the roles associated with the longest match are used.
- So if you have te* and * and the method invoked is 'test', then the roles defined with te* are used, not the ones defined with *.
-
-If no matching definition is found, the most specific definition always takes the precedence.
-
-You can find some configuration examples:
-
-* Only a {{manager}} can call GC on the Memory MBean:
-{code}
-# etc/jmx.acl.java.lang.Memory.cfg
- gc = manager
-{code}
-
-* Bundles with ID between 0 and 49 can be stopped only by an {{admin}}, other bundles can be stopped by a {{manager}}:
-{code}
-# etc/jmx.acl.org.apache.karaf.bundles.cfg
- stop(java.lang.String)[/([1-4])?([0-9]/] = admin
- stop = manager
-{code}
-
-The {{etc/jmx.acl.cfg}} configuration file contains the global configuration for the invocation on any MBean that
-doesn't have a specific configuration:
-
-{code}
-# etc/jmx.acl.cfg
- list* = viewer
- get* = viewer
- is* = viewer
- set* = admin
- * = admin
-{code}
-
-By default, all "read-only" operations ({{list*}}, {{get*}}, {{is*}}) can be performed by a {{viewer}}, whereas the "read-write" operations can be performed only by an {{admin}}.
-
-The {{org.apache.karaf:type=security,area=jmx}} MBean can be used to check whether the current user can access a certain MBean or invoke a specific operation on it.
-This MBean can be used by management clients (monitoring tools, etc) to decide whether to show certain MBeans or operations to the end user.
-
-h2. JMX-HTTP bridge with Jolokia
-
-It's not always easy to use a JMX client with the RMI protocol.
-
-Some monitoring tools (Nagios, Zabbix, ...) are not native JMX clients.
-
-But most of them can use HTTP.
-
-More over, you may want to write your own application/web application. In that case, HTTP and JSON can be very interesting and easy to remotely manage Apache Karaf.
-
-[Jolokia|http://www.jolokia.org/] can be installed in Apache Karaf as a remote JMX-HTTP bridge.
-
-Karaf provides a jolokia feature, ready to install:
-
-{code}
-karaf@root()> feature:install jolokia
-{code}
-
-By default, Jolokia is listening on the port {{8181}} (see the [WebContainer (JSP/Servlet)|webcontainer] page for details about the HTTP configuration).
-
-If you point a browser on [http://localhost:8181/jolokia] you will see a JSON output like:
-
-{code}
-{"timestamp":1421765829,"status":200,"request":{"type":"version"},"value":{"protocol":"7.2","config":{"useRestrictorService":"false","canonicalNaming":"true","includeStackTrace":"true","listenForHttpService":"true","historyMaxEntries":"10","agentId":"192.168.134.10-5922-6eb8d517-osgi","debug":"false","realm":"karaf","serializeException":"false","agentContext":"\/jolokia","agentType":"servlet","policyLocation":"classpath:\/jolokia-access.xml","user":"karaf","debugMaxEntries":"100","authMode":"jaas","mimeType":"text\/plain"},"agent":"1.2.4-SNAPSHOT","info":{"product":"felix","vendor":"Apache","version":"4.4.1"}}}
-{code}
-
-You can manipulate the Apache Karaf JMX layer via HTTP and JSON, via system tools (like {{curl}}, {{jmx4perl}}, monitoring tools (supporting HTTP/JSON), or web applications.
-
-For instance, you can send a JSON request to get details about the current Apache Karaf heap memory usage.
-
-The format of the request is:
-
-{code}
-{
- "type":"read",
- "mbean":"java.lang:type=Memory",
- "attribute":"HeapMemoryUsage",
- "path":"used"
-}
-{code}
-
-We can send this JSON request using {{curl}} and get the result:
-
-{code}
-curl -u karaf -d "{\"type\":\"read\",\"mbean\":\"java.lang:type=Memory\",\"attribute\":\"HeapMemoryUsage\",\"path\":\"used\"}" http://localhost:8181/jolokia/ && echo ""
-Enter host password for user 'karaf':
-{"timestamp":1421765948,"status":200,"request":{"mbean":"java.lang:type=Memory","path":"used","attribute":"HeapMemoryUsage","type":"read"},"value":69121000}
-{code}
-
-You can find details on the [Jolokia website|http://www.jolokia.org] and in the [documentation|http://www.jolokia.org/reference/html/].
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/obr.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/obr.conf b/manual/src/main/webapp/users-guide/obr.conf
deleted file mode 100644
index 3e48180..0000000
--- a/manual/src/main/webapp/users-guide/obr.conf
+++ /dev/null
@@ -1,359 +0,0 @@
-h1. OBR
-
-The goal of OBR (OSGi Bundle Repository) is:
-
-1. to simplify deploying and using bundles
-2. to encourage independent bundle development.
-
-OBR achieves the first goal by providing a service that can automatically install a bundle, with its deployment dependencies,
-from a bundle repository. This makes it easier for people to experiment with existing bundles.
-
-The second goal is achieved by raising the visibility of the available bundles in a repository.
-
-OBR is an optional Apache Karaf feature. You have to install the {{obr}} feature to use OBR service:
-
-{code}
-karaf@root()> feature:install obr
-{code}
-
-The OBR feature turns Apache Karaf as an OBR client. It means that Apache Karaf can use a OBR repository to the installation
-of the bundles, and during the installation of the features.
-
-The installation of the {{obr}} feature adds in Apache Karaf:
-
-* the OBR service
-* the features OBR resolver
-* the {{obr:*}} commands
-* the JMX ObrMBean
-
-The OBR repository contains all bundles. The OBR service knows all requirements and capabilities of each bundle on an
-OBR repository (it's the OBR metadata).
-
-Thanks to that, when you install ("deploy" in OBR wording) a bundle using the OBR service, it looks for all bundles
-providing the capabilities matching the bundle requirements.
-It will automatically install the bundles needed for the bundle.
-
-h2. Features OBR resolver
-
-If the feature specifies {{obr}} in the {{resolver}} attribute, Apache Karaf can use the OBR service to construct the list
-of bundles to install with the features.
-
-The feature default resolver just consider the bundles described in the feature itself.
-
-Using the OBR resolver, Apache Karaf can extend the bundle list at the feature installation time using the OBR service.
-
-h2. Commands
-
-h3. {{obr:url-add}}
-
-The {{obr:url-add}} command registers the OBR repository at a given URL in the OBR service.
-
-Basically, an OBR repository is described by a {{repository.xml}} file.
-
-The {{obr:url-add}} command expects an {{url}} argument. The {{url}} argument is the URL to the OBR repository {{repository.xml}} file.
-Any URL described in the [Artifacts repositories and URLs section|urls] is supported.
-
-For instance:
-
-{code}
-karaf@root()> obr:url-add file:///user/.m2/repository/repository.xml
-{code}
-
-h3. {{obr:url-list}}
-
-The {{obr:url-list}} command lists the OBR repository (with URL) registered in the OBR service:
-
-{code}
-karaf@root()> obr:url-list
-Index | OBR URL
----------------------------------------------------------
-0 | file:/user/.m2/repository/repository.xml
-{code}
-
-h3. {{obr:url-refresh}}
-
-The {{obr:url-refresh}} command refresh an OBR repository (reloading the URL).
-
-The OBR service doesn't take "on the fly" the changes performed on an OBR repository {{repository.xml}}. You have to
-reload the {{repository.xml}} URL to take the changes. It's the purpose of the {{obr:url-refresh}} command.
-
-Without argument, the {{obr:url-refresh}} command refreshes all repositories:
-
-{code}
-karaf@root()> obr:url-refresh
-{code}
-
-You can refresh only one repository by specifying the URL as argument:
-
-{code}
-karaf@root()> obr:url-refresh file:/user/.m2/repository/repository.xml
-{code}
-
-Instead of using the URL, you can use the repository index as displayed by the {{obr:url-list}} command.
-To do so, you have to use the {{-i}} option:
-
-{code}
-karaf@root()> obr:url-refresh -i 0
-{code}
-
-h3. {{obr:url-remove}}
-
-The {{obr:url-remove}} command removes an OBR repository from the OBR service.
-
-The {{obr:url-remove}} command expects the repository URL as argument:
-
-{code}
-karaf@root()> obr:url-remove file:/user/.m2/repository/repository.xml
-{code}
-
-Instead of using the URL, you can use the repository index as displayed by the {{obr:url-list}} command.
-To do so, you have to use the {{-i}} option:
-
-{code}
-karaf@root()> obr:url-remove -i 0
-{code}
-
-h3. {{obr:list}}
-
-The {{obr:list}} command lists all bundles available on the registered OBR repositories:
-
-{code}
-karaf@root()> obr:list|more
-Name | Symbolic Name | Version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-activemq-blueprint | org.apache.activemq.activemq-blueprint | 5.12.0.SNAPSHOT
-activemq-camel | org.apache.activemq.activemq-camel | 5.12.0.SNAPSHOT
-activemq-karaf | activemq-karaf | 5.12.0.SNAPSHOT
-activemq-osgi | org.apache.activemq.activemq-osgi | 5.12.0.SNAPSHOT
-Apache Aries Application API | org.apache.aries.application.api | 1.0.1.SNAPSHOT
-...
-{code}
-
-h3. {{obr:info}}
-
-The {{obr:info}} command displays the details about bundles available on the OBR service. Especially, it provides details about
-capabilities and requirements of bundles.
-
-The {{obr:info}} command expects a bundle symbolic name as argument:
-
-{code}
-karaf@root()> obr:info org.apache.karaf.wrapper.core
--------------------------------
-Apache Karaf :: Wrapper :: Core
--------------------------------
-id: org.apache.karaf.wrapper.core/4.0.0
-description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
-documentation: http://www.apache.org/
-symbolicname: org.apache.karaf.wrapper.core
-presentationname: Apache Karaf :: Wrapper :: Core
-license: http://www.apache.org/licenses/LICENSE-2.0.txt
-uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/4.0.0/org.apache.karaf.wrapper.core-4.0.0.jar
-size: 1281352
-version: 4.0.0
-Requires:
- service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
- package:(&(package=javax.management))
- package:(&(package=org.apache.karaf.wrapper))
- package:(&(package=org.apache.karaf.wrapper.management))
- package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
-Capabilities:
- bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=4.0.0}
- service:{service=org.apache.karaf.wrapper.WrapperService}
- package:{package=org.apache.karaf.wrapper, version=4.0.0}
- package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=4.0.0}
-{code}
-
-The {{obr:info}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
-It means that you have to use the following command to see the info about the wrapper core bundle with version 4.0.0:
-
-{code}
-karaf@root()> obr:info org.apache.karaf.wrapper.core,4.0.0
-...
-{code}
-
-You can specific multiple bundles separated by space:
-
-{code}
-karaf@root()> obr:info org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
-...
-{code}
-
-h3. {{obr:source}}
-
-In addition of the bundles executable, the OBR service can also store the bundles sources.
-
-The {{obr:source}} command check the source URL in the OBR metadata for a given bundle, and download the sources on a target folder:
-
-{code}
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core
-{code}
-
-The {{obr:source}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
-It means that you have to use the following command to download the source of wrapper core bundle with version 4.0.0:
-
-{code}
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,4.0.0
-{code}
-
-You can specify multiple bundles separated by space:
-
-{code}
-karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
-...
-{code}
-
-h3. {{obr:resolve}}
-
-The {{obr:resolve}} command displays the resolution output for a given set of requirements. Actually, it show the bundles providing
-the capabilities to match the requirements. It's what the OBR service does when executing {{obr:deploy}}.
-
-Optionally, the {{obr:resolve}} command can deploy the bundles as the {{obr:deploy}} command does.
-
-For instance, to know the OBR bundle resolving the {{org.apache.karaf.wrapper}} package requirement, you can do:
-
-{code}
-karaf@root()> obr:resolve package=org.apache.karaf.wrapper
-Required resource(s):
----------------------
- Apache Karaf :: Wrapper :: Core (4.0.0)
-{code}
-
-h3. {{obr:find}}
-
-The {{obr:find}} command is similar to the {{obr:resolve}} one. It displays the bundles resolving the provided requirements, with details.
-
-For instance, to find the OBR bundle providing the {{org.apache.karaf.wrapper}} package, you can do:
-
-{code}
-karaf@root()> obr:find package=org.apache.karaf.wrapper
--------------------------------
-Apache Karaf :: Wrapper :: Core
--------------------------------
-id: org.apache.karaf.wrapper.core/4.0.0
-description: Core implementation and integration of the Java Service Wrapper. It provides a complete integration of Karaf with your Operating System.
-documentation: http://www.apache.org/
-symbolicname: org.apache.karaf.wrapper.core
-presentationname: Apache Karaf :: Wrapper :: Core
-license: http://www.apache.org/licenses/LICENSE-2.0.txt
-uri: file:/user/.m2/repository/org/apache/karaf/wrapper/org.apache.karaf.wrapper.core/4.0.0/org.apache.karaf.wrapper.core-4.0.0.jar
-size: 1281352
-version: 4.0.0
-Requirements:
- service:(&(service=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))
- package:(&(package=javax.management))
- package:(&(package=org.apache.karaf.wrapper))
- package:(&(package=org.apache.karaf.wrapper.management))
- package:(&(package=org.fusesource.jansi)(version>=1.11.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.launch)(version>=1.1.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.framework.startlevel)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
- package:(&(package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))
-Capabilities:
- bundle:{manifestversion=2, symbolicname=org.apache.karaf.wrapper.core, presentationname=Apache Karaf :: Wrapper :: Core, version=4.0.0}
- service:{service=org.apache.karaf.wrapper.WrapperService}
- package:{package=org.apache.karaf.wrapper, version=4.0.0}
- package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=4.0.0}
-{code}
-
-h3. {{obr:deploy}}
-
-The {{obr:deploy}} command installs a bundle from the OBR repository, including all bundles required to satisfy the bundle requirements.
-
-{code}
-karaf@root()> obr:deploy org.ops4j.pax.web.samples.helloworld-hs
-Target resource(s):
--------------------
- OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
-
-Required resource(s):
----------------------
- Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
- OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
-
-Deploying...done.
-{code}
-
-By default, the bundles are just installed, not started. You can use the {{-s}} option to start the bundles.
-
-The {{obr:deploy}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
-It means that you have to use the following command to deploy the wrapper core bundle with version 4.0.0:
-
-{code}
-karaf@root()> obr:deploy org.apache.karaf.wrapper.core,4.0.0
-{code}
-
-You can specify multiple bundles separated by space:
-
-{code}
-karaf@root()> obr:deploy org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
-...
-{code}
-
-h2. {{obr:start}}
-
-The {{obr:start}} command does the same as {{obr:deploy -s}} command. It installs the bundle (and all required bundles to
-satisfy the requirements) and starts all installed bundles.
-
-{code}
-karaf@root()> obr:start org.ops4j.pax.web.samples.helloworld-hs
-Target resource(s):
--------------------
- OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
-
-Required resource(s):
----------------------
- Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
- OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
-
-Deploying...done.
-{code}
-
-The {{obr:start}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
-It means that you have to use the following command to deploy and start the wrapper core bundle with version 4.0.0:
-
-{code}
-karaf@root()> obr:start org.apache.karaf.wrapper.core,4.0.0
-{code}
-
-You can specify multiple bundles separated by space:
-
-{code}
-karaf@root()> obr:start org.apache.karaf.wrapper.core,4.0.0 org.apache.karaf.wrapper.command,4.0.0
-...
-{code}
-
-h2. JMX ObrMBean
-
-On the JMX layer, Apache Karaf provides a MBean dedicated to the management of the OBR service: the ObrMBean.
-
-The ObjectName to use is {{org.apache.karaf:type=obr,name=*}}.
-
-h3. Attributes
-
-The {{Urls}} attribute provides the list of registered OBR repositories URLs.
-
-The {{Bundles}} attribute provides a tabular data containing all bundles available on the registered OBR repositories.
-
-h3. Operations
-
-* {{addUrl(url)}} registers the OBR repository using the {{url}} to the {{repository.xml}}.
-* {{removeUrl(url)}} removes the OBR repository at the given {{url}}.
-* {{refreshUrl(url)}} refreshes the OBR repository at the given {{url}}.
-* {{deployBundle(name)}} deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service. The bundles are not automatically started.
-* {{deployBundle(name, start, deployOptional)}} deploys a bundle (and all bundles required to satisfy the requirements) using the OBR service.
- If {{start}} is {{true}}, the bundles are automatically started. If {{deployOptional}} is {{true}}, even the optional requirements will be resolved
- by the OBR service (meaning installing more bundles to satisfy the optional requirements).
-
-The name to identify a bundle uses the following syntax: {{symbolic_name,version}} where version is optional.
-
-h2. Apache Karaf Cave
-
-In addition of being an OBR client, Apache Karaf can act as an OBR repositories server, thanks to Apache Karaf Cave.
-
-See the [Apache Karaf Cave sub-project|http://karaf.apache.org/index/subprojects/cave.html] for details.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/provisioning-schema.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/provisioning-schema.conf b/manual/src/main/webapp/users-guide/provisioning-schema.conf
deleted file mode 100644
index b57dcaa..0000000
--- a/manual/src/main/webapp/users-guide/provisioning-schema.conf
+++ /dev/null
@@ -1,46 +0,0 @@
-h1. Features XML Schemas (provisioning)
-
-Apache Karaf 4.0.0 supports different versions of the features XML schemas.
-
-The features XML schema can be found directly in the Apache Karaf sources, in the {{features/core}} module:
-
-{code}
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.3.0.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.1.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.0.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.1.0.xsd
-features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.0.0.xsd
-{code}
-
-These schemas are also available on the Apache Karaf website:
-
-* [http://karaf.apache.org/xmlns/features/v1.3.0]
-* [http://karaf.apache.org/xmlns/features/v1.2.1]
-* [http://karaf.apache.org/xmlns/features/v1.2.0]
-* [http://karaf.apache.org/xmlns/features/v1.1.0]
-* [http://karaf.apache.org/xmlns/features/v1.0.0]
-
-h2. karaf-features-1.3.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.3.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-h2. karaf-features-1.2.1.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.1.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-h2. karaf-features-1.2.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.2.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-h2. karaf-features-1.1.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.1.0.xsd|lang=xml|pygmentize=true}
-{snippet}
-
-h2. karaf-features-1.0.0.xsd
-
-{snippet:url=../features/core/src/main/resources/org/apache/karaf/features/karaf-features-1.0.0.xsd|lang=xml|pygmentize=true}
-{snippet}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/provisioning.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/provisioning.conf b/manual/src/main/webapp/users-guide/provisioning.conf
deleted file mode 100644
index 67debc8..0000000
--- a/manual/src/main/webapp/users-guide/provisioning.conf
+++ /dev/null
@@ -1,670 +0,0 @@
-h1. Provisioning
-
-Apache Karaf supports the provisioning of applications and modules using the concept of Karaf Features.
-
-h2. Application
-
-By provisioning application, it means install all modules, configuration, and transitive applications.
-
-h2. OSGi
-
-It natively supports the deployment of OSGi applications.
-
-An OSGi application is a set of OSGi bundles. An OSGi bundles is a regular jar file, with additional metadata in the jar MANIFEST.
-
-In OSGi, a bundle can depend to other bundles. So, it means that to deploy an OSGi application, most of the time, you have
-to firstly deploy a lot of other bundles required by the application.
-
-So, you have to find these bundles first, install the bundles. Again, these "dependency" bundles may require other bundles
-to satisfy their own dependencies.
-
-More over, typically, an application requires configuration (see the [Configuration section|configuration] of the user guide).
-So, before being able to start your application, in addition of the dependency bundles, you have to create or deploy the
-configuration.
-
-As we can see, the provisioning of an application can be very long and fastidious.
-
-h2. Feature and resolver
-
-Apache Karaf provides a simple and flexible way to provision applications.
-
-In Apache Karaf, the application provisioning is an Apache Karaf "feature".
-
-A feature describes an application as:
-
-* a name
-* a version
-* a optional description (eventually with a long description)
-* a set of bundles
-* optionally a set configurations or configuration files
-* optionally a set of dependency features
-
-When you install a feature, Apache Karaf installs all resources described in the feature. It means that it will
-automatically resolves and installs all bundles, configurations, and dependency features described in the feature.
-
-The feature resolver checks the service requirements, and install the bundles providing the services matching the requirements.
-The default mode enables this behavior only for "new style" features repositories (basically, the features repositories XML with
-schema equal or greater to 1.3.0). It doesn't apply for "old style" features repositories (coming from Karaf 2 or 3).
-
-You can change the service requirements enforcement mode in {{etc/org.apache.karaf.features.cfg}} file, using the {{serviceRequirements}} property.
-
-{code}
-serviceRequirements=default
-{code}
-
-The possible values are:
-* disable: service requirements are completely ignored, for both "old style" and "new style" features repositories
-* default: service requirements are ignored for "old style" features repositories, and enabled for "new style" features repositories.
-* enforce: service requirements are always verified, for "old style" and "new style" features repositories.
-
-Additionally, a feature can also define requirements. In that case, Karaf can automatically additional bundles or features
-providing the capabilities to satisfy the requirements.
-
-A feature has a complete lifecycle: install, start, stop, update, uninstall.
-
-h2. Features repositories
-
-The features are described in a features XML descriptor. This XML file contains the description of a set of features.
-
-A features XML descriptor is named a "features repository". Before being able to install a feature, you have to register
-the features repository that provides the feature (using {{feature:repo-add}} command or FeatureMBean as described later).
-
-For instance, the following XML file (or "features repository") describes the {{feature1}} and {{feature2}} features:
-
-{code:lang=xml}
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
- <feature name="feature1" version="1.0.0">
- <bundle>...</bundle>
- <bundle>...</bundle>
- </feature>
- <feature name="feature2" version="1.1.0">
- <feature>feature1</feature>
- <bundle>...</bundle>
- </feature>
-</features>
-{code}
-
-We can note that the features XML has a schema. Take a look on [Features XML Schema section|provisioning-schema] of the user guide
-for details.
-The {{feature1}} feature is available in version {{1.0.0}}, and contains two bundles. The {{<bundle/>}} element contains a URL
-to the bundle artifact (see [Artifacts repositories and URLs section|urls] for details). If you install the {{feature1}} feature
-(using {{feature:install}} or the FeatureMBean as described later), Apache Karaf will automatically installs the two bundles
-described.
-The {{feature2}} feature is available in version {{1.1.0}}, and contains a reference to the {{feature1}} feature and a bundle.
-The {{<feature/>}} element contains the name of a feature. A specific feature version can be defined using the {{version}}
-attribute to the {{<feature/>}} element ({{<feature version="1.0.0">feature1</feature>}}). If the {{version}} attribute is
-not specified, Apache Karaf will install the latest version available. If you install the {{feature2}} feature (using {{feature:install}}
-or the FeatureMBean as described later), Apache Karaf will automatically installs {{feature1}} (if it's not already installed)
-and the bundle.
-
-A feature repository is registered using the URL to the features XML file.
-
-The features state is stored in the Apache Karaf cache (in the {{KARAF_DATA}} folder). You can restart Apache Karaf, the
-previously installed features remain installed and available after restart.
-If you do a clean restart or you delete the Apache Karaf cache (delete the {{KARAF_DATA}} folder), all previously features
-repositories registered and features installed will be lost: you will have to register the features repositories and install
-features by hand again.
-To prevent this behaviour, you can specify features as boot features.
-
-h2. Boot features
-
-You can describe some features as boot features. A boot feature will be automatically install by Apache Karaf, even if it has
-not been previously installed using {{feature:install}} or FeatureMBean.
-
-Apache Karaf features configuration is located in the {{etc/org.apache.karaf.features.cfg}} configuration file.
-
-This configuration file contains the two properties to use to define boot features:
-
-* {{featuresRepositories}} contains a list (coma separated) of features repositories (features XML) URLs.
-* {{featuresBoot}} contains a list (come separated) of features to install at boot.
-
-h2. Features upgrade
-
-You can update a release by installing the same feature (with the same SNAPSHOT version or a different version).
-
-Thanks to the features lifecycle, you can control the status of the feature (started, stopped, etc).
-
-You can also use a simulation to see what the update will do.
-
-h2. Feature bundles
-
-h3. Start Level
-
-By default, the bundles deployed by a feature will have a start-level equals to the value defined in the {{etc/config.properties}}
-configuration file, in the {{karaf.startlevel.bundle}} property.
-
-This value can be "overrided" by the {{start-level}} attribute of the {{<bundle/>}} element, in the features XML.
-
-{code:lang=xml}
- <feature name="my-project" version="1.0.0">
- <bundle start-level="80">mvn:com.mycompany.myproject/myproject-dao</bundle>
- <bundle start-level="85">mvn:com.mycompany.myproject/myproject-service</bundle>
- </feature>
-{code}
-
-The start-level attribute insure that the {{myproject-dao}} bundle is started before the bundles that use it.
-
-Instead of using start-level, a better solution is to simply let the OSGi framework know what your dependencies are by
-defining the packages or services you need. It is more robust than setting start levels.
-
-h3. Simulate, Start and stop
-
-You can simulate the installation of a feature using the {{-t}} option to {{feature:install}} command.
-
-You can install a bundle without starting it. By default, the bundles in a feature are automatically started.
-
-A feature can specify that a bundle should not be started automatically (the bundle stays in resolved state).
-To do so, a feature can specify the {{start}} attribute to false in the {{<bundle/>}} element:
-
-{code:lang=xml}
- <feature name="my-project" version="1.0.0">
- <bundle start-level="80" start="false">mvn:com.mycompany.myproject/myproject-dao</bundle>
- <bundle start-level="85" start="false">mvn:com.mycompany.myproject/myproject-service</bundle>
- </feature>
-{code}
-
-h3. Dependency
-
-A bundle can be flagged as being a dependency, using the {{dependency}} attribute set to true on the {{<bundle/>}} element.
-
-This information can be used by resolvers to compute the full list of bundles to be installed.
-
-h2. Dependent features
-
-A feature can depend to a set of other features:
-
-{code:lang=xml}
- <feature name="my-project" version="1.0.0">
- <feature>other</feature>
- <bundle start-level="80" start="false">mvn:com.mycompany.myproject/myproject-dao</bundle>
- <bundle start-level="85" start="false">mvn:com.mycompany.myproject/myproject-service</bundle>
- </feature>
-{code}
-
-When the {{my-project}} feature will be installed, the {{other}} feature will be automatically installed as well.
-
-It's possible to define a version range for a dependent feature:
-
-{code:lang=xml}
-<feature name="spring-dm">
- <feature version="[2.5.6,4)">spring</feature>
- ...
-</feature>
-{code}
-
-The feature with the highest version available in the range will be installed.
-
-If a single version is specified, this version will be chosen.
-
-If nothing is specified, the highest available will be installed.
-
-h2. Feature configurations
-
-The {{<config/>}} element in a feature XML allows a feature to create and/or populate a configuration (identified by a configuration PID).
-
-{code:lang=xml}
-<config name="com.foo.bar">
- myProperty = myValue
-</config>
-{code}
-
-The {{name}} attribute of the {{<config/>}} element corresponds to the configuration PID (see the [Configuration section|configuration] for details).
-
-The installation of the feature will have the same effect as dropping a file named {{com.foo.bar.cfg}} in the {{etc}} folder.
-
-The content of the {{<config/>}} element is a set of properties, following the key=value standard.
-
-h2. Feature configuration files
-
-Instead of using the {{<config/>}} element, a feature can specify {{<configfile/>}} elements.
-
-{code:lang=xml}
-<configfile finalname="/etc/myfile.cfg" override="false">URL</configfile>
-{code}
-
-Instead of directly manipulating the Apache Karaf configuration layer (as when using the {{<config/>}} element), the
-{{<configfile/>}} element takes directly a file specified by a URL, and copy the file in the location specified by the
-{{finalname}} attribute.
-
-If not specified, the location is relative from the {{KARAF_BASE}} variable. It's also possible to use variable like
-${karaf.home}, ${karaf.base}, ${karaf.etc}, or even system properties.
-
-For instance:
-
-{code:lang=xml}
-<configfile finalname="${karaf.etc}/myfile.cfg" override="false">URL</configfile>
-{code}
-
-If the file is already present at the desired location it is kept and the deployment of the configuration file is skipped,
-as a already existing file might contain customization. This behaviour can be overriden by {{override}} set to true.
-
-The file URL is any URL supported by Apache Karaf (see the [Artifacts repositories and URLs|urls] of the user guide for details).
-
-h3. Requirements
-
-A feature can also specify expected requirements. The feature resolver will try to satisfy the requirements. For that, it checks
-the features and bundles capabilities and will automatically install the bundles to satisfy the requirements.
-
-For instance, a feature can contain:
-
-{code:lang=xml}
-<requirement>osgi.ee;filter:="(&(osgi.ee=JavaSE)(!(version>=1.8)))"</requirement>
-{code}
-
-The requirement specifies that the feature will work by only if the JDK version is not 1.8 (so basically 1.7).
-
-The features resolver is also able to refresh the bundles when an optional dependency is satisfy, rewiring the optional import.
-
-h2. Commands
-
-h3. {{feature:repo-list}}
-
-The {{feature:repo-list}} command lists all registered features repository:
-
-{code}
-karaf@root()> feature:repo-list
-Repository | URL
---------------------------------------------------------------------------------------
-org.ops4j.pax.cdi-0.12.0 | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
-org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
-standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
-spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
-{code}
-
-Each repository has a name and the URL to the features XML.
-
-Apache Karaf parses the features XML when you register the features repository URL (using {{feature:repo-add}} command
-or the FeatureMBean as described later). If you want to force Apache Karaf to reload the features repository URL (and
-so update the features definition), you can use the {{-r}} option:
-
-{code}
-karaf@root()> feature:repo-list -r
-Reloading all repositories from their urls
-
-Repository | URL
---------------------------------------------------------------------------------------
-org.ops4j.pax.cdi-0.12.0 | mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
-org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
-standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
-spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
-{code}
-
-h3. {{feature:repo-add}}
-
-To register a features repository (and so having new features available in Apache Karaf), you have to use the
-{{feature:repo-add}} command.
-
-The {{feature:repo-add}} command requires the {{name/url}} argument. This argument accepts:
-
-* a feature repository URL. It's an URL directly to the features XML file. Any URL described in the [Artifacts repositories and URLs section|urls]
- of the user guide is supported.
-* a feature repository name defined in the {{etc/org.apache.karaf.features.repos.cfg}} configuration file.
-
-The {{etc/org.apache.karaf.features.repos.cfg}} defines a list of "pre-installed/available" features repositories:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# This file describes the features repository URL
-# It could be directly installed using feature:repo-add command
-#
-enterprise=mvn:org.apache.karaf.features/enterprise/LATEST/xml/features
-spring=mvn:org.apache.karaf.features/spring/LATEST/xml/features
-cellar=mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
-cave=mvn:org.apache.karaf.cave/apache-karaf-cave/LATEST/xml/features
-camel=mvn:org.apache.camel.karaf/apache-camel/LATEST/xml/features
-camel-extras=mvn:org.apache-extras.camel-extra.karaf/camel-extra/LATEST/xml/features
-cxf=mvn:org.apache.cxf.karaf/apache-cxf/LATEST/xml/features
-cxf-dosgi=mvn:org.apache.cxf.dosgi/cxf-dosgi/LATEST/xml/features
-cxf-xkms=mvn:org.apache.cxf.services.xkms/cxf-services-xkms-features/LATEST/xml
-activemq=mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
-jclouds=mvn:org.apache.jclouds.karaf/jclouds-karaf/LATEST/xml/features
-openejb=mvn:org.apache.openejb/openejb-feature/LATEST/xml/features
-wicket=mvn:org.ops4j.pax.wicket/features/LATEST/xml/features
-hawtio=mvn:io.hawt/hawtio-karaf/LATEST/xml/features
-pax-cdi=mvn:org.ops4j.pax.cdi/pax-cdi-features/LATEST/xml/features
-pax-jdbc=mvn:org.ops4j.pax.jdbc/pax-jdbc-features/LATEST/xml/features
-pax-jpa=mvn:org.ops4j.pax.jpa/pax-jpa-features/LATEST/xml/features
-pax-web=mvn:org.ops4j.pax.web/pax-web-features/LATEST/xml/features
-pax-wicket=mvn:org.ops4j.pax.wicket/pax-wicket-features/LATEST/xml/features
-ecf=http://download.eclipse.org/rt/ecf/latest/site.p2/karaf-features.xml
-decanter=mvn:org.apache.karaf.decanter/apache-karaf-decanter/LATEST/xml/features
-{code}
-
-You can directly provide a features repository name to the {{feature:repo-add}} command. For install, to install Apache Karaf Cellar, you can do:
-
-{code}
-karaf@root()> feature:repo-add cellar
-Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
-{code}
-
-When you don't provide the optional {{version}} argument, Apache Karaf installs the latest version of the features repository available.
-You can specify a target version with the {{version}} argument:
-
-{code}
-karaf@root()> feature:repo-add cellar 4.0.0.RC1
-Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
-{code}
-
-Instead of providing a features repository name defined in the {{etc/org.apache.karaf.features.repos.cfg}} configuration file,
-you can directly provide the features repository URL to the {{feature:repo-add}} command:
-
-{code}
-karaf@root()> feature:repo-add mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
-Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0.RC1/xml/features
-{code}
-
-By default, the {{feature:repo-add}} command just registers the features repository, it doesn't install any feature.
-If you specify the {{-i}} option, the {{feature:repo-add}} command registers the features repository and installs all
-features described in this features repository:
-
-{code}
-karaf@root()> feature:repo-add -i cellar
-{code}
-
-h3. {{feature:repo-refresh}}
-
-Apache Karaf parses the features repository XML when you register it (using {{feature:repo-add}} command or the FeatureMBean).
-If the features repository XML changes, you have to indicate to Apache Karaf to refresh the features repository to load the changes.
-
-The {{feature:repo-refresh}} command refreshes the features repository.
-
-Without argument, the command refreshes all features repository:
-
-{code}
-karaf@root()> feature:repo-refresh
-Refreshing feature url mvn:org.ops4j.pax.cdi/pax-cdi-features/0.12.0/xml/features
-Refreshing feature url mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
-Refreshing feature url mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-Refreshing feature url mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
-Refreshing feature url mvn:org.apache.karaf.features/spring/4.0.0/xml/features
-{code}
-
-Instead of refreshing all features repositories, you can specify the features repository to refresh, by providing the URL
-or the features repository name (and optionally version):
-
-{code}
-karaf@root()> feature:repo-refresh mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-Refreshing feature url mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-{code}
-
-{code}
-karaf@root()> feature:repo-refresh cellar
-Refreshing feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
-{code}
-
-h3. {{feature:repo-remove}}
-
-The {{feature:repo-remove}} command removes a features repository from the registered ones.
-
-The {{feature:repo-remove}} command requires a argument:
-
-* the features repository name (as displayed in the repository column of the {{feature:repo-list}} command output)
-* the features repository URL (as displayed in the URL column of the {{feature:repo-list}} command output)
-
-{code}
-karaf@root()> feature:repo-remove karaf-cellar-4.0.0.RC1
-{code}
-
-{code}
-karaf@root()> feature:repo-remove mvn:org.apache.karaf.cellar/apache-karaf-cellar/LATEST/xml/features
-{code}
-
-By default, the {{feature:repo-remove}} command just removes the features repository from the registered ones: it doesn't
-uninstall the features provided by the features repository.
-
-If you use {{-u}} option, the {{feature:repo-remove}} command uninstalls all features described by the features repository:
-
-{code}
-karaf@root()> feature:repo-remove -u karaf-cellar-4.0.0.RC1
-{code}
-
-h3. {{feature:list}}
-
-The {{feature:list}} command lists all available features (provided by the different registered features repositories):
-
-{code}
-Name | Version | Required | State | Repository | Description
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
-pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
-pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
-pax-cdi-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI support
-pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
-pax-cdi-1.2-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.2 support
-pax-cdi-openwebbeans | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | OpenWebBeans CDI support
-pax-cdi-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI support
-pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
-...
-{code}
-
-If you want to order the features by alphabetical name, you can use the {{-o}} option:
-
-{code}
-karaf@root()> feature:list -o
-Name | Version | Required | State | Repository | Description
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-deltaspike-core | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike core support
-deltaspike-data | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike data support
-deltaspike-jpa | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike jpa support
-deltaspike-partial-bean | 1.2.1 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Apache Deltaspike partial bean support
-pax-cdi | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI support
-pax-cdi-1.1 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.1 support
-pax-cdi-1.1-web | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Web CDI 1.1 support
-pax-cdi-1.1-web-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld Web CDI 1.1 support
-pax-cdi-1.1-weld | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Weld CDI 1.1 support
-pax-cdi-1.2 | 0.12.0 | | Uninstalled | org.ops4j.pax.cdi-0.12.0 | Provide CDI 1.2 support
-...
-{code}
-
-By default, the {{feature:list}} command displays all features, whatever their current state (installed or not installed).
-
-Using the {{-i}} option displays only installed features:
-
-{code}
-karaf@root()> feature:list -i
-Name | Version | Required | State | Repository | Description
--------------------------------------------------------------------------------------------------------------------
-aries-proxy | 4.0.0 | | Started | standard-4.0.0 | Aries Proxy
-aries-blueprint | 4.0.0 | x | Started | standard-4.0.0 | Aries Blueprint
-feature | 4.0.0 | x | Started | standard-4.0.0 | Features Support
-shell | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell
-shell-compat | 4.0.0 | x | Started | standard-4.0.0 | Karaf Shell Compatibility
-deployer | 4.0.0 | x | Started | standard-4.0.0 | Karaf Deployer
-bundle | 4.0.0 | x | Started | standard-4.0.0 | Provide Bundle support
-config | 4.0.0 | x | Started | standard-4.0.0 | Provide OSGi ConfigAdmin support
-diagnostic | 4.0.0 | x | Started | standard-4.0.0 | Provide Diagnostic support
-instance | 4.0.0 | x | Started | standard-4.0.0 | Provide Instance support
-jaas | 4.0.0 | x | Started | standard-4.0.0 | Provide JAAS support
-log | 4.0.0 | x | Started | standard-4.0.0 | Provide Log support
-package | 4.0.0 | x | Started | standard-4.0.0 | Package commands and mbeans
-service | 4.0.0 | x | Started | standard-4.0.0 | Provide Service support
-system | 4.0.0 | x | Started | standard-4.0.0 | Provide System support
-kar | 4.0.0 | x | Started | standard-4.0.0 | Provide KAR (KARaf archive) support
-ssh | 4.0.0 | x | Started | standard-4.0.0 | Provide a SSHd server on Karaf
-management | 4.0.0 | x | Started | standard-4.0.0 | Provide a JMX MBeanServer and a set of MBeans in
-wrap | 0.0.0 | x | Started | standard-4.0.0 | Wrap URL handler
-{code}
-
-h3. {{feature:install}}
-
-The {{feature:install}} command installs a feature.
-
-It requires the {{feature}} argument. The {{feature}} argument is the name of the feature, or the name/version of the feature.
-If only the name of the feature is provided (not the version), the latest version available will be installed.
-
-{code}
-karaf@root()> feature:install eventadmin
-{code}
-
-We can simulate an installation using {{-t}} or {{--simulate}} option: it just displays what it would do, but it doesn't do it:
-
-{code}
-karaf@root()> feature:install -t -v eventadmin
-Adding features: eventadmin/[4.0.0,4.0.0]
-No deployment change.
- Managing bundle:
- org.apache.felix.metatype / 1.0.12
-{code}
-
-You can specify a feature version to install:
-
-{code}
-karaf@root()> feature:install eventadmin/4.0.0
-{code}
-
-By default, the {{feature:install}} command is not verbose. If you want to have some details about actions performed by the {{feature:install}}
-command, you can use the {{-v}} option:
-
-{code}
-karaf@root()> feature:install -v eventadmin
-Adding features: eventadmin/[4.0.0,4.0.0]
-No deployment change.
-Done.
-{code}
-
-If a feature contains a bundle which is already installed, by default, Apache Karaf will refresh this bundle.
-Sometime, this refresh can cause issue to other running applications. If you want to disable the auto-refresh of installed
-bundles, you can use the {{-r}} option:
-
-{code}
-karaf@root()> feature:install -v -r eventadmin
-Adding features: eventadmin/[4.0.0,4.0.0]
-No deployment change.
-Done.
-{code}
-
-You can decide to not start the bundles installed by a feature using the {{-s}} or {{--no-auto-start}} option:
-
-{code}
-karaf@root()> feature:install -s eventadmin
-{code}
-
-h3. {{feature:start}}
-
-By default, when you install a feature, it's automatically installed. However, you can specify the {{-s}} option to the {{feature:install}} command.
-
-As soon as you install a feature (started or not), all packages provided by the bundles defined in the feature will be available, and can be used for
-the wiring in other bundles.
-
-When starting a feature, all bundles are started, and so, the feature also exposes the services.
-
-h3. {{feature:stop}}
-
-You can also stop a feature: it means that all services provided by the feature will be stop and removed from the service registry. However, the packages
-are still available for the wiring (the bundles are in resolved state).
-
-h3. {{feature:uninstall}}
-
-The {{feature:uninstall}} command uninstalls a feature. As the {{feature:install}} command, the {{feature:uninstall}} command
-requires the {{feature}} argument. The {{feature}} argument is the name of the feature, or the name/version of the feature.
-If only the name of the feature is provided (not the version), the latest version available will be installed.
-
-{code}
-karaf@root()> feature:uninstall eventadmin
-{code}
-
-The features resolver is involved during feature uninstallation: transitive features installed by the uninstalled feature can be uninstalled
-themselves if not used by other feature.
-
-h2. Deployer
-
-You can "hot deploy" a features XML by dropping the file directly in the {{deploy}} folder.
-
-Apache Karaf provides a features deployer.
-
-When you drop a features XML in the deploy folder, the features deployer does:
-* register the features XML as a features repository
-* the features with {{install}} attribute set to "auto" will be automatically installed by the features deployer.
-
-For instance, dropping the following XML in the deploy folder will automatically install feature1 and feature2, whereas
-feature3 won't be installed:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<features name="my-features" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
-
- <feature name="feature1" version="1.0" install="auto">
- ...
- </feature>
-
- <feature name="feature2" version="1.0" install="auto">
- ...
- </feature>
-
- <feature name="feature3" version="1.0">
- ...
- </feature>
-
-</features>
-{code}
-
-h2. JMX FeatureMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the features and features repositories: the FeatureMBean.
-
-The FeatureMBean object name is: {{org.apache.karaf:type=feature,name=*}}.
-
-h3. Attributes
-
-The FeatureMBean provides two attributes:
-
-* {{Features}} is a tabular data set of all features available.
-* {{Repositories}} is a tabular data set of all registered features repositories.
-
-The {{Repositories}} attribute provides the following information:
-
-* {{Name}} is the name of the features repository.
-* {{Uri}} is the URI to the features XML for this repository.
-* {{Features}} is a tabular data set of all features (name and version) provided by this features repository.
-* {{Repositories}} is a tabular data set of features repositories "imported" in this features repository.
-
-The {{Features}} attribute provides the following information:
-
-* {{Name}} is the name of the feature.
-* {{Version}} is the version of the feature.
-* {{Installed}} is a boolean. If true, it means that the feature is currently installed.
-* {{Bundles}} is a tabular data set of all bundles (bundles URL) described in the feature.
-* {{Configurations}} is a tabular data set of all configurations described in the feature.
-* {{Configuration Files}} is a tabular data set of all configuration files described in the feature.
-* {{Dependencies}} is a tabular data set of all dependent features described in the feature.
-
-h3. Operations
-
-* {{addRepository(url)}} adds the features repository with the {{url}}. The {{url}} can be a {{name}} as in the {{feature:repo-add}} command.
-* {{addRepository(url, install)}} adds the features repository with the {{url}} and automatically installs all bundles if {{install}} is true. The {{url}} can be a {{name}} like in the {{feature:repo-add}} command.
-* {{removeRepository(url)}} removes the features repository with the {{url}}. The {{url}} can be a {{name}} as in the {{feature:repo-remove}} command.
-* {{installFeature(name)}} installs the feature with the {{name}}.
-* {{installFeature(name, version)}} installs the feature with the {{name}} and {{version}}.
-* {{installFeature(name, noClean, noRefresh)}} installs the feature with the {{name}} without cleaning the bundles in case of failure, and without refreshing already installed bundles.
-* {{installFeature(name, version, noClean, noRefresh) }} installs the feature with the {{name}} and {{version}} without cleaning the bundles in case of failure, and without refreshing already installed bundles.
-* {{uninstallFeature(name)}} uninstalls the feature with the {{name}}.
-* {{uninstallFeature(name, version)}} uninstalls the feature with the {{name}} and {{version}}.
-
-h3. Notifications
-
-The FeatureMBean sends two kind of notifications (on which you can subscribe and react):
-
-* When a feature repository changes (added or removed).
-* When a feature changes (installed or uninstalled).
[04/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/installation.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/installation.conf b/manual/src/main/webapp/users-guide/installation.conf
deleted file mode 100644
index 3b840c5..0000000
--- a/manual/src/main/webapp/users-guide/installation.conf
+++ /dev/null
@@ -1,128 +0,0 @@
-h1. Installation
-
-Apache Karaf is a lightweight container, very easy to install and administrate, on both Unix and Windows platforms.
-
-h2. Requirements
-
-*Hardware:*
-* 50 MB of free disk space for the Apache Karaf binary distribution.
-
-*Operating Systems:*
-* Windows: Windows 8, Windows 7, Windows 2003, Windows Vista, Windows XP SP2, Windows 2000.
-* Unix: RedHat Enterprise Linux, Debian, SuSE/OpenSuSE, CentOS, Fedora, Ubuntu, MacOS, AIX, HP-UX, Solaris, any Unix platform that supports Java.
-
-*Environment:*
-* Java SE 1.7.x or greater ([http://www.oracle.com/technetwork/java/javase/]).
-* The JAVA_HOME environment variable must be set to the directory where the Java runtime is installed,
-
-h2. Using Apache Karaf binary distributions
-
-Apache Karaf is available in two distributions, both as a tar.gz and zip archives.
-
-The "default" distribution is a "ready to use" distribution.
-The "default" distribution provides the following features enabled.
-
-The "minimal" distribution is like the minimal distributions that you can find for most of Unix distributions.
-Only the core layer is packaged, most of the features and bundles are downloaded from Internet at bootstrap.
-It means that Apache Karaf minimal distribution requires an Internet connection to start correctly.
-The features provided by the "minimal" distribution are exactly the same as in the "default" distribution, the difference
-is that the minimal distribution will download the features from Internet.
-
-h3. Installation on Windows platform
-
-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".
-
-# From a browser, navigate to [http://karaf.apache.org/index/community/download.html].
-# Download Apache Karaf binary distribution in the zip format: {{apache-karaf-4.0.0.zip}}.
-# Extract the files from the zip file into a directory of your choice (it's the {{KARAF_HOME}}.
-NB: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
-# Apache Karaf is now installed.
-
-{tip:title=Handy Hint}
-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 _start \-> startup_ that executes
-{noformat}
-subst S: "C:\your very % problematic path!\KARAF"
-{noformat}
-so your Karaf root directory is S: --- which works for sure and is short to type.
-{tip}
-
-h3. Installation on Unix platforms
-
-NB: the JAVA_HOME environment variable has to be correctly defined. Check the current value using
-{code}
-echo $JAVA_HOME
-{code}
-If it's not correct, fix it using:
-{code}
-export JAVA_HOME=....
-{code}
-
-# From a browser, navigate to [http://karaf.apache.org/index/community/download.html].
-# Download Apache Karaf binary distribution in the tar.gz format: {{apache-karaf-4.0.0.tar.gz}}.
-# Extract the files from the tar.gz file into a directory of your choice (it's the {{KARAF_HOME}}). For example:
-{code}
-gunzip apache-karaf-4.0.0.tar.gz
-tar xvf apache-karaf-4.0.0.tar
-{code}
-NB: remember the restrictions concerning illegal characters in Java paths, e.g. \!, % etc.
-# Apache Karaf is now installed.
-
-h2. Post-Installation steps
-
-Thought it is not always required, it is strongly advised to set up the {{JAVA_HOME}} environment property to point to the JDK you want Apache Karaf to use before starting it.
-This property is used to locate the {{java}} executable and should be configured to point to the home directory of the Java SE 7 installation.
-
-By default, all Apache Karaf files are "gather" in one directory: the {{KARAF_HOME}}.
-
-You can define your own directory layout, by using some Karaf environment variables:
-
-* {{KARAF_DATA}} is the location of the data folder, where Karaf stores temporary files.
-* {{KARAF_ETC}} is the location of the etc folder, where Karaf stores configuration files.
-* {{KARAF_BASE}} is the Karaf base folder. By default {{KARAF_BASE}} is the same as {{KARAF_HOME}}.
-
-h2. Building from Sources
-
-If you intend to build Apache Karaf from the sources, the requirements are a bit different:
-
-*Hardware:*
-* 500 MB of free disk space for the Apache Karaf source distributions or SVN checkout, the Maven build and the dependencies Maven downloads.
-
-*Environment:*
-* Java SE Development Kit 1.7.x or greater ([http://www.oracle.com/technetwork/java/javase/]).
-* Apache Maven 3.0.4 or greater ([http://maven.apache.org/download.html]).
-
-h3. Building on Windows platform
-
-# You can get the Apache Karaf sources from:
-* the sources distribution {{apache-karaf-4.0.0-src.zip}} available at [http://karaf.apache.org/index/community/download.html]. Extract the files in the directory of your choice.
-* by checkout of the git repository:
-{code}
-git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
-{code}
-# Use Apache Maven to build Apache Karaf:
-{code}
-mvn clean install
-{code}
-NB: you can speed up the build by bypassing the unit tests:
-{code}
-mvn clean install -DskipTests
-{code}
-# You can find the built binary distribution in {{assemblies\apache-karaf\target\apache-karaf-4.0.0.zip}}. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.
-
-h3. Building on Unix platforms
-
-# You can get the Apache Karaf sources from:
-* the sources distribution {{apache-karaf-4.0.0-src.tar.gz}} available at [http://karaf.apache.org/index/community/download.html]. Extract the files in the directory of your choice.
-* by checkout of the git repository:
-{code}
-git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
-{code}
-# Use Apache Maven to build Apache Karaf:
-{code}
-mvn clean install
-{code}
-NB: you can speed up the build by bypassing the unit tests:
-{code}
-mvn clean install -DskipTests
-{code}
-# You can find the built binary distribution in {{assemblies/apache-karaf/target/apache-karaf-4.0.0.tar.gz}}. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/instances.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/instances.conf b/manual/src/main/webapp/users-guide/instances.conf
deleted file mode 100644
index 1d792e6..0000000
--- a/manual/src/main/webapp/users-guide/instances.conf
+++ /dev/null
@@ -1,365 +0,0 @@
-h1. Instances
-
-A instance is a complete new Apache Karaf runtime, isolated from the other ones.
-
-The purpose is to easily create and manage a new Apache Karaf runtime without installing a complete distribution.
-
-A instance is a new instance that you can launch separately from the root one, and deploy applications into. It means that each instance is run on a different JVM.
-
-A instance does not contain a full copy of the Apache Karaf distribution, but only a set of the configuration files and data folder which contains all the runtime information, logs and temporary files.
-
-h2. Using the instance commands
-
-The *instance* commands allow you to create and manage instances.
-
-h3. Creating instances
-
-You create a new runtime instance by typing [{{instance:create}}|/commands/instance-create] in the Karaf console.
-
-As shown in the following example, {{instance:create}} causes the runtime to create a new runtime installation in the active runtime's {{instances/[name]} directory. The new instance is a new Karaf instance and is assigned an SSH port number based on an incremental count starting at 8101 and a RMI registry port number based on an incremental count starting at 1099.
-
-{code}
-karaf@root()> instance:create test
-{code}
-
-The new instance is fresh Apache Karaf instance. It uses default configuration files set, as you install a fresh Karaf distribution.
-
-You can enable the verbose mode for the {{instance:create}} command using the {{-v}} option:
-
-{code}
-karaf@root()> instance:create -v test
-Creating new instance on SSH port 8103 and registry port 1101 / RMI server port 44446 at: /opt/karaf/instances/test
-Creating dir: /opt/karaf/instances/test/bin
-Creating dir: /opt/karaf/instances/test/etc
-Creating dir: /opt/karaf/instances/test/system
-Creating dir: /opt/karaf/instances/test/deploy
-Creating dir: /opt/karaf/instances/test/data
-Creating file: /opt/karaf/instances/test/etc/config.properties
-Creating file: /opt/karaf/instances/test/etc/jre.properties
-Creating file: /opt/karaf/instances/test/etc/custom.properties
-Creating file: /opt/karaf/instances/test/etc/java.util.logging.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.felix.fileinstall-deploy.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.obr.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.repos.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.log.cfg
-Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.logging.cfg
-Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.url.mvn.cfg
-Creating file: /opt/karaf/instances/test/etc/users.properties
-Creating file: /opt/karaf/instances/test/etc/keys.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.cfg
-Creating file: /opt/karaf/instances/test/etc/system.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.shell.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.management.cfg
-Creating file: /opt/karaf/instances/test/bin/karaf
-Creating file: /opt/karaf/instances/test/bin/start
-Creating file: /opt/karaf/instances/test/bin/stop
-{code}
-
-You can manually configure the different ports, the location of the instance, the Apache Karaf features URLs using different options of the {{instance:create}} command.
-You can have details about these options using the {{--help}} option.
-
-h3. Cloning an instance
-
-Instead of creating a fresh instance, you can clone an existing instance using {{instance:clone}}.
-
-The {{instance:clone}} command reuse the files from the source instance:
-
-{code}
-karaf@root()> instance:clone root test
-{code}
-
-You can have details about the cloning options using the {{--help}} option.
-
-h3. Changing the instance location
-
-By default, the new instances storage is in the {{KARAF_HOME/instance}} directory.
-You find a directory with the name of the instance storing the different instance files.
-
-You can change the location of the instance using the {{-l}} option to the {{instance:create}} and {{instance:clone}} commands:
-
-{code}
-karaf@root()> instance:create -v -l /tmp/test test
-Creating new instance on SSH port 8102 and registry port 1100 / RMI server port 44445 at: /tmp/test
-Creating dir: /tmp/test/bin
-Creating dir: /tmp/test/etc
-Creating dir: /tmp/test/system
-Creating dir: /tmp/test/deploy
-Creating dir: /tmp/test/data
-Creating file: /tmp/test/etc/config.properties
-Creating file: /tmp/test/etc/jre.properties
-Creating file: /tmp/test/etc/custom.properties
-Creating file: /tmp/test/etc/java.util.logging.properties
-Creating file: /tmp/test/etc/org.apache.felix.fileinstall-deploy.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.features.obr.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.features.repos.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.log.cfg
-Creating file: /tmp/test/etc/org.ops4j.pax.logging.cfg
-Creating file: /tmp/test/etc/org.ops4j.pax.url.mvn.cfg
-Creating file: /tmp/test/etc/users.properties
-Creating file: /tmp/test/etc/keys.properties
-Creating file: /tmp/test/etc/org.apache.karaf.features.cfg
-Creating file: /tmp/test/etc/system.properties
-Creating file: /tmp/test/etc/org.apache.karaf.shell.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.management.cfg
-Creating file: /tmp/test/bin/karaf
-Creating file: /tmp/test/bin/start
-Creating file: /tmp/test/bin/stop
-{code}
-
-Careful, it's not possible to change the location of an instance once it has been created.
-
-NB: {{instance:destroy}} will remove the instance location for you. You don't have to remove the instance location "by hand".
-
-h3. Changing instance ports
-
-You can change the SSH port number assigned to an instance using the {{instance:ssh-port-change}} command:
-
-{code}
-karaf@root()> instance:ssh-port-change test 8104
-{code}
-
-where test is the instance name and 8104 is the new SSH port number to use for the test instance.
-
-You can change the RMI Registry port number (used by JMX) of an instance using the {{instance:rmi-registry-port-change}} command:
-
-{code}
-karaf@root()> instance:rmi-registry-port-change test 1102
-{code}
-
-where test is the instance name and 1102 is the new RMI Registry port number to use for the test instance.
-
-You can also change the RMI Server port number (used by JMX too) of an instance using the {{instance:rmi-server-port-change}} command:
-
-{code}
-karaf@root()> instance:rmi-server-port-change test 44447
-{code}
-
-where test is the instance name and 44447 is the new RMI Server port number to use for the test instance.
-
-NB: the instance has to be stopped to be able to change the port numbers.
-
-h3. Starting instances
-
-New instances are created in a stopped state.
-
-To start an instance, you can use the {{instance:start}} command:
-
-{code}
-karaf@root()> instance:start test
-{code}
-
-where test is the instance name.
-
-h3. Listing instances
-
-To list the instances and their current status, you can use the {{instance:list}} command:
-
-{code}
-karaf@root()> instance:list
-SSH Port | RMI Registry | RMI Server | State | PID | Name
--------------------------------------------------------------
- 8101 | 1099 | 44444 | Started | 19652 | root
- 8104 | 1101 | 44446 | Stopped | 0 | test
-{code}
-
-An instance can be in the following status:
-
-- Stopped: the instance is stopped.
-- Starting: the instance is starting.
-- Started: the instance is up and running. You can connect and use it.
-
-h3. Status of an instance
-
-You can get directly the status of a given instance using the {{instance:status}} command:
-
-{code}
-karaf@root()> instance:status test
-Started
-{code}
-
-where test is the instance name.
-
-h3. Connecting to an instance
-
-You can connect to a running instance directly from the root one using the {{instance:connect}} command:
-
-{code}
-karaf@root()> instance:connect test
-{code}
-
-where 'test' is the instance name where to connect to.
-
-By default, this command will use the same username used on the root instance, and the password will be prompted.
-
-You can use a different username using the {{-u}} or {{--username}} option. You can also provide the password using the
-{{-p}} or {{--password}} option.
-
-If you don't provide any argument, you will logon on the instance:
-
-{code}
-karaf@test()>
-{code}
-
-Note the name of instance in the shell prompt (@test).
-
-You can logoff from the instance and return back to the root instance using the {{logout}} command or CTRL-D key binding:
-
-{code}
-karaf@test()> logout
-karaf@root()>
-{code}
-
-The {{instance:connect}} command accepts shell commands as argument. It allows you to directly execute commands or scripts on the instance:
-
-{code}
-karaf@root()> instance:connect test feature:list
-Name | Version | Installed | Repository | Description
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-standard | 4.0.0 | x | standard-4.0.0 | Karaf standard feature
-aries-annotation | 4.0.0 | | standard-4.0.0 | Aries Annotations
-wrapper | 4.0.0 | | standard-4.0.0 | Provide OS integration
-service-wrapper | 4.0.0 | | standard-4.0.0 | Provide OS integration (alias to wrapper feature)
-obr | 4.0.0 | | standard-4.0.0 | Provide OSGi Bundle Repository (OBR) support
-config | 4.0.0 | x | standard-4.0.0 | Provide OSGi ConfigAdmin support
-region | 4.0.0 | x | standard-4.0.0 | Provide Region Support
-...
-{code}
-
-h3. Stop an instance
-
-To stop an instance, you can connect to the instance (using {{instance:connect}}) and execute the {{system:shutdown}}
-command.
-
-You can also use the [{{instance:stop}}|/commands/instance-stop] command:
-
-{code}
-karaf@root()> instance:stop test
-{code}
-
-where test is the instance name.
-
-The instance will go to the "Stopped" state.
-
-h3. Destroy an instance
-
-You can completely delete a stopped instance using the {{instance:destroy}} command:
-{code}
-karaf@root()> instance:destroy test
-{code}
-
-where test is the instance name.
-
-NB: the {{instance:destroy}} deletes the instance store (the location where the instance files are stored).
-
-h3. Rename an instance
-
-You can change the name of a stopped instance using the {{instance:rename}} command:
-
-{code}
-karaf@root()> instance:rename test newTest
-{code}
-
-where test is the current instance name, and newTest the new instance name.
-
-h2. Instance script
-
-The {{instance:*}} commands require the root instance running.
-
-But, you can also administrate directly instances without the root instance, using the {{bin/instance}} Unix script
-(or {{bin/instance.bat}} script on Windows).
-
-You find the same actions that you can do with the {{instance:*}} commands in the {{instance[.bat]}} script:
-
-{code}
-bin/instance
-Available commands:
- clone - Clones an existing container instance.
- create - Creates a new container instance.
- destroy - Destroys an existing container instance.
- list - Lists all existing container instances.
- opts-change - Changes the Java options of an existing container instance.
- rename - Rename an existing container instance.
- rmi-registry-port-change - Changes the RMI registry port (used by management layer) of an existing container instance.
- rmi-server-port-change - Changes the RMI server port (used by management layer) of an existing instance.
- ssh-port-change - Changes the secure shell port of an existing container instance.
- start - Start an existing container instance.
- status - Check the current status of an instance.
- stop - Stop an existing container instance.
-Type 'command --help' for more help on the specified command.
-{code}
-
-For instance, to list all the instances, you can use the {{instance}} script with the {{list}} command:
-
-{code}
-bin/instance list
-SSH Port | RMI Registry | RMI Server | State | PID | Name
------------------------------------------------------------
- 8101 | 1099 | 44444 | Stopped | 0 | root
- 8102 | 1100 | 44445 | Stopped | 0 | test
-{code}
-
-It's exactly the same as executing {{instance:list}} in the root instance.
-
-You can obtain details about commands options and arguments using the {{--help}} option. For instance:
-
-{code}
-bin/instance rename --help
-DESCRIPTION
- instance:rename
-
- Rename an existing container instance.
-
-SYNTAX
- instance:rename [options] name new-name
-
-ARGUMENTS
- name
- The name of the container instance to rename
- new-name
- The new name of the container instance
-
-OPTIONS
- --help
- Display this help message
- -v, --verbose
- Display actions performed by the command (disabled by default)
-
-{code}
-
-h2. JMX InstanceMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the instances: the InstanceMBean.
-
-The ObjectName to use is {{org.apache.karaf:type=instance,name=*}}.
-
-h3. Attributes
-
-The {{Instances}} attribute is a tabular data attribute providing details about the instances:
-
-* {{Is Root}} (boolean): if true, the instance is the root instance, false else.
-* {{JavaOpts}} (string): it contains the JVM arguments used by the instance.
-* {{Location}} (string): it's the path to the instance storage.
-* {{Name}} (string): it's the name of the instance.
-* {{Pid}} (long): it's the current system process ID (PID) of the instance process.
-* {{RMI Registry Port}} (int): it's the port number of the instance RMI Registry (JMX).
-* {{RMI Server Port}} (int): it's the port number of the instance RMI Server (JMX).
-* {{SSH Port}} (int): it's the port number of the instance SSH Server.
-* {{State}} (string): it's the current status of the instance (Stopped, Starting, Started).
-
-h3. Operations
-
-The InstanceMBean provides the following operations, corresponding to the previous {{instance:*}} commands:
-* {{createInstance(instanceName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts, features, featuresUrls)}}: create a new instance.
-* {{changeSshPort(instanceName, port)}}: change the SSH port of an instance.
-* {{changeRmiServerPort(instanceName, port)}}: change the RMI server port of an instance.
-* {{changeRmiRegistry(instanceName, port)}}: change the RMI registry port of an instance.
-* {{changeJavaOpts(instanceName, javaOpts)}}: change the Java options of an instance.
-* {{destroyInstance(instanceName)}}: destroy an instance.
-* {{startInstance(instanceName)}}: start an instance.
-* {{startInstance(instanceName, options)}}: start an instance with the given Java options.
-* {{startInstance(instanceName, options, wait, debug)}}: start an instance with the given Java options.
- If wait is true, this operation is waiting for the instance is in "Started" state. If debug is true, the instance is started in debug mode.
-* {{stopInstance(instanceName)}}: stop an instance.
-* {{renameInstance(instanceName, newInstanceName)}}: rename an instance.
-* {{renameInstance(instanceName, newInstanceName, verbose)}}: rename an instance. If verbose is true, this operation provides details in the log.
-* {{cloneInstance(instanceName, cloneName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts)}}: clone an existing instance.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/jdbc.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/jdbc.conf b/manual/src/main/webapp/users-guide/jdbc.conf
deleted file mode 100644
index 850172d..0000000
--- a/manual/src/main/webapp/users-guide/jdbc.conf
+++ /dev/null
@@ -1,210 +0,0 @@
-h1. DataSources (JDBC)
-
-The Apache Karaf DataSources (JDBC) is an optional enterprise feature.
-
-You have to install the following features first:
-
-{code}
-karaf@root()> feature:repo-add pax-jdbc
-karaf@root()> feature:install pax-jdbc
-karaf@root()> feature:install pax-jdbc-config
-karaf@root()> feature:install jdbc
-{code}
-
-Pax JDBC provides ready to use adapters for different databases:
-
-* pax-jdbc-derby
-* pax-jdbc-derbyclient
-* pax-jdbc-h2
-* pax-jdbc-mariadb
-* pax-jdbc-mysql
-* pax-jdbc-oracle
-* pax-jdbc-postgresql
-* pax-jdbc-sqlite
-* pax-jdbc-mssql
-
-This feature provides an OSGi service to create/delete JDBC datasources in the container and perform database operations (SQL queries).
-
-This JDBC OSGi service can be manipulated programmatically (see the developer guide for details), using the {{jdbc:*}} commands, or using the JDBC MBean.
-
-h2. Commands
-
-h3. {{jdbc:ds-create}}
-
-The {{jdbc:ds-create}} command automatically creates a datasource definition file by leveraging pax-jdbc.
-
-The {{jdbc:ds-create}} command requires either:
-
-* the {{--driverName}} containing the JDBC driver name
-* or the {{--driverClass}} containing the JDBC driver class name
-
-The {{jdbc:ds-create}} accepts a set of options and the name argument:
-
-{code}
-DESCRIPTION
- jdbc:ds-create
-
- Create a JDBC datasource config for pax-jdbc-config from a DataSourceFactory
-
-SYNTAX
- jdbc:ds-create [options] name
-
-ARGUMENTS
- name
- The JDBC datasource name
-
-OPTIONS
- -dbName
- Database name to use
- --help
- Display this help message
- -dn, --driverName
- org.osgi.driver.name property of the DataSourceFactory
- -u, --username
- The database username
- -dc, --driverClass
- org.osgi.driver.class property of the DataSourceFactory
- -p, --password
- The database password
- -url
- The JDBC URL to use
-{code}
-
-* the {{name}} argument is required. It's the name of the datasource. The name is used to identify the datasource, and to create the datasource definition file ({{deploy/datasource-[name].xml}}).
-* the {{-u}} option is optional. It defines the database username.
-* the {{-url}} option is optional. It defines the JDBC URL to access to the database.
-* the {{-p}} option is optional. It defines the database password.
-
-For instance, to create an embedded Apache Derby database in Apache Karaf, you can do:
-
-{code}
-karaf@root()> jdbc:ds-create -dn derby -dbName test -url jdbc:derby:test test
-{code}
-
-We can see that this command created a configuration PID containing the datasource properties.
-
-h2. {{jdbc:ds-delete}}
-
-The {{jdbc:ds-delete}} command deletes a datasource.
-
-{code}
-karaf@root()> jdbc:ds-delete test
-{code}
-
-h2. {{jdbc:ds-list}}
-
-The {{jdbc:ds-list}} command lists the JDBC datasources:
-
-{code}
-karaf@root()> jdbc:ds-list
-Name | Product | Version | URL | Status
----------------------------------------
-
-{code}
-
-h2. {{jdbc:ds-info}}
-
-The {{jdbc:ds-info}} command provides details about a JDBC datasource:
-
-{code}
-karaf@root()> jdbc:ds-info test
-Property | Value
---------------------------------------------------
-driver.version | 10.8.2.2 - (1181258)
-username | APP
-db.version | 10.8.2.2 - (1181258)
-db.product | Apache Derby
-driver.name | Apache Derby Embedded JDBC Driver
-url | jdbc:derby:test
-{code}
-
-h2. {{jdbc:execute}}
-
-The {{jdbc:execute}} command executes a SQL query that doesn't return any result on a given JDBC datasource.
-
-Typically, you can use the {{jdbc:execute}} command to create tables, insert values into tables, etc.
-
-For instance, we can create a {{person}} table on our {{test}} datasource:
-
-{code}
-karaf@root()> jdbc:execute test "create table person(name varchar(100), nick varchar(100))"
-{code}
-
-And we can insert some records in the {{person}} table:
-
-{code}
-karaf@root()> jdbc:execute test "insert into person(name, nick) values('foo','bar')"
-karaf@root()> jdbc:execute test "insert into person(name, nick) values('test','test')"
-{code}
-
-h2. {{jdbc:query}}
-
-The {{jdbc:query}} command is similar to the {{jdbc:execute}} one but it displays the query result.
-
-For instance, to display the content of the {{person}} table, we can do:
-
-{code}
-karaf@root()> jdbc:query test "select * from person"
-NICK | NAME
---------------------------------
-bar | foo
-test | test
-{code}
-
-h2. {{jdbc:tables}}
-
-The {{jdbc:tables}} command displays all tables available on a given JDBC datasource:
-
-{code}
-karaf@root()> jdbc:tables test
-REF_GENERATION | TYPE_NAME | TABLE_NAME | TYPE_CAT | REMARKS | TYPE_SCHEM | TABLE_TYPE | TABLE_SCHEM | TABLE_CAT | SELF_REFERENCING_COL_NAME
-----------------------------------------------------------------------------------------------------------------------------------------------------
- | | SYSALIASES | | | | SYSTEM TABLE | SYS | |
- | | SYSCHECKS | | | | SYSTEM TABLE | SYS | |
- | | SYSCOLPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSCOLUMNS | | | | SYSTEM TABLE | SYS | |
- | | SYSCONGLOMERATES | | | | SYSTEM TABLE | SYS | |
- | | SYSCONSTRAINTS | | | | SYSTEM TABLE | SYS | |
- | | SYSDEPENDS | | | | SYSTEM TABLE | SYS | |
- | | SYSFILES | | | | SYSTEM TABLE | SYS | |
- | | SYSFOREIGNKEYS | | | | SYSTEM TABLE | SYS | |
- | | SYSKEYS | | | | SYSTEM TABLE | SYS | |
- | | SYSPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSROLES | | | | SYSTEM TABLE | SYS | |
- | | SYSROUTINEPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSSCHEMAS | | | | SYSTEM TABLE | SYS | |
- | | SYSSEQUENCES | | | | SYSTEM TABLE | SYS | |
- | | SYSSTATEMENTS | | | | SYSTEM TABLE | SYS | |
- | | SYSSTATISTICS | | | | SYSTEM TABLE | SYS | |
- | | SYSTABLEPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSTABLES | | | | SYSTEM TABLE | SYS | |
- | | SYSTRIGGERS | | | | SYSTEM TABLE | SYS | |
- | | SYSVIEWS | | | | SYSTEM TABLE | SYS | |
- | | SYSDUMMY1 | | | | SYSTEM TABLE | SYSIBM | |
- | | PERSON | | | | TABLE | APP | |
-{code}
-
-h2. JMX JDBC MBean
-
-The JMX JDBC MBean provides the JDBC datasources, and the operations to manipulate datasources and database.
-
-The object name to use is {{org.apache.karaf:type=jdbc,name=*}}.
-
-h3. Attributes
-
-The {{Datasources}} attribute provides a tabular data of all JDBC datasource, containing:
-
-* {{name}} is the JDBC datasource name
-* {{product}} is the database product backend
-* {{url}} is the JDBC URL used by the datasource
-* {{version}} is the database version backend.
-
-h3. Operations
-
-* {{create(name, type, jdbcDriverClassName, version, url, user, password, installBundles)}} creates a JDBC datasource (the arguments correspond to the options of the {{jdbc:create}} command).
-* {{delete(name)}} deletes a JDBC datasource.
-* {{info(datasource)}} returns a Map (String/String) of details about a JDBC {{datasource}}.
-* {{tables(datasource)}} returns a tabular data containing the tables available on a JDBC {{datasource}}.
-* {{execute(datasource, command}} executes a SQL command on the given JDBC {{datasource}}.
-* {{query(datasource, query}} executes a SQL query on the given JDBC {{datasource}} and return the execution result as tabular data.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/jms.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/jms.conf b/manual/src/main/webapp/users-guide/jms.conf
deleted file mode 100644
index e1fd626..0000000
--- a/manual/src/main/webapp/users-guide/jms.conf
+++ /dev/null
@@ -1,300 +0,0 @@
-h1. MOM (JMS)
-
-The Apache Karaf MOM (Messaging Oriented Middleware/JMS) is an optional enterprise feature.
-
-You have to install the {{jms}} feature first:
-
-{code}
-karaf@root()> feature:install jms
-{code}
-
-The {{jms}} feature doesn't install a JMS broker: it just installs the OSGi service, commands, and MBean to interact with
-a JMS broker (not the broker itself).
-
-It means that you have to install a JMS broker itself.
-
-This JMS broker can be available:
-
-* outside of Apache Karaf, as a standalone broker. In that case, Apache Karaf JMS will remotely connect to the JMS broker.
- For instance, you can use this topology with Apache ActiveMQ or IBM WebsphereMQ.
-* embedded in Apache Karaf. With this topology, Apache Karaf itself provides a JMS broker service. Apache ActiveMQ provides
- a native support in Apache Karaf.
-
-For instance, you can install Apache ActiveMQ directly in Apache Karaf:
-
-{code}
-karaf@root()> feature:repo-add activemq
-Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
-karaf@root()> feature:install activemq-broker
-{code}
-
-The {{activemq-broker}} feature installs:
-
-* a Apache ActiveMQ broker directly in Apache Karaf, bind to the {{61616}} port number by default.
-* the Apache ActiveMQ WebConsole bound to {{http://0.0.0.0:8181/activemqweb}} by default.
-
-The Apache Karaf {{jms}} feature provides an OSGi service to create/delete JMS connection factories in the container
-and perform JMS operations (send or consume messages, get information about a JMS broker, list the destinations, ...).
-
-This JMS OSGi service can be manipulated programmatically (see the developer guide for details), using the {{jms:*}} commands, or using the JMS MBean.
-
-h2. Commands
-
-h3. {{jms:create}}
-
-The {{jms:create}} command creates a JMS connection factory in the Apache Karaf container. It automatically creates a
-blueprint XML file in the {{deploy}} folder containing the JMS connection factory definition corresponding
-to the type that you mentioned.
-
-The {{jms:create}} command accepts different arguments and options:
-
-{code}
-karaf@root()> jms:create --help
-DESCRIPTION
- jms:create
-
- Create a JMS connection factory.
-
-SYNTAX
- jms:create [options] name
-
-ARGUMENTS
- name
- The JMS connection factory name
-
-OPTIONS
- -t, --type
- The JMS connection factory type (ActiveMQ or WebsphereMQ)
- (defaults to ActiveMQ)
- -u, --username
- Username to connect to the JMS broker
- (defaults to karaf)
- --help
- Display this help message
- --url
- URL of the JMS broker. For WebsphereMQ type, the URL is hostname/port/queuemanager/channel
- (defaults to tcp://localhost:61616)
- -p, --password
- Password to connect to the JMS broker
- (defaults to karaf)
-
-{code}
-
-* the {{name}} argument is required. It's the name of the JMS connection factory. The name is used to identify the connection factory, and to create the connection factory definition file ({{deploy/connectionfactory-[name].xml}}).
-* the {{-t}} ({{--type}}) option is required. It's the type of the JMS connection factory. Currently on {{activemq}} and {{webspheremq}} type are supported. If you want to use another type of JMS connection factory, you can create the {{deploy/connectionfactory-[name].xml}} file by hand (using one as template).
-* the {{--url}} option is required. It's the URL used by the JMS connection factory to connect to the broker. If the type is {{activemq}}, the URL looks like {{tcp://localhost:61616}}. If the type is {{webspheremq}}, the URL looks like {{host/port/queuemanager/channel}}.
-* the {{-u}} ({{--username}}) option is optional (karaf by default). In the case of the broker requires authentication, it's the username used.
-* the {{-p}} ({{--password}}) option is optional (karaf by default). In the case of the broker requires authentication, it's the password used.
-
-For instance, to create a JMS connection factory for a Apache ActiveMQ broker, you can do:
-
-{code}
-karaf@root()> jms:create -t activemq --url tcp://localhost:61616 test
-{code}
-
-{warning}
-The {{jms:create}} command doesn't install any feature or bundle providing the JMS connection factory classes (and dependencies).
-You have to install the required features (for instance {{activemq-broker}} feature for Apache ActiveMQ), or bundles (for IBM WebsphereMQ) providing the JMS connection factory packages and classes.
-{warning}
-
-In the previous example, we assume that you previously installed the {{activemq-broker}} feature.
-
-We can see the created JMS connection factory:
-
-{code}
-karaf@root()> la
-...
-151 | Active | 80 | 0.0.0 | connectionfactory-test.xml
-{code}
-
-The {{connectionfactory-test.xml}} file has been created in the {{deploy}} folder.
-
-By default, the {{jms:create}} command constructs a JNDI name for the connection factory: {{/jms/[name]}}.
-
-It means that the connection factory name to use for the other {{jms:*}} commands is {{/jms/[name]}}.
-
-h3. {{jms:delete}}
-
-The {{jms:delete}} command deletes a JMS connection factory. The {{name}} argument is the name that you used at creation time:
-
-{code}
-karaf@root()> jms:delete test
-{code}
-
-h3. {{jms:connectionfactories}}
-
-The {{jms:connectionfactories}} command lists the JMS connection factories:
-
-{code}
-karaf@root()> jms:connectionfactories
-JMS Connection Factory
-----------------------
-/jms/test
-{code}
-
-h3. {{jms:info}}
-
-The {{jms:info}} command provides details about the JMS connection factory:
-
-{code}
-karaf@root()> jms:info /jms/test
-Property | Value
--------------------
-product | ActiveMQ
-version | 5.9.0
-{code}
-
-You can see the JMS broker product and version.
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-h3. {{jms:queues}}
-
-The {{jms:queues}} command lists the JMS queues available on a JMS broker. For instance:
-
-{code}
-karaf@root()> jms:queues /jms/test
-JMS Queues
-----------
-MyQueue
-{code}
-
-where {{/jms/test}} is the name of the JMS connection factory.
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-{warning}
-Depending of the JMS connection factory type, this command may not work.
-For now, the command works only with Apache ActiveMQ.
-{warning}
-
-h3. {{jms:topics}}
-
-The {{jms:topics}} command lists the JMS topics available on a JMS broker. For instance:
-
-{code}
-karaf@root()> jms:topics /jms/test
-JMS Topics
-----------
-MyTopic
-{code}
-
-where {{/jms/test}} is the name of the JMS connection factory.
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-{warning}
-Depending of the JMS connection factory type, this command may not work.
-For now, the command works only with Apache ActiveMQ.
-{warning}
-
-h3. {{jms:send}}
-
-The {{jms:send}} command sends a message to a given JMS queue.
-
-For instance, to send a message containing {{Hello World}} in the {{MyQueue}} queue, you can do:
-
-{code}
-karaf@root()> jms:send /jms/test MyQueue "Hello World"
-{code}
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-h3. {{jms:consume}}
-
-The {{jms:consume}} command consumes messages from a JMS queue.
-
-For instance, to consume all messages from {{MyQueue}}, you can do:
-
-{code}
-karaf@root()> jms:consume /jms/test MyQueue
-2 message(s) consumed
-{code}
-
-If you want to consume only some messages, you can define a selector using the {{-s}} ({{--selector}}) option.
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-{warning}
-The {{jms:consume}} command just consumes (so removes) messages from a JMS queue. It doesn't display the messages.
-If you want to see the details of messages, you can use the {{jms:browse}} command.
-{warning}
-
-h3. {{jms:count}}
-
-The {{jms:count}} command counts the number of pending messages into a JMS queue.
-
-For instance, if you want to know the number of messages on {{MyQueue}}, you can do:
-
-{code}
-karaf@root()> jms:count /jms/test MyQueue
-Messages Count
---------------
-8
-{code}
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-h3. {{jms:browse}}
-
-The {{jms:browse}} command browses a JMS queue and display details about messages.
-
-For instance, to browse the {{MyQueue}} queue:
-
-{code}
-karaf@root()> jms:browse /jms/test MyQueue
-Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013
-ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013
-ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013
-{code}
-
-By default, the messages properties are not displayed. You can use the {{-v}} ({{--verbose}}) option to display the properties:
-
-{code}
-karaf@root()> jms:browse -v /jms/test MyQueue
-Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp | Properties
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013 |
-ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013 |
-ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013 |
-{code}
-
-If you want to browse only some messages, you can define a selector using the {{-s}} ({{--selector}}) option.
-
-If the JMS broker requires an authentication, you can use the {{-u}} ({{--username}}) and {{-p}} ({{--password}}) options.
-
-h3. {{jms:move}}
-
-The {{jms:move}} command consumes all messages from a JMS queue and send it to another one.
-
-For instance, to move all messages from {{MyQueue}} queue to {{AnotherQueue}} queue, you can do:
-
-{code}
-karaf@root()> jms:move /jms/test MyQueue AnotherQueue
-3 message(s) moved
-{code}
-
-h2. JMX JMS MBean
-
-The JMX JMS MBean provides the attributes and operations to manipulate the JMS connection factories and JMS messages.
-
-The object name to use is {{org.apache.karaf:type=jms,name=*}}.
-
-h3. Attributes
-
-The {{Connectionfactories}} attribute provides the list of all JMS connection factories names.
-
-h3. Operations
-
-* {{create(name, type, url)}} creates a JMS connection factory.
-* {{delete(name)}} deletes a JMS connection factory.
-* {{Map<String, String> info(connectionFactory, username, password)}} gets details about a JMS connection factory and broker.
-* {{int count(connectionFactory, queue, username, password)}} counts the number of pending messages on a JMS queue.
-* {{List<String> queues(connectionFactory, username, password)}} lists the JMS queues available on the JMS broker.
-* {{List<String> topics(connectionFactory, username, password)}} lists the JMS topics available on the JMS broker.
-* {{TabularData browse(connectionFactory, queue, selector, username, password)}} browses a JMS queue and provides a table of JMS messages.
-* {{send(connectionFactory, queue, content, replyTo, username, password)}} sends a JMS message to a target queue.
-* {{int consume(connectionFactory, queue, selector, username, password)}} consumes JMS messages from a JMS queue.
-* {{int move(connectionFactory, source, destination, selector, username, password)}} moves messages from a JMS queue to another.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/jndi.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/jndi.conf b/manual/src/main/webapp/users-guide/jndi.conf
deleted file mode 100644
index af40bf5..0000000
--- a/manual/src/main/webapp/users-guide/jndi.conf
+++ /dev/null
@@ -1,205 +0,0 @@
-h1. Naming (JNDI)
-
-The Apache Karaf Naming (JNDI) is an optional enterprise feature.
-
-You have to install the {{jndi}} feature first:
-
-{code}
-karaf@root()> feature:install jndi
-{code}
-
-Apache Karaf provides a complete JNDI support.
-
-You have two parts in the Apache Karaf JNDI support:
-
-* a fully compliant implementation of the OSGi Alliance JNDI Service specification.
-* a more "regular" JNDI context, containing different names that you can administrate.
-
-h2. OSGi Services Registry and JNDI
-
-The OSGi Service Registry provides a centralized register/query capabilities for OSGi services.
-
-A common pattern outside of OSGi is to make use of JNDI API to access services from a directory system.
-The OSGi service registry can be viewed as an example of such a system.
-
-Apache Karaf supports the {{osgi:service}} lookup scheme as defined by the JNDI Service Specification.
-
-The schema is:
-
-{code}
-osgi:service/<interface>[/<filter>]
-{code}
-
-For instance, you can directly use JNDI to get a OSGi service:
-
-{code}
-Context ctx = new InitialContext();
-Runnable r = (Runnable) ctx.lookup("osgi:service/java.lang.Runnable");
-{code}
-
-h2. JNDI service
-
-Apache Karaf also supports regular JNDI, including a directoy system where you can register name bindings, sub-context, etc.
-
-It supports the standard JNDI API:
-
-{code}
-Context ctx = new InitialContext();
-Runnable r = (Runnable) ctx.lookup("this/is/the/name");
-{code}
-
-It also allows you to bind some OSGi services as "pure" JNDI name. In that case, you don't have to use the specific
-{{osgi:service}} scheme.
-
-h2. Commands
-
-Apache Karaf provides specific commands to manipulate the JNDI service.
-
-h3. {{jndi:names}}
-
-The {{jndi:names}} command lists all JNDI names. It groups both the JNDI names from the {{osgi:service}} scheme and the
-regular JNDI names:
-
-{code}
-karaf@root()> jndi:names
-JNDI Name | Class Name
-------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
-{code}
-
-We can see here the {{osgi:service/jndi}} name (using the {{osgi:service}} scheme) and {{jndi/service}} name (using the
-regular JNDI service).
-
-The {{jndi:names}} command accepts an optional {{context}} argument to list names on the given context.
-
-For instance, you can list only names in the {{jndi}} sub-context:
-
-{code}
-karaf@root()> jndi:names jndi
-JNDI Name | Class Name
-----------------------------------------------------------
-service | org.apache.karaf.jndi.internal.JndiServiceImpl
-{code}
-
-{warning}
-The {{jndi:names}} lists only names (the full qualified name). It means that the empty JNDI sub-contexts are not displayed.
-To display all JNDI sub-contexts (empty or not), you can use the {{jndi:contexts}} command.
-{warning}
-
-h3. {{jndi:contexts}}
-
-The {{jndi:contexts}} command lists all JNDI sub-contexts:
-
-{code}
-karaf@root()> jndi:contexts
-JNDI Sub-Context
-----------------
-other/context
-foo/bar
-{code}
-
-h3. {{jndi:create}}
-
-The {{jndi:create}} command creates a new JNDI sub-context:
-
-{code}
-karaf@root()> jndi:create my/company
-{code}
-
-h3. {{jndi:delete}}
-
-The {{jndi:delete}} command deletes a JNDI sub-context:
-
-{code}
-karaf@root()> jndi:delete my/company
-{code}
-
-h3. {{jndi:alias}}
-
-The {{jndi:alias}} command creates a new JNDI name (alias) with an existing one.
-
-The existing JNDI name can be a regular one:
-
-{code}
-karaf@root()> jndi:alias bean/services/jndi aliases/services/jndi
-karaf@root()> jndi:names
-JNDI Name | Class Name
-----------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-bean/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-aliases/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-{code}
-
-or a name from the {{osgi:service}} schema:
-
-{code}
-karaf@root()> jndi:alias osgi:service/jndi alias/jndi/service
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-alias/jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
-{code}
-
-NB: the {{jndi:alias}} automatically creates all required JNDI sub-contexts.
-
-h3. {{jndi:bind}}
-
-The {{jndi:bind}} command binds an OSGi service with a JNDI name.
-
-The {{jndi:bind}} command requires an OSGi service ID and a JNDI name. The OSGi service ID can be found using the {{service:list}} command.
-
-For instance, we can bind the OSGi service with ID 344 with the JNDI name {{services/kar}}:
-
-{code}
-karaf@root()> jndi:bind 344 services/kar
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-services/kar | org.apache.karaf.kar.internal.KarServiceImpl
-{code}
-
-h3. {{jndi:unbind}}
-
-The {{jndi:unbind}} command unbind a given JNDI name:
-
-{code}
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-services/kar | org.apache.karaf.kar.internal.KarServiceImpl
-karaf@root()> jndi:unbind services/kar
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-{code}
-
-{warning}
-It's not possible to unbind a name from the {{osgi:service}} schema, as it's linked to a OSGi service.
-{warning}
-
-h2. JMX JndiMBean
-
-The JMX JndiMBean provides the JNDI names, and the operations to manipulate the JNDI service.
-
-The object name to use is {{org.apache.karaf:type=jndi,name=*}}.
-
-h3. Attributes
-
-The {{Names}} attribute provides a map containing all JNDI names and class names from both {{osgi:service}} scheme
-and the regular JNDI service.
-
-The {{Contexts}} attribute provides a list containing all JNDI sub-contexts.
-
-h3. Operations
-
-* {{getNames(context)}} provides a map containing JNDI names and class names in a given JNDI sub-context.
-* {{create(context)}} creates a new JNDI sub-context.
-* {{delete(context)}} deletes a JNDI sub-context.
-* {{alias(name, alias}} creates a JNDI name (alias) for a given one.
-* {{bind(serviceId, name}} binds a JNDI name using an OSGi service (identified by its ID).
-* {{unbind(name)}} unbinds a JNDI name.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/jpa.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/jpa.conf b/manual/src/main/webapp/users-guide/jpa.conf
deleted file mode 100644
index 1e3d6fb..0000000
--- a/manual/src/main/webapp/users-guide/jpa.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-h1. Persistence (JPA)
-
-Apache Karaf provides JPA persistence providers (such as Apache OpenJPA) to be easy to use (in a OSGi way) and provide
-container managed persistence for applications (using Blueprint).
-
-Apache Karaf embeds Aries JPA, providing a very easy way to develop applications that use JPA persistence.
-
-See the developer guide for details about developing applications that use JPA.
-
-h2. Persistence engine features
-
-Apache Karaf provides a set of ready to use persistence engine features:
-
-* Apache OpenJPA. The {{openjpa}} feature installs the {{jpa}} feature with the Apache OpenJPA as persistence engine:
-
-{code}
-karaf@root()> feature:install openjpa
-{code}
-
-* Hibernate. The {{hibernate}} feature installs the {{jpa}} feature with the Hibernate persistence engine:
-
-{code}
-karaf@root()> feature:install hibernate
-{code}
-
-* EclipseLink. The {{eclipselink}} feature will be available in the next Apache Karaf release.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/jta.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/jta.conf b/manual/src/main/webapp/users-guide/jta.conf
deleted file mode 100644
index 9857465..0000000
--- a/manual/src/main/webapp/users-guide/jta.conf
+++ /dev/null
@@ -1,105 +0,0 @@
-h1. Transaction (JTA)
-
-Apache Karaf provides container managed transactions, available as OSGi services.
-
-As most of the enterprise features, it's an optional feature that you can install with:
-
-{code}
-karaf@root()> feature:install transaction
-{code}
-
-However, the {{transaction}} feature is installed (as a transitive dependency) when installing enterprise features
-(like {{jdbc}} or {{jms}} features for instance).
-
-h2. Apache Aries Transaction and ObjectWeb HOWL
-
-The {{transaction}} feature uses Apache Aries and ObjectWeb HOWL. Aapache Aries Transaction "exposes" the transaction
-manager as OSGi service. The actual implementation of the transaction manager is ObjectWeb HOWL.
-
-ObjectWeb HOWL is a logger implementation providing features required by the ObjectWeb JOTM project, with a public API
-that is generally usable by any Transaction Manager.
-ObjectWeb HOWL uses unformatted binary logs to maximize performance and specifies a journalization API with methods
-necessary to support JOTM recovery operations.
-
-ObjectWeb HOWL is intended to be used for logging of temporary data such as XA transaction events.
-It is not a replacement for traditional log kits such as LOG4J and Java SE Logging.
-
-In Apache Karaf, ObjectWeb HOWL (High-speed ObjectWeb Logger) is used to implement TransactionLog (in Aries Transaction),
-providing a very performant transaction manager in an OSGi way.
-
-h2. Configuration
-
-The installation of the {{transaction}} feature installs a new configuration: {{org.apache.aries.transaction}}.
-
-You can see the configuration properties using:
-
-{code}
-karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
-----------------------------------------------------------------
-Pid: org.apache.aries.transaction
-BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
-Properties:
- aries.transaction.recoverable = true
- aries.transaction.timeout = 600
- service.pid = org.apache.aries.transaction
- org.apache.karaf.features.configKey = org.apache.aries.transaction
- aries.transaction.howl.maxBlocksPerFile = 512
- aries.transaction.howl.maxLogFiles = 2
- aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
- aries.transaction.howl.bufferSizeKBytes = 4
-{code}
-
-* {{aries.transaction.recoverable}} property is a flag to enable support of recoverable resource or not. A recoverable
- resource is a transactional object whose state is saved to stable storage if the transaction is committed, and whose
- state can be reset to what it was at the beginning of the transaction if the transaction is rolled back.
- At commit time, the transaction manager uses the two-phase XA protocol when communicating with the recoverable resource
- to ensure transactional integrity when more than one recoverable resource is involved in the transaction being committed.
- Transactional databases and message brokers like Apache ActiveMQ are examples of recoverable resources.
- A recoverable resource is represented using the javax.transaction.xa.XAResource interface in JTA.
- Default is {{true}}.
-* {{aries.transaction.timeout}} property is the transaction timeout. If a transaction has a lifetime longer than this timeout
- a transaction exception is raised and the transaction is rollbacked. Default is {{600}} (10 minutes).
-* {{aries.transaction.howl.logFileDir}} property is the directory where the transaction logs (journal) are stored.
- Default is {{KARAF_DATA/txlog}}.
-* {{aries.transaction.howl.maxLogFiles}} property is the maximum number of transaction log files to retain. Combined with the
- {{aries.transaction.howl.maxBlocksPerFile}}, it defines the transaction retention.
-
-You can change the configuration directly using the {{config:*}} commands, or the Config MBean.
-
-For instance, to increase the transaction timeout, you can do:
-
-{code}
-karaf@root()> config:edit org.apache.aries.transaction
-karaf@root()> config:property-set aries.transaction.timeout 1200
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
-----------------------------------------------------------------
-Pid: org.apache.aries.transaction
-BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
-Properties:
- aries.transaction.recoverable = true
- aries.transaction.timeout = 1200
- service.pid = org.apache.aries.transaction
- org.apache.karaf.features.configKey = org.apache.aries.transaction
- aries.transaction.howl.maxBlocksPerFile = 512
- aries.transaction.howl.maxLogFiles = 2
- aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
- aries.transaction.howl.bufferSizeKBytes = 4
-{code}
-
-{warning}
-The {{transaction}} feature defines the configuration in memory by default. It means that changes that you can do will
-be lost in case of Apache Karaf restart.
-If you want to define your own transaction configuration at startup, you have to create a {{etc/org.apache.aries.transaction.cfg}}
-configuration file and set the properties and values in the file. For instance:
-
-{code}
-# etc/org.apache.aries.transaction.cfg
-aries.transaction.recoverable = true
-aries.transaction.timeout = 1200
-aries.transaction.howl.maxBlocksPerFile = 512
-aries.transaction.howl.maxLogFiles = 2
-aries.transaction.howl.logFileDir = /opt/apache-karaf-4.0.0/data/txlog
-aries.transaction.howl.bufferSizeKBytes = 4
-{code}
-{warning}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/webapp/users-guide/kar.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/kar.conf b/manual/src/main/webapp/users-guide/kar.conf
deleted file mode 100644
index 50229f3..0000000
--- a/manual/src/main/webapp/users-guide/kar.conf
+++ /dev/null
@@ -1,284 +0,0 @@
-h1. KAR
-
-As described in the [Provisioning section|provisioning], Apache Karaf features describe applications.
-
-A feature defines different resources to resolve using URL (for instance, bundles URLs, or configuration files URLs).
-As described in the [Artifacts repositories and URLs section|urls], Apache Karaf looks for artifacts (bundles,
-configuration files, ...) in the artifact repositories.
-Apache Karaf may require to download artifacts from remote repositories.
-
-Apache Karaf provides a special type of artifact that package a features XML and all resources described in the features
-of this XML. This artifact is named a KAR (KAraf aRchive).
-
-A KAR file is a zip archive containing the
-
-Basically, the kar format is a jar (so a zip file) which contains a set of feature descriptor and bundle jar files.
-
-A KAR file contains a {{repository}} folder containing:
-
-* a set of features XML files
-* the artifacts following the Maven directory structure ({{groupId/artifactId/version/artifactId-version.type}}).
-
-For instance, the {{spring-4.0.0.kar}} contains:
-
-{code}
-~$ unzip -l spring-4.0.0.kar
-Archive: spring-4.0.0.kar
- Length Date Time Name
---------- ---------- ----- ----
- 143 2013-12-06 10:52 META-INF/MANIFEST.MF
- 12186 2013-12-06 10:52 repository/org/apache/karaf/features/spring/4.0.0/spring-4.0.0-features.xml
- 575389 2013-12-06 10:52 repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
- 232019 2013-12-06 10:52 repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar
- 673109 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.struts/1.3.10_1/org.apache.servicemix.bundles.struts-1.3.10_1.jar
- 37084 2013-12-06 10:52 repository/org/springframework/org.springframework.web.struts/3.2.4.RELEASE/org.springframework.web.struts-3.2.4.RELEASE.jar
- 7411 2013-12-06 10:52 repository/org/springframework/org.springframework.instrument/3.2.4.RELEASE/org.springframework.instrument-3.2.4.RELEASE.jar
- 246881 2013-12-06 10:52 repository/org/springframework/org.springframework.transaction/3.2.4.RELEASE/org.springframework.transaction-3.2.4.RELEASE.jar
- 16513 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.aopalliance/1.0_6/org.apache.servicemix.bundles.aopalliance-1.0_6.jar
- 881124 2013-12-06 10:52 repository/org/springframework/org.springframework.core/3.2.4.RELEASE/org.springframework.core-3.2.4.RELEASE.jar
- 199240 2013-12-06 10:52 repository/org/springframework/org.springframework.expression/3.2.4.RELEASE/org.springframework.expression-3.2.4.RELEASE.jar
- 614646 2013-12-06 10:52 repository/org/springframework/org.springframework.beans/3.2.4.RELEASE/org.springframework.beans-3.2.4.RELEASE.jar
- 340841 2013-12-06 10:52 repository/org/springframework/org.springframework.aop/3.2.4.RELEASE/org.springframework.aop-3.2.4.RELEASE.jar
- 877369 2013-12-06 10:52 repository/org/springframework/org.springframework.context/3.2.4.RELEASE/org.springframework.context-3.2.4.RELEASE.jar
- 130224 2013-12-06 10:52 repository/org/springframework/org.springframework.context.support/3.2.4.RELEASE/org.springframework.context.support-3.2.4.RELEASE.jar
- 30640 2013-12-06 10:52 repository/org/apache/karaf/deployer/org.apache.karaf.deployer.spring/4.0.0/org.apache.karaf.deployer.spring-4.0.0.jar
- 51951 2013-12-06 10:52 repository/org/springframework/org.springframework.aspects/3.2.4.RELEASE/org.springframework.aspects-3.2.4.RELEASE.jar
- 411175 2013-12-06 10:52 repository/org/springframework/org.springframework.jdbc/3.2.4.RELEASE/org.springframework.jdbc-3.2.4.RELEASE.jar
- 48049 2013-12-06 10:52 repository/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
- 190883 2013-12-06 10:52 repository/org/springframework/org.springframework.web.portlet/3.2.4.RELEASE/org.springframework.web.portlet-3.2.4.RELEASE.jar
- 635680 2013-12-06 10:52 repository/org/springframework/org.springframework.web/3.2.4.RELEASE/org.springframework.web-3.2.4.RELEASE.jar
- 645946 2013-12-06 10:52 repository/org/springframework/org.springframework.web.servlet/3.2.4.RELEASE/org.springframework.web.servlet-3.2.4.RELEASE.jar
- 464911 2013-12-06 10:52 repository/org/springframework/org.springframework.test/3.2.4.RELEASE/org.springframework.test-3.2.4.RELEASE.jar
- 69784 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-web/1.2.1/spring-osgi-web-1.2.1.jar
- 16030 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
- 32359 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar
- 208684 2013-12-06 10:52 repository/org/springframework/org.springframework.jms/3.2.4.RELEASE/org.springframework.jms-3.2.4.RELEASE.jar
- 75672 2013-12-06 10:52 repository/org/springframework/org.springframework.oxm/3.2.4.RELEASE/org.springframework.oxm-3.2.4.RELEASE.jar
- 393607 2013-12-06 10:52 repository/org/springframework/org.springframework.orm/3.2.4.RELEASE/org.springframework.orm-3.2.4.RELEASE.jar
- 338559 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/3.0_1/org.apache.servicemix.bundles.cglib-3.0_1.jar
- 35859 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-io/1.2.1/spring-osgi-io-1.2.1.jar
- 362889 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-core/1.2.1/spring-osgi-core-1.2.1.jar
- 120822 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-extender/1.2.1/spring-osgi-extender-1.2.1.jar
- 24231 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-annotation/1.2.1/spring-osgi-annotation-1.2.1.jar
- 12597 2013-12-06 10:52 repository/org/apache/karaf/bundle/org.apache.karaf.bundle.springstate/4.0.0/org.apache.karaf.bundle.springstate-4.0.0.jar
- 31903 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-io/1.0.0.RELEASE/gemini-blueprint-io-1.0.0.RELEASE.jar
- 578205 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-core/1.0.0.RELEASE/gemini-blueprint-core-1.0.0.RELEASE.jar
- 178525 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-extender/1.0.0.RELEASE/gemini-blueprint-extender-1.0.0.RELEASE.jar
---------- -------
- 9803140 38 files
-{code}
-
-As a KAR file is a simple zip file, you can create the KAR file by hand.
-
-For instance, the following Unix commands create a very simple KAR file:
-
-{code}
-~$ mkdir repository
-~$ cp /path/to/features.xml repository/features.xml
-~$ cp /path/to/my.jar repository/my/project/my/1.0.0/my-1.0.0.jar
-~$ zip -r my.kar repository
-updating: repository/ (stored 0%)
- adding: repository/my/project/my/1.0.0/my-1.0.0.jar (deflated 0%)
-{code}
-
-You can create KAR files using Apache Maven, or directly in the Apache Karaf console.
-
-h2. Maven
-
-Apache Karaf provides a Maven plugin: {{karaf-maven-plugin}}.
-
-The Apache Karaf Maven plugin provides the {{kar}} goal.
-
-The {{kar}} goal does:
-1. Reads all features specified in the features XML.
-2. For each feature described in the features XML, the goal resolves the bundles described in the feature.
-3. The goal finally packages the features XML, and the resolved bundles in a zip file.
-
-For instance, the following Maven POM create {{my-kar.kar}}
-
-For instance, you can use the following POM to create a kar:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>my.groupId</groupId>
- <artifactId>my-kar</artifactId>
- <version>1.0</version>
- <packaging>kar</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>4.0.0</version>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-{code}
-
-To create the KAR file, simply type:
-
-{code}
-~$ mvn install
-{code}
-
-Uou will have your kar in the {{target}} directory.
-
-h2. Commands
-
-Apache Karaf provides {{kar:*}} commands to manage KAR archives.
-
-h3. {{kar:list}}
-
-The {{kar:list}} command lists the installed KAR archives.
-
-{code}
-karaf@root()> kar:list
-KAR Name
--------------------
-my-kar-1.0-SNAPSHOT
-{code}
-
-A KAR is identified by its name.
-
-h3. {{kar:create}}
-
-Instead of using the {{karaf-maven-plugin}} or create the KAR archive by hand, you can use the {{kar:create}} command.
-
-The {{kar:create}} command creates a KAR file using a registered features repository.
-
-For instance, you want to create a KAR file for the Pax Web repository.
-
-The {{feature:repo-list}} command gives you the list of registered features repositories:
-
-{code}
-karaf@root()> feature:repo-list
-Repository | URL
--------------------------------------------------------------------------------------------------------
-standard-4.0.0 | mvn:org.apache.karaf.features/standard/4.0.0/xml/features
-enterprise-4.0.0 | mvn:org.apache.karaf.features/enterprise/4.0.0/xml/features
-spring-4.0.0 | mvn:org.apache.karaf.features/spring/4.0.0/xml/features
-org.ops4j.pax.web-4.1.4 | mvn:org.ops4j.pax.web/pax-web-features/4.1.4/xml/features
-{code}
-
-You can use one of these features repositories to create the kar file:
-
-{code}
-karaf@root()> kar:create org.ops4j.pax.web-4.1.4
-Adding feature pax-jetty
-Adding feature pax-http-whiteboard
-Adding feature pax-war
-Adding feature pax-http-tomcat
-Adding feature pax-war-tomcat
-Adding feature pax-http
-Adding feature pax-http-jetty
-Adding feature pax-jsf-support
-Adding feature pax-jetty-spdy
-Kar file created : /home/jbonofre/Downloads/apache-karaf-4.0.0/data/kar/org.ops4j.pax.web-4.1.4.kar
-{code}
-
-You can see that the KAR file has been created in the {{KARAF_DATA/kar}} folder.
-
-By default, the {{kar:create}} command creates a KAR file, packaging all features in the features descriptor.
-
-You can provide the list of features that you want to package into the KAR file:
-
-{code}
-karaf@root()> kar:create org.ops4j.pax.web-4.1.4 pax-jetty pax-tomcat
-Adding feature pax-jetty
-Adding feature pax-tomcat
-Kar file created : /opt/apache-karaf-4.1.4/data/kar/org.ops4j.pax.web-4.1.4.kar
-{code}
-
-h3. {{kar:install}}
-
-You can deploy a KAR file using {{kar:install}} command.
-
-The {{kar:install}} command expects the KAR URL. Any URL described in the [Artifacts repositories and URLs section|urls]
-is supported by the {{kar:install}} command:
-
-{code}
-karaf@root()> kar:install file:/tmp/my-kar-1.0-SNAPSHOT.kar
-{code}
-
-The KAR file is uncompressed and populated the {{KARAF_BASE/system}} folder.
-
-The Apache Karaf KAR service is looking for features XML files in the KAR file, registers the features XML and automatically
-installs all features described in the features repositories present in the KAR file.
-
-h3. {{kar:uninstall}}
-
-The {{kar:uninstall}} command uninstall a KAR file (identified by a name).
-
-By uninstall, it means that:
-
-* the features previously installed by the KAR file are uninstalled
-* delete (from the {{KARAF_DATA/system}} repository) all files previously "populated" by the KAR file
-
-For instance, to uninstall the previously installed {{my-kar-1.0-SNAPSHOT.kar}} KAR file:
-
-{code}
-karaf@root()> kar:uninstall my-kar-1.0-SNAPSHOT
-{code}
-
-h2. Deployer
-
-Apache Karaf also provides a KAR deployer. It means that you can drop a KAR file directly in the {{deploy}} folder.
-
-Apache Karaf will automatically install KAR files from the {{deploy}} folder.
-
-You can change the behaviours of the KAR deployer in the {{etc/org.apache.karaf.kar.cfg}}:
-
-{code}
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# Enable or disable the refresh of the bundles when installing
-# the features contained in a KAR file
-#
-noAutoRefreshBundles=false
-{code}
-
-By default, when the KAR deployer install features, by default, it refresh the bundles already installed.
-You can disable the automatic bundles refresh by setting the {{noAutoRefreshBundles}} property to {{false}}.
-
-h2. JMX KarMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the KAR files.
-
-The ObjectName to use is {{org.apache.karaf:type=kar,name=*}}.
-
-h3. Attributes
-
-The {{Kars}} attributes provides the list of KAR files (name) installed.
-
-h3. Operations
-
-* {{install(url)}} installs the KAR file at the given {{url}}.
-* {{create(repository, features)}} creates a KAR file using the given features {{repository}} name, and optionally the
-list of {{features}} to include in the KAR file.
-* {{uninstall(name)}} uninstalls a KAR file with the given {{name}}.
[11/19] karaf git commit: KARAF-3679 - Switch documentation to
asciidoc, close #65
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/instances.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/instances.adoc b/manual/src/main/asciidoc/users-guide/instances.adoc
deleted file mode 100644
index 636245e..0000000
--- a/manual/src/main/asciidoc/users-guide/instances.adoc
+++ /dev/null
@@ -1,379 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Instances
-
-A instance is a complete new Apache Karaf runtime, isolated from the other ones.
-
-The purpose is to easily create and manage a new Apache Karaf runtime without installing a complete distribution.
-
-A instance is a new instance that you can launch separately from the root one, and deploy applications into. It means that each instance is run on a different JVM.
-
-A instance does not contain a full copy of the Apache Karaf distribution, but only a set of the configuration files and data folder which contains all the runtime information, logs and temporary files.
-
-== Using the instance commands
-
-The *instance* commands allow you to create and manage instances.
-
-=== Creating instances
-
-You create a new runtime instance by typing [`instance:create`|/commands/instance-create] in the Karaf console.
-
-As shown in the following example, `instance:create` causes the runtime to create a new runtime installation in the active runtime's `instances/[name]} directory. The new instance is a new Karaf instance and is assigned an SSH port number based on an incremental count starting at 8101 and a RMI registry port number based on an incremental count starting at 1099.
-
-----
-karaf@root()> instance:create test
-----
-
-The new instance is fresh Apache Karaf instance. It uses default configuration files set, as you install a fresh Karaf distribution.
-
-You can enable the verbose mode for the `instance:create` command using the `-v` option:
-
-----
-karaf@root()> instance:create -v test
-Creating new instance on SSH port 8103 and registry port 1101 / RMI server port 44446 at: /opt/karaf/instances/test
-Creating dir: /opt/karaf/instances/test/bin
-Creating dir: /opt/karaf/instances/test/etc
-Creating dir: /opt/karaf/instances/test/system
-Creating dir: /opt/karaf/instances/test/deploy
-Creating dir: /opt/karaf/instances/test/data
-Creating file: /opt/karaf/instances/test/etc/config.properties
-Creating file: /opt/karaf/instances/test/etc/jre.properties
-Creating file: /opt/karaf/instances/test/etc/custom.properties
-Creating file: /opt/karaf/instances/test/etc/java.util.logging.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.felix.fileinstall-deploy.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.obr.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.repos.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.log.cfg
-Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.logging.cfg
-Creating file: /opt/karaf/instances/test/etc/org.ops4j.pax.url.mvn.cfg
-Creating file: /opt/karaf/instances/test/etc/users.properties
-Creating file: /opt/karaf/instances/test/etc/keys.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.features.cfg
-Creating file: /opt/karaf/instances/test/etc/system.properties
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.shell.cfg
-Creating file: /opt/karaf/instances/test/etc/org.apache.karaf.management.cfg
-Creating file: /opt/karaf/instances/test/bin/karaf
-Creating file: /opt/karaf/instances/test/bin/start
-Creating file: /opt/karaf/instances/test/bin/stop
-----
-
-You can manually configure the different ports, the location of the instance, the Apache Karaf features URLs using different options of the `instance:create` command.
-You can have details about these options using the `--help` option.
-
-=== Cloning an instance
-
-Instead of creating a fresh instance, you can clone an existing instance using `instance:clone`.
-
-The `instance:clone` command reuse the files from the source instance:
-
-----
-karaf@root()> instance:clone root test
-----
-
-You can have details about the cloning options using the `--help` option.
-
-=== Changing the instance location
-
-By default, the new instances storage is in the `KARAF_HOME/instance` directory.
-You find a directory with the name of the instance storing the different instance files.
-
-You can change the location of the instance using the `-l` option to the `instance:create` and `instance:clone` commands:
-
-----
-karaf@root()> instance:create -v -l /tmp/test test
-Creating new instance on SSH port 8102 and registry port 1100 / RMI server port 44445 at: /tmp/test
-Creating dir: /tmp/test/bin
-Creating dir: /tmp/test/etc
-Creating dir: /tmp/test/system
-Creating dir: /tmp/test/deploy
-Creating dir: /tmp/test/data
-Creating file: /tmp/test/etc/config.properties
-Creating file: /tmp/test/etc/jre.properties
-Creating file: /tmp/test/etc/custom.properties
-Creating file: /tmp/test/etc/java.util.logging.properties
-Creating file: /tmp/test/etc/org.apache.felix.fileinstall-deploy.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.features.obr.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.features.repos.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.log.cfg
-Creating file: /tmp/test/etc/org.ops4j.pax.logging.cfg
-Creating file: /tmp/test/etc/org.ops4j.pax.url.mvn.cfg
-Creating file: /tmp/test/etc/users.properties
-Creating file: /tmp/test/etc/keys.properties
-Creating file: /tmp/test/etc/org.apache.karaf.features.cfg
-Creating file: /tmp/test/etc/system.properties
-Creating file: /tmp/test/etc/org.apache.karaf.shell.cfg
-Creating file: /tmp/test/etc/org.apache.karaf.management.cfg
-Creating file: /tmp/test/bin/karaf
-Creating file: /tmp/test/bin/start
-Creating file: /tmp/test/bin/stop
-----
-
-Careful, it's not possible to change the location of an instance once it has been created.
-
-NB: `instance:destroy` will remove the instance location for you. You don't have to remove the instance location "by hand".
-
-=== Changing instance ports
-
-You can change the SSH port number assigned to an instance using the `instance:ssh-port-change` command:
-
-----
-karaf@root()> instance:ssh-port-change test 8104
-----
-
-where test is the instance name and 8104 is the new SSH port number to use for the test instance.
-
-You can change the RMI Registry port number (used by JMX) of an instance using the `instance:rmi-registry-port-change` command:
-
-----
-karaf@root()> instance:rmi-registry-port-change test 1102
-----
-
-where test is the instance name and 1102 is the new RMI Registry port number to use for the test instance.
-
-You can also change the RMI Server port number (used by JMX too) of an instance using the `instance:rmi-server-port-change` command:
-
-----
-karaf@root()> instance:rmi-server-port-change test 44447
-----
-
-where test is the instance name and 44447 is the new RMI Server port number to use for the test instance.
-
-NB: the instance has to be stopped to be able to change the port numbers.
-
-=== Starting instances
-
-New instances are created in a stopped state.
-
-To start an instance, you can use the `instance:start` command:
-
-----
-karaf@root()> instance:start test
-----
-
-where test is the instance name.
-
-=== Listing instances
-
-To list the instances and their current status, you can use the `instance:list` command:
-
-----
-karaf@root()> instance:list
-SSH Port | RMI Registry | RMI Server | State | PID | Name
--------------------------------------------------------------
- 8101 | 1099 | 44444 | Started | 19652 | root
- 8104 | 1101 | 44446 | Stopped | 0 | test
-----
-
-An instance can be in the following status:
-
-- Stopped: the instance is stopped.
-- Starting: the instance is starting.
-- Started: the instance is up and running. You can connect and use it.
-
-=== Status of an instance
-
-You can get directly the status of a given instance using the `instance:status` command:
-
-----
-karaf@root()> instance:status test
-Started
-----
-
-where test is the instance name.
-
-=== Connecting to an instance
-
-You can connect to a running instance directly from the root one using the `instance:connect` command:
-
-----
-karaf@root()> instance:connect test
-----
-
-where 'test' is the instance name where to connect to.
-
-By default, this command will use the same username used on the root instance, and the password will be prompted.
-
-You can use a different username using the `-u` or `--username` option. You can also provide the password using the
-`-p` or `--password` option.
-
-If you don't provide any argument, you will logon on the instance:
-
-----
-karaf@test()>
-----
-
-Note the name of instance in the shell prompt (@test).
-
-You can logoff from the instance and return back to the root instance using the `logout` command or CTRL-D key binding:
-
-----
-karaf@test()> logout
-karaf@root()>
-----
-
-The `instance:connect` command accepts shell commands as argument. It allows you to directly execute commands or scripts on the instance:
-
-----
-karaf@root()> instance:connect test feature:list
-Name | Version | Installed | Repository | Description
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-standard | 3.0.0 | x | standard-3.0.0 | Karaf standard feature
-aries-annotation | 3.0.0 | | standard-3.0.0 | Aries Annotations
-wrapper | 3.0.0 | | standard-3.0.0 | Provide OS integration
-service-wrapper | 3.0.0 | | standard-3.0.0 | Provide OS integration (alias to wrapper feature)
-obr | 3.0.0 | | standard-3.0.0 | Provide OSGi Bundle Repository (OBR) support
-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
-...
-----
-
-=== Stop an instance
-
-To stop an instance, you can connect to the instance (using `instance:connect`) and execute the `system:shutdown`
-command.
-
-You can also use the [`instance:stop`|/commands/instance-stop] command:
-
-----
-karaf@root()> instance:stop test
-----
-
-where test is the instance name.
-
-The instance will go to the "Stopped" state.
-
-=== Destroy an instance
-
-You can completely delete a stopped instance using the `instance:destroy` command:
-----
-karaf@root()> instance:destroy test
-----
-
-where test is the instance name.
-
-NB: the `instance:destroy` deletes the instance store (the location where the instance files are stored).
-
-=== Rename an instance
-
-You can change the name of a stopped instance using the `instance:rename` command:
-
-----
-karaf@root()> instance:rename test newTest
-----
-
-where test is the current instance name, and newTest the new instance name.
-
-== Instance script
-
-The `instance:*` commands require the root instance running.
-
-But, you can also administrate directly instances without the root instance, using the `bin/instance` Unix script
-(or `bin/instance.bat` script on Windows).
-
-You find the same actions that you can do with the `instance:*` commands in the `instance[.bat]` script:
-
-----
-bin/instance
-Available commands:
- clone - Clones an existing container instance.
- create - Creates a new container instance.
- destroy - Destroys an existing container instance.
- list - Lists all existing container instances.
- opts-change - Changes the Java options of an existing container instance.
- rename - Rename an existing container instance.
- rmi-registry-port-change - Changes the RMI registry port (used by management layer) of an existing container instance.
- rmi-server-port-change - Changes the RMI server port (used by management layer) of an existing instance.
- ssh-port-change - Changes the secure shell port of an existing container instance.
- start - Start an existing container instance.
- status - Check the current status of an instance.
- stop - Stop an existing container instance.
-Type 'command --help' for more help on the specified command.
-----
-
-For instance, to list all the instances, you can use the `instance` script with the `list` command:
-
-----
-bin/instance list
-SSH Port | RMI Registry | RMI Server | State | PID | Name
------------------------------------------------------------
- 8101 | 1099 | 44444 | Stopped | 0 | root
- 8102 | 1100 | 44445 | Stopped | 0 | test
-----
-
-It's exactly the same as executing `instance:list` in the root instance.
-
-You can obtain details about commands options and arguments using the `--help` option. For instance:
-
-----
-bin/instance rename --help
-DESCRIPTION
- instance:rename
-
- Rename an existing container instance.
-
-SYNTAX
- instance:rename [options] name new-name
-
-ARGUMENTS
- name
- The name of the container instance to rename
- new-name
- The new name of the container instance
-
-OPTIONS
- --help
- Display this help message
- -v, --verbose
- Display actions performed by the command (disabled by default)
-
-----
-
-== JMX InstanceMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the instances: the InstanceMBean.
-
-The ObjectName to use is `org.apache.karaf:type=instance,name=*`.
-
-=== Attributes
-
-The `Instances` attribute is a tabular data attribute providing details about the instances:
-
-* `Is Root` (boolean): if true, the instance is the root instance, false else.
-* `JavaOpts` (string): it contains the JVM arguments used by the instance.
-* `Location` (string): it's the path to the instance storage.
-* `Name` (string): it's the name of the instance.
-* `Pid` (long): it's the current system process ID (PID) of the instance process.
-* `RMI Registry Port` (int): it's the port number of the instance RMI Registry (JMX).
-* `RMI Server Port` (int): it's the port number of the instance RMI Server (JMX).
-* `SSH Port` (int): it's the port number of the instance SSH Server.
-* `State` (string): it's the current status of the instance (Stopped, Starting, Started).
-
-=== Operations
-
-The InstanceMBean provides the following operations, corresponding to the previous `instance:*` commands:
-* `createInstance(instanceName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts, features, featuresUrls)`: create a new instance.
-* `changeSshPort(instanceName, port)`: change the SSH port of an instance.
-* `changeRmiServerPort(instanceName, port)`: change the RMI server port of an instance.
-* `changeRmiRegistry(instanceName, port)`: change the RMI registry port of an instance.
-* `changeJavaOpts(instanceName, javaOpts)`: change the Java options of an instance.
-* `destroyInstance(instanceName)`: destroy an instance.
-* `startInstance(instanceName)`: start an instance.
-* `startInstance(instanceName, options)`: start an instance with the given Java options.
-* `startInstance(instanceName, options, wait, debug)`: start an instance with the given Java options.
- If wait is true, this operation is waiting for the instance is in "Started" state. If debug is true, the instance is started in debug mode.
-* `stopInstance(instanceName)`: stop an instance.
-* `renameInstance(instanceName, newInstanceName)`: rename an instance.
-* `renameInstance(instanceName, newInstanceName, verbose)`: rename an instance. If verbose is true, this operation provides details in the log.
-* `cloneInstance(instanceName, cloneName, sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts)`: clone an existing instance.
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/jdbc.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/jdbc.adoc b/manual/src/main/asciidoc/users-guide/jdbc.adoc
deleted file mode 100644
index bfac7e0..0000000
--- a/manual/src/main/asciidoc/users-guide/jdbc.adoc
+++ /dev/null
@@ -1,226 +0,0 @@
-//
-// Licensed 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.
-//
-
-= DataSources (JDBC)
-
-The Apache Karaf DataSources (JDBC) is an optional enterprise feature.
-
-You have to install the `jdbc` feature first:
-
-----
-karaf@root()> feature:install jdbc
-----
-
-This feature provides an OSGi service to create/delete JDBC datasources in the container and perform database operations (SQL queries).
-
-This JDBC OSGi service can be manipulated programmatically (see the developer guide for details), using the `jdbc:*` commands, or using the JDBC MBean.
-
-== Commands
-
-=== `jdbc:create`
-
-The `jdbc:create` command automatically creates a datasource definition file in the Apache Karaf `deploy` folder.
-
-The `jdbc:create` accepts a set of options and the name argument:
-
-----
-karaf@root()> jdbc:create --help
-DESCRIPTION
- jdbc:create
-
- Create a JDBC datasource
-
-SYNTAX
- jdbc:create [options] name
-
-ARGUMENTS
- name
- The JDBC datasource name
-
-OPTIONS
- -u, --username
- The database username
- -v, --version
- The version of the driver to use
- -t, --type
- The JDBC datasource type (generic, MySQL, Oracle, Postgres, H2, HSQL, Derby, MSSQL)
- -url
- The JDBC URL to use
- -p, --password
- The database password
- -i, --install-bundles
- Try to install the bundles providing the JDBC driver
- -d, --driver
- The classname of the JDBC driver to use. NB: this option is used only the type generic
- --help
- Display this help message
-
-----
-
-* the `name` argument is required. It's the name of the datasource. The name is used to identify the datasource, and to create the datasource definition file (`deploy/datasource-[name].xml`).
-* the `-u` option is optional. It defines the database username.
-* the `-v` option is optional. It "forces" a given JDBC driver version (only used with the `-i` option).
-* the `-t` option is required. It defines the JDBC datasource type. Accepted values are: MySQL, Oracle, Postgres, Derby, H2, HSQL, MSSQL, Generic. Generic is a generic configuration file using DBCP to create a pooled datasource. When using generic, it's up to you to install the JDBC driver and configure the `deploy/datasource-[name].xml` datasource file.
-* the `-url` option is optional. It defines the JDBC URL to access to the database.
-* the `-p` option is optional. It defines the database password.
-* the `-d` option is optional. It defines the JDBC driver classname to use (only used with the generic type).
-* the `-i` option is optional. If specified, the command will try to automatically install the OSGi bundles providing the JDBC driver (depending of the datasource type specified by the `-t` option).
-
-For instance, to create an embedded Apache Derby database in Apache Karaf, you can do:
-
-----
-karaf@root()> jdbc:create -t derby -u test -i test
-----
-
-We can note that the Derby bundle has been installed automatically, and the datasource has been created:
-
-----
-karaf@root()> la
-...
-87 | Active | 80 | 10.8.2000002.1181258 | Apache Derby 10.8
-88 | Active | 80 | 0.0.0 | datasource-test.xml
-----
-
-We can see the `deploy/datasource-test.xml` datasource file.
-
-== `jdbc:delete`
-
-The `jdbc:delete` command deletes a datasource by removing the `deploy/datasource-[name].xml` datasource file:
-
-----
-karaf@root()> jdbc:delete test
-----
-
-{warning}
-The `jdbc:delete` does not uninstall the JDBC driver bundles and does not remove the files created by the JDBC driver (or the database in case of embedded database).
-It's up to you to remove it.
-{warning}
-
-== `jdbc:datasources`
-
-The `jdbc:datasources` command lists the JDBC datasources:
-
-----
-karaf@root()> jdbc:datasources
-Name | Product | Version | URL
-------------------------------------------------------------------
-/jdbc/test | Apache Derby | 10.8.2.2 - (1181258) | jdbc:derby:test
-----
-
-== `jdbc:info`
-
-The `jdbc:info` command provides details about a JDBC datasource:
-
-----
-karaf@root()> jdbc:info /jdbc/test
-Property | Value
---------------------------------------------------
-driver.version | 10.8.2.2 - (1181258)
-username | APP
-db.version | 10.8.2.2 - (1181258)
-db.product | Apache Derby
-driver.name | Apache Derby Embedded JDBC Driver
-url | jdbc:derby:test
-----
-
-== `jdbc:execute`
-
-The `jdbc:execute` command executes a SQL query that doesn't return any result on a given JDBC datasource.
-
-Typically, you can use the `jdbc:execute` command to create tables, insert values into tables, etc.
-
-For instance, we can create a `person` table on our `test` datasource:
-
-----
-karaf@root()> jdbc:execute /jdbc/test "create table person(name varchar(100), nick varchar(100))"
-----
-
-And we can insert some records in the `person` table:
-
-----
-karaf@root()> jdbc:execute /jdbc/test "insert into person(name, nick) values('foo','bar')"
-karaf@root()> jdbc:execute /jdbc/test "insert into person(name, nick) values('test','test')"
-----
-
-== `jdbc:query`
-
-The `jdbc:query` command is similar to the `jdbc:execute` one but it displays the query result.
-
-For instance, to display the content of the `person` table, we can do:
-
-----
-karaf@root()> jdbc:query /jdbc/test "select * from person"
-NICK | NAME
---------------------------------
-bar | foo
-test | test
-----
-
-== `jdbc:tables`
-
-The `jdbc:tables` command displays all tables available on a given JDBC datasource:
-
-----
-karaf@root()> jdbc:tables /jdbc/test
-REF_GENERATION | TYPE_NAME | TABLE_NAME | TYPE_CAT | REMARKS | TYPE_SCHEM | TABLE_TYPE | TABLE_SCHEM | TABLE_CAT | SELF_REFERENCING_COL_NAME
-----------------------------------------------------------------------------------------------------------------------------------------------------
- | | SYSALIASES | | | | SYSTEM TABLE | SYS | |
- | | SYSCHECKS | | | | SYSTEM TABLE | SYS | |
- | | SYSCOLPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSCOLUMNS | | | | SYSTEM TABLE | SYS | |
- | | SYSCONGLOMERATES | | | | SYSTEM TABLE | SYS | |
- | | SYSCONSTRAINTS | | | | SYSTEM TABLE | SYS | |
- | | SYSDEPENDS | | | | SYSTEM TABLE | SYS | |
- | | SYSFILES | | | | SYSTEM TABLE | SYS | |
- | | SYSFOREIGNKEYS | | | | SYSTEM TABLE | SYS | |
- | | SYSKEYS | | | | SYSTEM TABLE | SYS | |
- | | SYSPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSROLES | | | | SYSTEM TABLE | SYS | |
- | | SYSROUTINEPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSSCHEMAS | | | | SYSTEM TABLE | SYS | |
- | | SYSSEQUENCES | | | | SYSTEM TABLE | SYS | |
- | | SYSSTATEMENTS | | | | SYSTEM TABLE | SYS | |
- | | SYSSTATISTICS | | | | SYSTEM TABLE | SYS | |
- | | SYSTABLEPERMS | | | | SYSTEM TABLE | SYS | |
- | | SYSTABLES | | | | SYSTEM TABLE | SYS | |
- | | SYSTRIGGERS | | | | SYSTEM TABLE | SYS | |
- | | SYSVIEWS | | | | SYSTEM TABLE | SYS | |
- | | SYSDUMMY1 | | | | SYSTEM TABLE | SYSIBM | |
- | | PERSON | | | | TABLE | APP | |
-----
-
-== JMX JDBC MBean
-
-The JMX JDBC MBean provides the JDBC datasources, and the operations to manipulate datasources and database.
-
-The object name to use is `org.apache.karaf:type=jdbc,name=*`.
-
-=== Attributes
-
-The `Datasources` attribute provides a tabular data of all JDBC datasource, containing:
-
-* `name` is the JDBC datasource name
-* `product` is the database product backend
-* `url` is the JDBC URL used by the datasource
-* `version` is the database version backend.
-
-=== Operations
-
-* `create(name, type, jdbcDriverClassName, version, url, user, password, installBundles)` creates a JDBC datasource (the arguments correspond to the options of the `jdbc:create` command).
-* `delete(name)` deletes a JDBC datasource.
-* `info(datasource)` returns a Map (String/String) of details about a JDBC `datasource`.
-* `tables(datasource)` returns a tabular data containing the tables available on a JDBC `datasource`.
-* `execute(datasource, command` executes a SQL command on the given JDBC `datasource`.
-* `query(datasource, query` executes a SQL query on the given JDBC `datasource` and return the execution result as tabular data.
-
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/jms.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/jms.adoc b/manual/src/main/asciidoc/users-guide/jms.adoc
deleted file mode 100644
index 276980b..0000000
--- a/manual/src/main/asciidoc/users-guide/jms.adoc
+++ /dev/null
@@ -1,304 +0,0 @@
-//
-// Licensed 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.
-//
-
-= MOM (JMS)
-
-The Apache Karaf MOM (Messaging Oriented Middleware/JMS) is an optional enterprise feature.
-
-You have to install the `jms` feature first:
-
-----
-karaf@root()> feature:install jms
-----
-
-The `jms` feature doesn't install a JMS broker: it just installs the OSGi service, commands, and MBean to interact with
-a JMS broker (not the broker itself).
-
-It means that you have to install a JMS broker itself.
-
-This JMS broker can be available:
-
-* outside of Apache Karaf, as a standalone broker. In that case, Apache Karaf JMS will remotely connect to the JMS broker.
- For instance, you can use this topology with Apache ActiveMQ or IBM WebsphereMQ.
-* embedded in Apache Karaf. With this topology, Apache Karaf itself provides a JMS broker service. Apache ActiveMQ provides
- a native support in Apache Karaf.
-
-For instance, you can install Apache ActiveMQ directly in Apache Karaf:
-
-----
-karaf@root()> feature:repo-add activemq
-Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
-karaf@root()> feature:install activemq-broker
-----
-
-The `activemq-broker` feature installs:
-
-* a Apache ActiveMQ broker directly in Apache Karaf, bind to the `61616` port number by default.
-* the Apache ActiveMQ WebConsole bound to `http://0.0.0.0:8181/activemqweb` by default.
-
-The Apache Karaf `jms` feature provides an OSGi service to create/delete JMS connection factories in the container
-and perform JMS operations (send or consume messages, get information about a JMS broker, list the destinations, ...).
-
-This JMS OSGi service can be manipulated programmatically (see the developer guide for details), using the `jms:*` commands, or using the JMS MBean.
-
-== Commands
-
-=== `jms:create`
-
-The `jms:create` command creates a JMS connection factory in the Apache Karaf container. It automatically creates a
-blueprint XML file in the `deploy` folder containing the JMS connection factory definition corresponding
-to the type that you mentioned.
-
-The `jms:create` command accepts different arguments and options:
-
-----
-karaf@root()> jms:create --help
-DESCRIPTION
- jms:create
-
- Create a JMS connection factory.
-
-SYNTAX
- jms:create [options] name
-
-ARGUMENTS
- name
- The JMS connection factory name
-
-OPTIONS
- -u, --url
- The JMS URL. NB: for WebsphereMQ type, the URL is hostname/port/queuemanager/channel
- --help
- Display this help message
- -t, --type
- The JMS connection factory type (ActiveMQ or WebsphereMQ)
-
-----
-
-* the `name` argument is required. It's the name of the JMS connection factory. The name is used to identify the connection factory, and to create the connection factory definition file (`deploy/connectionfactory-[name].xml`).
-* the `-t` (`--type`) option is required. It's the type of the JMS connection factory. Currently on `activemq` and `webspheremq` type are supported. If you want to use another type of JMS connection factory, you can create the `deploy/connectionfactory-[name].xml` file by hand (using one as template).
-* the `-u` (`--url`) option is required. It's the URL used by the JMS connection factory to connect to the broker. If the type is `activemq`, the URL looks like `tcp://localhost:61616`. If the type is `webspheremq`, the URL looks like `host/port/queuemanager/channel`.
-
-For instance, to create a JMS connection factory for a Apache ActiveMQ broker, you can do:
-
-----
-karaf@root()> jms:create -t activemq -u tcp://localhost:61616 test
-----
-
-{warning}
-The `jms:create` command doesn't install any feature or bundle providing the JMS connection factory classes (and dependencies).
-You have to install the required features (for instance `activemq-broker` feature for Apache ActiveMQ), or bundles (for IBM WebsphereMQ) providing the JMS connection factory packages and classes.
-{warning}
-
-In the previous example, we assume that you previously installed the `activemq-broker` feature.
-
-We can see the created JMS connection factory:
-
-----
-karaf@root()> la
-...
-151 | Active | 80 | 0.0.0 | connectionfactory-test.xml
-----
-
-The `connectionfactory-test.xml` file has been created in the `deploy` folder.
-
-By default, the `jms:create` command constructs a JNDI name for the connection factory: `/jms/[name]`.
-
-It means that the connection factory name to use for the other `jms:*` commands is `/jms/[name]`.
-
-=== `jms:delete`
-
-The `jms:delete` command deletes a JMS connection factory. The `name` argument is the name that you used at creation time:
-
-----
-karaf@root()> jms:delete test
-----
-
-=== `jms:connectionfactories`
-
-The `jms:connectionfactories` command lists the JMS connection factories:
-
-----
-karaf@root()> jms:connectionfactories
-JMS Connection Factory
-----------------------
-/jms/test
-----
-
-=== `jms:info`
-
-The `jms:info` command provides details about the JMS connection factory:
-
-----
-karaf@root()> jms:info /jms/test
-Property | Value
--------------------
-product | ActiveMQ
-version | 5.9.0
-----
-
-You can see the JMS broker product and version.
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-=== `jms:queues`
-
-The `jms:queues` command lists the JMS queues available on a JMS broker. For instance:
-
-----
-karaf@root()> jms:queues /jms/test
-JMS Queues
-----------
-MyQueue
-----
-
-where `/jms/test` is the name of the JMS connection factory.
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-{warning}
-Depending of the JMS connection factory type, this command may not work.
-For now, the command works only with Apache ActiveMQ.
-{warning}
-
-=== `jms:topics`
-
-The `jms:topics` command lists the JMS topics available on a JMS broker. For instance:
-
-----
-karaf@root()> jms:topics /jms/test
-JMS Topics
-----------
-MyTopic
-----
-
-where `/jms/test` is the name of the JMS connection factory.
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-{warning}
-Depending of the JMS connection factory type, this command may not work.
-For now, the command works only with Apache ActiveMQ.
-{warning}
-
-=== `jms:send`
-
-The `jms:send` command sends a message to a given JMS queue.
-
-For instance, to send a message containing `Hello World` in the `MyQueue` queue, you can do:
-
-----
-karaf@root()> jms:send /jms/test MyQueue "Hello World"
-----
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-=== `jms:consume`
-
-The `jms:consume` command consumes messages from a JMS queue.
-
-For instance, to consume all messages from `MyQueue`, you can do:
-
-----
-karaf@root()> jms:consume /jms/test MyQueue
-2 message(s) consumed
-----
-
-If you want to consume only some messages, you can define a selector using the `-s` (`--selector`) option.
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-{warning}
-The `jms:consume` command just consumes (so removes) messages from a JMS queue. It doesn't display the messages.
-If you want to see the details of messages, you can use the `jms:browse` command.
-{warning}
-
-=== `jms:count`
-
-The `jms:count` command counts the number of pending messages into a JMS queue.
-
-For instance, if you want to know the number of messages on `MyQueue`, you can do:
-
-----
-karaf@root()> jms:count /jms/test MyQueue
-Messages Count
---------------
-8
-----
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-=== `jms:browse`
-
-The `jms:browse` command browses a JMS queue and display details about messages.
-
-For instance, to browse the `MyQueue` queue:
-
-----
-karaf@root()> jms:browse /jms/test MyQueue
-Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013
-ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013
-ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013
-----
-
-By default, the messages properties are not displayed. You can use the `-v` (`--verbose`) option to display the properties:
-
-----
-karaf@root()> jms:browse -v /jms/test MyQueue
-Message ID | Content | Charset | Type | Correlation ID | Delivery Mode | Destination | Expiration | Priority | Redelivered | ReplyTo | Timestamp | Properties
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ID:vostro-59602-1387462183019-3:1:1:1:1 | Hello World | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:12 CET 2013 |
-ID:vostro-59602-1387462183019-3:2:1:1:1 | Hello ActiveMQ | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:16 CET 2013 |
-ID:vostro-59602-1387462183019-3:3:1:1:1 | Hello Karaf | UTF-8 | | | Persistent | queue://MyQueue | Never | 4 | false | | Thu Dec 19 15:10:19 CET 2013 |
-----
-
-If you want to browse only some messages, you can define a selector using the `-s` (`--selector`) option.
-
-If the JMS broker requires an authentication, you can use the `-u` (`--username`) and `-p` (`--password`) options.
-
-=== `jms:move`
-
-The `jms:move` command consumes all messages from a JMS queue and send it to another one.
-
-For instance, to move all messages from `MyQueue` queue to `AnotherQueue` queue, you can do:
-
-----
-karaf@root()> jms:move /jms/test MyQueue AnotherQueue
-3 message(s) moved
-----
-
-== JMX JMS MBean
-
-The JMX JMS MBean provides the attributes and operations to manipulate the JMS connection factories and JMS messages.
-
-The object name to use is `org.apache.karaf:type=jms,name=*`.
-
-=== Attributes
-
-The `Connectionfactories` attribute provides the list of all JMS connection factories names.
-
-=== Operations
-
-* `create(name, type, url)` creates a JMS connection factory.
-* `delete(name)` deletes a JMS connection factory.
-* `Map<String, String> info(connectionFactory, username, password)` gets details about a JMS connection factory and broker.
-* `int count(connectionFactory, queue, username, password)` counts the number of pending messages on a JMS queue.
-* `List<String> queues(connectionFactory, username, password)` lists the JMS queues available on the JMS broker.
-* `List<String> topics(connectionFactory, username, password)` lists the JMS topics available on the JMS broker.
-* `TabularData browse(connectionFactory, queue, selector, username, password)` browses a JMS queue and provides a table of JMS messages.
-* `send(connectionFactory, queue, content, replyTo, username, password)` sends a JMS message to a target queue.
-* `int consume(connectionFactory, queue, selector, username, password)` consumes JMS messages from a JMS queue.
-* `int move(connectionFactory, source, destination, selector, username, password)` moves messages from a JMS queue to another.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/jndi.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/jndi.adoc b/manual/src/main/asciidoc/users-guide/jndi.adoc
deleted file mode 100644
index 2537dd2..0000000
--- a/manual/src/main/asciidoc/users-guide/jndi.adoc
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Naming (JNDI)
-
-The Apache Karaf Naming (JNDI) is an optional enterprise feature.
-
-You have to install the `jndi` feature first:
-
-----
-karaf@root()> feature:install jndi
-----
-
-Apache Karaf provides a complete JNDI support.
-
-You have two parts in the Apache Karaf JNDI support:
-
-* a fully compliant implementation of the OSGi Alliance JNDI Service specification.
-* a more "regular" JNDI context, containing different names that you can administrate.
-
-== OSGi Services Registry and JNDI
-
-The OSGi Service Registry provides a centralized register/query capabilities for OSGi services.
-
-A common pattern outside of OSGi is to make use of JNDI API to access services from a directory system.
-The OSGi service registry can be viewed as an example of such a system.
-
-Apache Karaf supports the `osgi:service` lookup scheme as defined by the JNDI Service Specification.
-
-The schema is:
-
-----
-osgi:service/<interface>[/<filter>]
-----
-
-For instance, you can directly use JNDI to get a OSGi service:
-
-----
-Context ctx = new InitialContext();
-Runnable r = (Runnable) ctx.lookup("osgi:service/java.lang.Runnable");
-----
-
-== JNDI service
-
-Apache Karaf also supports regular JNDI, including a directoy system where you can register name bindings, sub-context, etc.
-
-It supports the standard JNDI API:
-
-----
-Context ctx = new InitialContext();
-Runnable r = (Runnable) ctx.lookup("this/is/the/name");
-----
-
-It also allows you to bind some OSGi services as "pure" JNDI name. In that case, you don't have to use the specific
-`osgi:service` scheme.
-
-== Commands
-
-Apache Karaf provides specific commands to manipulate the JNDI service.
-
-=== `jndi:names`
-
-The `jndi:names` command lists all JNDI names. It groups both the JNDI names from the `osgi:service` scheme and the
-regular JNDI names:
-
-----
-karaf@root()> jndi:names
-JNDI Name | Class Name
-------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
-----
-
-We can see here the `osgi:service/jndi` name (using the `osgi:service` scheme) and `jndi/service` name (using the
-regular JNDI service).
-
-The `jndi:names` command accepts an optional `context` argument to list names on the given context.
-
-For instance, you can list only names in the `jndi` sub-context:
-
-----
-karaf@root()> jndi:names jndi
-JNDI Name | Class Name
-----------------------------------------------------------
-service | org.apache.karaf.jndi.internal.JndiServiceImpl
-----
-
-{warning}
-The `jndi:names` lists only names (the full qualified name). It means that the empty JNDI sub-contexts are not displayed.
-To display all JNDI sub-contexts (empty or not), you can use the `jndi:contexts` command.
-{warning}
-
-=== `jndi:contexts`
-
-The `jndi:contexts` command lists all JNDI sub-contexts:
-
-----
-karaf@root()> jndi:contexts
-JNDI Sub-Context
-----------------
-other/context
-foo/bar
-----
-
-=== `jndi:create`
-
-The `jndi:create` command creates a new JNDI sub-context:
-
-----
-karaf@root()> jndi:create my/company
-----
-
-=== `jndi:delete`
-
-The `jndi:delete` command deletes a JNDI sub-context:
-
-----
-karaf@root()> jndi:delete my/company
-----
-
-=== `jndi:alias`
-
-The `jndi:alias` command creates a new JNDI name (alias) with an existing one.
-
-The existing JNDI name can be a regular one:
-
-----
-karaf@root()> jndi:alias bean/services/jndi aliases/services/jndi
-karaf@root()> jndi:names
-JNDI Name | Class Name
-----------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-bean/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-aliases/services/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-----
-
-or a name from the `osgi:service` schema:
-
-----
-karaf@root()> jndi:alias osgi:service/jndi alias/jndi/service
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-alias/jndi/service | org.apache.karaf.jndi.internal.JndiServiceImpl
-----
-
-NB: the `jndi:alias` automatically creates all required JNDI sub-contexts.
-
-=== `jndi:bind`
-
-The `jndi:bind` command binds an OSGi service with a JNDI name.
-
-The `jndi:bind` command requires an OSGi service ID and a JNDI name. The OSGi service ID can be found using the `service:list` command.
-
-For instance, we can bind the OSGi service with ID 344 with the JNDI name `services/kar`:
-
-----
-karaf@root()> jndi:bind 344 services/kar
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-services/kar | org.apache.karaf.kar.internal.KarServiceImpl
-----
-
-=== `jndi:unbind`
-
-The `jndi:unbind` command unbind a given JNDI name:
-
-----
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-services/kar | org.apache.karaf.kar.internal.KarServiceImpl
-karaf@root()> jndi:unbind services/kar
-karaf@root()> jndi:names
-JNDI Name | Class Name
--------------------------------------------------------------------------------
-osgi:service/jndi | org.apache.karaf.jndi.internal.JndiServiceImpl
-----
-
-{warning}
-It's not possible to unbind a name from the `osgi:service` schema, as it's linked to a OSGi service.
-{warning}
-
-== JMX JndiMBean
-
-The JMX JndiMBean provides the JNDI names, and the operations to manipulate the JNDI service.
-
-The object name to use is `org.apache.karaf:type=jndi,name=*`.
-
-=== Attributes
-
-The `Names` attribute provides a map containing all JNDI names and class names from both `osgi:service` scheme
-and the regular JNDI service.
-
-The `Contexts` attribute provides a list containing all JNDI sub-contexts.
-
-=== Operations
-
-* `getNames(context)` provides a map containing JNDI names and class names in a given JNDI sub-context.
-* `create(context)` creates a new JNDI sub-context.
-* `delete(context)` deletes a JNDI sub-context.
-* `alias(name, alias` creates a JNDI name (alias) for a given one.
-* `bind(serviceId, name` binds a JNDI name using an OSGi service (identified by its ID).
-* `unbind(name)` unbinds a JNDI name.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/jpa.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/jpa.adoc b/manual/src/main/asciidoc/users-guide/jpa.adoc
deleted file mode 100644
index 7edfa1d..0000000
--- a/manual/src/main/asciidoc/users-guide/jpa.adoc
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Persistence (JPA)
-
-Apache Karaf provides JPA persistence providers (such as Apache OpenJPA) to be easy to use (in a OSGi way) and provide
-container managed persistence for applications (using Blueprint).
-
-Apache Karaf embeds Aries JPA, providing a very easy way to develop applications that use JPA persistence.
-
-See the developer guide for details about developing applications that use JPA.
-
-== Persistence engine features
-
-Apache Karaf provides a set of ready to use persistence engine features:
-
-* Apache OpenJPA. The `openjpa` feature installs the `jpa` feature with the Apache OpenJPA as persistence engine:
-
-----
-karaf@root()> feature:install openjpa
-----
-
-* Hibernate. The `hibernate` feature installs the `jpa` feature with the Hibernate persistence engine:
-
-----
-karaf@root()> feature:install hibernate
-----
-
-* EclipseLink. The `eclipselink` feature will be available in the next Apache Karaf release.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/jta.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/jta.adoc b/manual/src/main/asciidoc/users-guide/jta.adoc
deleted file mode 100644
index 137b809..0000000
--- a/manual/src/main/asciidoc/users-guide/jta.adoc
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// Licensed 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.
-//
-
-= Transaction (JTA)
-
-Apache Karaf provides container managed transactions, available as OSGi services.
-
-As most of the enterprise features, it's an optional feature that you can install with:
-
-----
-karaf@root()> feature:install transaction
-----
-
-However, the `transaction` feature is installed (as a transitive dependency) when installing enterprise features
-(like `jdbc` or `jms` features for instance).
-
-== Apache Aries Transaction and ObjectWeb HOWL
-
-The `transaction` feature uses Apache Aries and ObjectWeb HOWL. Aapache Aries Transaction "exposes" the transaction
-manager as OSGi service. The actual implementation of the transaction manager is ObjectWeb HOWL.
-
-ObjectWeb HOWL is a logger implementation providing features required by the ObjectWeb JOTM project, with a public API
-that is generally usable by any Transaction Manager.
-ObjectWeb HOWL uses unformatted binary logs to maximize performance and specifies a journalization API with methods
-necessary to support JOTM recovery operations.
-
-ObjectWeb HOWL is intended to be used for logging of temporary data such as XA transaction events.
-It is not a replacement for traditional log kits such as LOG4J and Java SE Logging.
-
-In Apache Karaf, ObjectWeb HOWL (High-speed ObjectWeb Logger) is used to implement TransactionLog (in Aries Transaction),
-providing a very performant transaction manager in an OSGi way.
-
-== Configuration
-
-The installation of the `transaction` feature installs a new configuration: `org.apache.aries.transaction`.
-
-You can see the configuration properties using:
-
-----
-karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
-----------------------------------------------------------------
-Pid: org.apache.aries.transaction
-BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
-Properties:
- aries.transaction.recoverable = true
- aries.transaction.timeout = 600
- service.pid = org.apache.aries.transaction
- org.apache.karaf.features.configKey = org.apache.aries.transaction
- aries.transaction.howl.maxBlocksPerFile = 512
- aries.transaction.howl.maxLogFiles = 2
- aries.transaction.howl.logFileDir = /opt/apache-karaf-3.0.0/data/txlog
- aries.transaction.howl.bufferSizeKBytes = 4
-----
-
-* `aries.transaction.recoverable` property is a flag to enable support of recoverable resource or not. A recoverable
- resource is a transactional object whose state is saved to stable storage if the transaction is committed, and whose
- state can be reset to what it was at the beginning of the transaction if the transaction is rolled back.
- At commit time, the transaction manager uses the two-phase XA protocol when communicating with the recoverable resource
- to ensure transactional integrity when more than one recoverable resource is involved in the transaction being committed.
- Transactional databases and message brokers like Apache ActiveMQ are examples of recoverable resources.
- A recoverable resource is represented using the javax.transaction.xa.XAResource interface in JTA.
- Default is `true`.
-* `aries.transaction.timeout` property is the transaction timeout. If a transaction has a lifetime longer than this timeout
- a transaction exception is raised and the transaction is rollbacked. Default is `600` (10 minutes).
-* `aries.transaction.howl.logFileDir` property is the directory where the transaction logs (journal) are stored.
- Default is `KARAF_DATA/txlog`.
-* `aries.transaction.howl.maxLogFiles` property is the maximum number of transaction log files to retain. Combined with the
- `aries.transaction.howl.maxBlocksPerFile`, it defines the transaction retention.
-
-You can change the configuration directly using the `config:*` commands, or the Config MBean.
-
-For instance, to increase the transaction timeout, you can do:
-
-----
-karaf@root()> config:edit org.apache.aries.transaction
-karaf@root()> config:property-set aries.transaction.timeout 1200
-karaf@root()> config:update
-karaf@root()> config:list "(service.pid=org.apache.aries.transaction)"
-----------------------------------------------------------------
-Pid: org.apache.aries.transaction
-BundleLocation: mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/1.1.0
-Properties:
- aries.transaction.recoverable = true
- aries.transaction.timeout = 1200
- service.pid = org.apache.aries.transaction
- org.apache.karaf.features.configKey = org.apache.aries.transaction
- aries.transaction.howl.maxBlocksPerFile = 512
- aries.transaction.howl.maxLogFiles = 2
- aries.transaction.howl.logFileDir = /opt/apache-karaf-3.0.0/data/txlog
- aries.transaction.howl.bufferSizeKBytes = 4
-----
-
-{warning}
-The `transaction` feature defines the configuration in memory by default. It means that changes that you can do will
-be lost in case of Apache Karaf restart.
-If you want to define your own transaction configuration at startup, you have to create a `etc/org.apache.aries.transaction.cfg`
-configuration file and set the properties and values in the file. For instance:
-
-----
-# etc/org.apache.aries.transaction.cfg
-aries.transaction.recoverable = true
-aries.transaction.timeout = 1200
-aries.transaction.howl.maxBlocksPerFile = 512
-aries.transaction.howl.maxLogFiles = 2
-aries.transaction.howl.logFileDir = /opt/apache-karaf-3.0.0/data/txlog
-aries.transaction.howl.bufferSizeKBytes = 4
-----
-{warning}
http://git-wip-us.apache.org/repos/asf/karaf/blob/3de05ae9/manual/src/main/asciidoc/users-guide/kar.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/kar.adoc b/manual/src/main/asciidoc/users-guide/kar.adoc
deleted file mode 100644
index a56cfe0..0000000
--- a/manual/src/main/asciidoc/users-guide/kar.adoc
+++ /dev/null
@@ -1,304 +0,0 @@
-//
-// Licensed 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.
-//
-
-= KAR
-
-As described in the [Provisioning section|provisioning], Apache Karaf features describe applications.
-
-A feature defines different resources to resolve using URL (for instance, bundles URLs, or configuration files URLs).
-As described in the [Artifacts repositories and URLs section|urls], Apache Karaf looks for artifacts (bundles,
-configuration files, ...) in the artifact repositories.
-Apache Karaf may require to download artifacts from remote repositories.
-
-Apache Karaf provides a special type of artifact that package a features XML and all resources described in the features
-of this XML. This artifact is named a KAR (KAraf aRchive).
-
-A KAR file is a zip archive containing the
-
-Basically, the kar format is a jar (so a zip file) which contains a set of feature descriptor and bundle jar files.
-
-A KAR file contains a `repository` folder containing:
-
-* a set of features XML files
-* the artifacts following the Maven directory structure (`groupId/artifactId/version/artifactId-version.type`).
-
-For instance, the `spring-3.0.0.kar` contains:
-
-----
-~$ unzip -l spring-3.0.0.kar
-Archive: spring-3.0.0.kar
- Length Date Time Name
---------- ---------- ----- ----
- 143 2013-12-06 10:52 META-INF/MANIFEST.MF
- 12186 2013-12-06 10:52 repository/org/apache/karaf/features/spring/3.0.0/spring-3.0.0-features.xml
- 575389 2013-12-06 10:52 repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
- 232019 2013-12-06 10:52 repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar
- 673109 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.struts/1.3.10_1/org.apache.servicemix.bundles.struts-1.3.10_1.jar
- 37084 2013-12-06 10:52 repository/org/springframework/org.springframework.web.struts/3.2.4.RELEASE/org.springframework.web.struts-3.2.4.RELEASE.jar
- 7411 2013-12-06 10:52 repository/org/springframework/org.springframework.instrument/3.2.4.RELEASE/org.springframework.instrument-3.2.4.RELEASE.jar
- 246881 2013-12-06 10:52 repository/org/springframework/org.springframework.transaction/3.2.4.RELEASE/org.springframework.transaction-3.2.4.RELEASE.jar
- 16513 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.aopalliance/1.0_6/org.apache.servicemix.bundles.aopalliance-1.0_6.jar
- 881124 2013-12-06 10:52 repository/org/springframework/org.springframework.core/3.2.4.RELEASE/org.springframework.core-3.2.4.RELEASE.jar
- 199240 2013-12-06 10:52 repository/org/springframework/org.springframework.expression/3.2.4.RELEASE/org.springframework.expression-3.2.4.RELEASE.jar
- 614646 2013-12-06 10:52 repository/org/springframework/org.springframework.beans/3.2.4.RELEASE/org.springframework.beans-3.2.4.RELEASE.jar
- 340841 2013-12-06 10:52 repository/org/springframework/org.springframework.aop/3.2.4.RELEASE/org.springframework.aop-3.2.4.RELEASE.jar
- 877369 2013-12-06 10:52 repository/org/springframework/org.springframework.context/3.2.4.RELEASE/org.springframework.context-3.2.4.RELEASE.jar
- 130224 2013-12-06 10:52 repository/org/springframework/org.springframework.context.support/3.2.4.RELEASE/org.springframework.context.support-3.2.4.RELEASE.jar
- 30640 2013-12-06 10:52 repository/org/apache/karaf/deployer/org.apache.karaf.deployer.spring/3.0.0/org.apache.karaf.deployer.spring-3.0.0.jar
- 51951 2013-12-06 10:52 repository/org/springframework/org.springframework.aspects/3.2.4.RELEASE/org.springframework.aspects-3.2.4.RELEASE.jar
- 411175 2013-12-06 10:52 repository/org/springframework/org.springframework.jdbc/3.2.4.RELEASE/org.springframework.jdbc-3.2.4.RELEASE.jar
- 48049 2013-12-06 10:52 repository/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
- 190883 2013-12-06 10:52 repository/org/springframework/org.springframework.web.portlet/3.2.4.RELEASE/org.springframework.web.portlet-3.2.4.RELEASE.jar
- 635680 2013-12-06 10:52 repository/org/springframework/org.springframework.web/3.2.4.RELEASE/org.springframework.web-3.2.4.RELEASE.jar
- 645946 2013-12-06 10:52 repository/org/springframework/org.springframework.web.servlet/3.2.4.RELEASE/org.springframework.web.servlet-3.2.4.RELEASE.jar
- 464911 2013-12-06 10:52 repository/org/springframework/org.springframework.test/3.2.4.RELEASE/org.springframework.test-3.2.4.RELEASE.jar
- 69784 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-web/1.2.1/spring-osgi-web-1.2.1.jar
- 16030 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
- 32359 2013-12-06 10:52 repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar
- 208684 2013-12-06 10:52 repository/org/springframework/org.springframework.jms/3.2.4.RELEASE/org.springframework.jms-3.2.4.RELEASE.jar
- 75672 2013-12-06 10:52 repository/org/springframework/org.springframework.oxm/3.2.4.RELEASE/org.springframework.oxm-3.2.4.RELEASE.jar
- 393607 2013-12-06 10:52 repository/org/springframework/org.springframework.orm/3.2.4.RELEASE/org.springframework.orm-3.2.4.RELEASE.jar
- 338559 2013-12-06 10:52 repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/3.0_1/org.apache.servicemix.bundles.cglib-3.0_1.jar
- 35859 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-io/1.2.1/spring-osgi-io-1.2.1.jar
- 362889 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-core/1.2.1/spring-osgi-core-1.2.1.jar
- 120822 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-extender/1.2.1/spring-osgi-extender-1.2.1.jar
- 24231 2013-12-06 10:52 repository/org/springframework/osgi/spring-osgi-annotation/1.2.1/spring-osgi-annotation-1.2.1.jar
- 12597 2013-12-06 10:52 repository/org/apache/karaf/bundle/org.apache.karaf.bundle.springstate/3.0.0/org.apache.karaf.bundle.springstate-3.0.0.jar
- 31903 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-io/1.0.0.RELEASE/gemini-blueprint-io-1.0.0.RELEASE.jar
- 578205 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-core/1.0.0.RELEASE/gemini-blueprint-core-1.0.0.RELEASE.jar
- 178525 2013-12-06 10:52 repository/org/eclipse/gemini/blueprint/gemini-blueprint-extender/1.0.0.RELEASE/gemini-blueprint-extender-1.0.0.RELEASE.jar
---------- -------
- 9803140 38 files
-----
-
-As a KAR file is a simple zip file, you can create the KAR file by hand.
-
-For instance, the following Unix commands create a very simple KAR file:
-
-----
-~$ mkdir repository
-~$ cp /path/to/features.xml repository/features.xml
-~$ cp /path/to/my.jar repository/my/project/my/1.0.0/my-1.0.0.jar
-~$ zip -r my.kar repository
-updating: repository/ (stored 0%)
- adding: repository/my/project/my/1.0.0/my-1.0.0.jar (deflated 0%)
-----
-
-You can create KAR files using Apache Maven, or directly in the Apache Karaf console.
-
-== Maven
-
-Apache Karaf provides a Maven plugin: `karaf-maven-plugin`.
-
-The Apache Karaf Maven plugin provides the `kar` goal.
-
-The `kar` goal does:
-1. Reads all features specified in the features XML.
-2. For each feature described in the features XML, the goal resolves the bundles described in the feature.
-3. The goal finally packages the features XML, and the resolved bundles in a zip file.
-
-For instance, the following Maven POM create `my-kar.kar`
-
-For instance, you can use the following POM to create a kar:
-
-{code:lang=xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>my.groupId</groupId>
- <artifactId>my-kar</artifactId>
- <version>1.0</version>
- <packaging>pom</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>kar</id>
- <goals>
- <goal>kar</goal>
- </goals>
- <configuration>
- <featuresFile>src/main/resources/features.xml</featuresFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
-----
-
-To create the KAR file, simply type:
-
-----
-~$ mvn install
-----
-
-Uou will have your kar in the `target` directory.
-
-== Commands
-
-Apache Karaf provides `kar:*` commands to manage KAR archives.
-
-=== `kar:list`
-
-The `kar:list` command lists the installed KAR archives.
-
-----
-karaf@root()> kar:list
-KAR Name
--------------------
-my-kar-1.0-SNAPSHOT
-----
-
-A KAR is identified by its name.
-
-=== `kar:create`
-
-Instead of using the `karaf-maven-plugin` or create the KAR archive by hand, you can use the `kar:create` command.
-
-The `kar:create` command creates a KAR file using a registered features repository.
-
-For instance, you want to create a KAR file for the Pax Web repository.
-
-The `feature:repo-list` command gives you the list of registered features repositories:
-
-----
-karaf@root()> feature:repo-list
-Repository | URL
--------------------------------------------------------------------------------------------------------
-standard-3.0.0 | mvn:org.apache.karaf.features/standard/3.0.0/xml/features
-enterprise-3.0.0 | mvn:org.apache.karaf.features/enterprise/3.0.0/xml/features
-spring-3.0.0 | mvn:org.apache.karaf.features/spring/3.0.0/xml/features
-org.ops4j.pax.web-3.0.5 | mvn:org.ops4j.pax.web/pax-web-features/3.0.5/xml/features
-----
-
-You can use one of these features repositories to create the kar file:
-
-----
-karaf@root()> kar:create org.ops4j.pax.web-3.0.5
-Adding feature pax-war
-Adding feature pax-http-whiteboard
-Adding feature pax-jetty
-Adding feature pax-tomcat
-Adding feature pax-http
-Kar file created : /opt/apache-karaf-3.0.0/data/kar/org.ops4j.pax.web-3.0.5.kar
-----
-
-You can see that the KAR file has been created in the `KARAF_DATA/kar` folder.
-
-By default, the `kar:create` command creates a KAR file, packaging all features in the features descriptor.
-
-You can provide the list of features that you want to package into the KAR file:
-
-----
-karaf@root()> kar:create org.ops4j.pax.web-3.0.5 pax-jetty pax-tomcat
-Adding feature pax-jetty
-Adding feature pax-tomcat
-Kar file created : /opt/apache-karaf-3.0.0/data/kar/org.ops4j.pax.web-3.0.5.kar
-----
-
-=== `kar:install`
-
-You can deploy a KAR file using `kar:install` command.
-
-The `kar:install` command expects the KAR URL. Any URL described in the [Artifacts repositories and URLs section|urls]
-is supported by the `kar:install` command:
-
-----
-karaf@root()> kar:install file:/tmp/my-kar-1.0-SNAPSHOT.kar
-----
-
-The KAR file is uncompressed and populated the `KARAF_BASE/system` folder.
-
-The Apache Karaf KAR service is looking for features XML files in the KAR file, registers the features XML and automatically
-installs all features described in the features repositories present in the KAR file.
-
-=== `kar:uninstall`
-
-The `kar:uninstall` command uninstall a KAR file (identified by a name).
-
-By uninstall, it means that:
-
-* the features previously installed by the KAR file are uninstalled
-* delete (from the `KARAF_DATA/system` repository) all files previously "populated" by the KAR file
-
-For instance, to uninstall the previously installed `my-kar-1.0-SNAPSHOT.kar` KAR file:
-
-----
-karaf@root()> kar:uninstall my-kar-1.0-SNAPSHOT
-----
-
-== Deployer
-
-Apache Karaf also provides a KAR deployer. It means that you can drop a KAR file directly in the `deploy` folder.
-
-Apache Karaf will automatically install KAR files from the `deploy` folder.
-
-You can change the behaviours of the KAR deployer in the `etc/org.apache.karaf.kar.cfg`:
-
-----
-################################################################################
-#
-# 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.
-#
-################################################################################
-
-#
-# Enable or disable the refresh of the bundles when installing
-# the features contained in a KAR file
-#
-noAutoRefreshBundles=false
-----
-
-By default, when the KAR deployer install features, by default, it refresh the bundles already installed.
-You can disable the automatic bundles refresh by setting the `noAutoRefreshBundles` property to `false`.
-
-== JMX KarMBean
-
-On the JMX layer, you have a MBean dedicated to the management of the KAR files.
-
-The ObjectName to use is `org.apache.karaf:type=kar,name=*`.
-
-=== Attributes
-
-The `Kars` attributes provides the list of KAR files (name) installed.
-
-=== Operations
-
-* `install(url)` installs the KAR file at the given `url`.
-* `create(repository, features)` creates a KAR file using the given features `repository` name, and optionally the
-list of `features` to include in the KAR file.
-* `uninstall(name)` uninstalls a KAR file with the given `name`.
\ No newline at end of file