title: How to manually create a Karaf kar file from features.xml and jars
body: <p>I wish to manually create a Karaf kar file.</p>
  
  <p>Since I have a feature.xml file which works and jar files referenced by the feature.xml file I thought if I create a jar of this, rename it to filename.kar then it should work.</p>
  
  <p>However Karaf says:</p>
  
  <pre><code>2017-02-09 14:21:50,171 | INFO  | raf-4.0.8/deploy | KarArtifactInstaller             | 27 - org.apache.karaf.deployer.kar - 4.0.8 | Found a .kar file to deploy.
  2017-02-09 14:21:50,172 | INFO  | raf-4.0.8/deploy | KarArtifactInstaller             | 27 - org.apache.karaf.deployer.kar - 4.0.8 | Installing KAR file C:\home\software\apache-karaf-4.0.8\apache-karaf-4.0.8\deploy\JMScalaJS.kar
  </code></pre>
  
  <p>But - it does not do anything else, the feature does not become available when I do feature:list.</p>
  
  <p>My JMScalaJS.kar file contains:</p>
  
  <pre><code>feature.xml
  jmscalajs_2.11-0.1-SNAPSHOT.jar
  neo4j-java-driver-1.0.5.jar
  neo4j-ogm-osgi_2.11.jar
  scaldi_2.11-0.5.8.jar
  </code></pre>
  
  <p>Then my feature.xml contains</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;features name="JMScalaJS" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"&gt;
      &lt;repository&gt;mvn:org.apache.camel.karaf/apache-camel/2.18.2/xml/features&lt;/repository&gt;
      &lt;feature description="JMScalaJS" version="0.1.0" name="JMScalaJS"&gt;
          &lt;feature prerequisite="true" dependency="false"&gt;wrap&lt;/feature&gt;
          &lt;feature&gt;camel-scala&lt;/feature&gt;
          &lt;feature&gt;camel-core&lt;/feature&gt;
          &lt;feature&gt;camel-ftp&lt;/feature&gt;
          &lt;feature&gt;camel-exec&lt;/feature&gt;
          &lt;feature&gt;camel-stream&lt;/feature&gt;
          &lt;feature&gt;camel&lt;/feature&gt;
          &lt;bundle&gt;wrap:mvn:com.jcraft/jzlib/1.1.3&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.github.kxbmap/configs_2.11/0.4.4&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.chuusai/shapeless_2.11/2.3.2&lt;/bundle&gt;
          &lt;bundle&gt;mvn:commons-lang/commons-lang/2.6&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.apache.commons/commons-exec/1.3&lt;/bundle&gt;
          &lt;bundle&gt;mvn:commons-net/commons-net/3.3&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.jcraft/jsch/0.1.54&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe/config/1.3.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.scala-logging/scala-logging_2.11/3.5.0&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.apache.commons/commons-collections4/4.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:commons-codec/commons-codec/1.10&lt;/bundle&gt;
          &lt;bundle&gt;mvn:ch.qos.logback/logback-classic/1.1.7&lt;/bundle&gt;
          &lt;bundle&gt;mvn:ch.qos.logback/logback-core/1.1.7&lt;/bundle&gt;
          &lt;bundle&gt;mvn:commons-logging/commons-logging/1.2&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:commons-httpclient/commons-httpclient/3.1&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.apache.lucene/lucene-sandbox/6.2.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.apache.lucene/lucene-queries/6.2.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.apache.lucene/lucene-core/6.2.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.typesafe.akka/akka-http_2.11/10.0.3&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.typesafe.akka/akka-http-core_2.11/10.0.3&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.akka/akka-stream_2.11/2.4.16&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe/ssl-config-core_2.11/0.2.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.reactivestreams/reactive-streams/1.0.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.typesafe.akka/akka-parsing_2.11/10.0.3&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.akka/akka-osgi_2.11/2.4.16&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.akka/akka-camel_2.11/2.4.16&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.akka/akka-slf4j_2.11/2.4.16&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.typesafe.akka/akka-actor_2.11/2.4.16&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.scala-lang.modules/scala-java8-compat_2.11/0.7.0&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.apache.commons/commons-lang3/3.4&lt;/bundle&gt;
          &lt;bundle&gt;mvn:commons-io/commons-io/2.4&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:io.monix/monix-cats_2.11/2.2.1&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.typelevel/cats-core_2.11/0.9.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.typelevel/cats-kernel_2.11/0.9.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.typelevel/cats-macros_2.11/0.9.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.typelevel/machinist_2.11/0.6.1&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.github.mpilquist/simulacrum_2.11/0.10.0&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:io.monix/monix-types_2.11/2.2.1&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.typelevel/macro-compat_2.11/1.1.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.apache.camel/camel-core-osgi/2.18.2&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.sun.xml.bind/jaxb-impl/2.2.11&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.sun.xml.bind/jaxb-core/2.2.11&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.fasterxml.jackson.core/jackson-databind/2.8.3&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.fasterxml.jackson.core/jackson-core/2.8.3&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.fasterxml.jackson.core/jackson-annotations/2.8.0&lt;/bundle&gt;
          &lt;bundle&gt;mvn:com.github.domino-osgi/domino_2.11/1.1.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.apache.felix/org.apache.felix.scr/2.0.6&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:org.codehaus.mojo/animal-sniffer-annotations/1.9&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.osgi/osgi.core/6.0.0&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.slf4j/log4j-over-slf4j/1.7.22&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.slf4j/jcl-over-slf4j/1.7.22&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.slf4j/slf4j-simple/1.7.22&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.slf4j/slf4j-api/1.7.22&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.lihaoyi/scalatags_2.11/0.6.1&lt;/bundle&gt;
          &lt;bundle&gt;wrap:mvn:com.lihaoyi/sourcecode_2.11/0.1.1&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.scala-lang/scala-compiler/2.11.8&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.scala-lang.modules/scala-parser-combinators_2.11/1.0.4&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.scala-lang.modules/scala-xml_2.11/1.0.4&lt;/bundle&gt;
          &lt;bundle&gt;mvn:org.scala-lang/scala-reflect/2.11.8&lt;/bundle&gt;
          &lt;bundle&gt;file:scaldi_2.11-0.5.8.jar&lt;/bundle&gt;
          &lt;bundle&gt;file:neo4j-ogm-osgi_2.11.jar&lt;/bundle&gt;
          &lt;bundle&gt;file:neo4j-java-driver-1.0.5.jar&lt;/bundle&gt;
          &lt;bundle&gt;file:jmscalajs_2.11-0.1-SNAPSHOT.jar&lt;/bundle&gt;
      &lt;/feature&gt;
  &lt;/features&gt;
  </code></pre>
  
  <p>If you can tell me the minimum set of changes I need to make to make this work then that would satisfy this question as it would explain how to manually create a Karaf file from a features file and jars.</p>