Author: jbonofre Date: Thu Dec 5 14:23:33 2013 New Revision: 1548151 URL: http://svn.apache.org/r1548151 Log: [KARAF-2511] Add urls and OBR pages in the user guide
Added: karaf/trunk/manual/src/main/webapp/users-guide/urls.conf Modified: karaf/trunk/manual/src/main/webapp/_navigation.conf karaf/trunk/manual/src/main/webapp/manual.conf karaf/trunk/manual/src/main/webapp/users-guide/index.conf Modified: karaf/trunk/manual/src/main/webapp/_navigation.conf URL: http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/_navigation.conf?rev=1548151&r1=1548150&r2=1548151&view=diff ============================================================================== --- karaf/trunk/manual/src/main/webapp/_navigation.conf (original) +++ karaf/trunk/manual/src/main/webapp/_navigation.conf Thu Dec 5 14:23:33 2013 @@ -13,11 +13,13 @@ h3. [Users Guide|/users-guide/index] - [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] - [KAR|/users-guide/kar] - [Deployers|/users-guide/deployers] - [Instances|/users-guide/instances] - [Security|/users-guide/security] +- OBR - Enterprise -- [WebContainer (JSP/Servlet)|/users-guide/webcontainer] -- Naming (JNDI) Modified: karaf/trunk/manual/src/main/webapp/manual.conf URL: http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/manual.conf?rev=1548151&r1=1548150&r2=1548151&view=diff ============================================================================== --- karaf/trunk/manual/src/main/webapp/manual.conf (original) +++ karaf/trunk/manual/src/main/webapp/manual.conf Thu Dec 5 14:23:33 2013 @@ -42,6 +42,7 @@ h1. Users Guide {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/kar} {include:users-guide/deployers} Modified: karaf/trunk/manual/src/main/webapp/users-guide/index.conf URL: http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/users-guide/index.conf?rev=1548151&r1=1548150&r2=1548151&view=diff ============================================================================== --- karaf/trunk/manual/src/main/webapp/users-guide/index.conf (original) +++ karaf/trunk/manual/src/main/webapp/users-guide/index.conf Thu Dec 5 14:23:33 2013 @@ -8,11 +8,13 @@ h1. Users Guide * [Remote|remote] * [Log|log] * [Configuration|configuration] +* [Artifacts repositories and URLs|urls] * [Provisioning and features|provisioning] * [KAR|kar] * [Deployers|deployers] * [Instances|instances] * [Security|security] +* OBR * [Enterprise|enterprise] ** [WebContainer (JSP/Servlet)|webcontainer] ** Naming (JNDI) Added: karaf/trunk/manual/src/main/webapp/users-guide/urls.conf URL: http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/users-guide/urls.conf?rev=1548151&view=auto ============================================================================== --- karaf/trunk/manual/src/main/webapp/users-guide/urls.conf (added) +++ karaf/trunk/manual/src/main/webapp/users-guide/urls.conf Thu Dec 5 14:23:33 2013 @@ -0,0 +1,44 @@ +h1. 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> +{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