title: Build OSGi bundle include dependencies with maven-assembly-plugin
body: <p>I need to create an OSGi bundle include dependencies ,I'm using maven-assembly-plugin ,and this is my pom.xml</p>
  
  <pre><code>&lt;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"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;artifactId&gt;logstat&lt;/artifactId&gt;
      &lt;packaging&gt;bundle&lt;/packaging&gt;
      &lt;name&gt;Log Stat Demo&lt;/name&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;groupId&gt;org.test&lt;/groupId&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jruby&lt;/groupId&gt;
              &lt;artifactId&gt;yecht&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy-json&lt;/artifactId&gt;
              &lt;version&gt;2.2.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4.0&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;configuration&gt;
                      &lt;instructions&gt;
                          &lt;Export-Package&gt;activator.*,service.*,impl.*&lt;/Export-Package&gt;
                          &lt;Bundle-Activator&gt;activator.Activator&lt;/Bundle-Activator&gt;
                      &lt;/instructions&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;mainClass&gt;activator.Activator&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-my-jar-with-dependencies&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When i run maven build ,it created 2 jars file ,one with dependencies and one without</p>
  
  <p>But in the one with dependencies ,the MANIFEST.MF not include OSGi configuration like :</p>
  
  <pre><code>Manifest-Version: 1.0
  Bnd-LastModified: 1392281245886
  Build-Jdk: 1.6.0_45
  Built-By: myname
  Bundle-Activator: activator.Activator
  Bundle-ManifestVersion: 2
  Bundle-Name: test
  Bundle-SymbolicName: org.wiperdog.logstat
  Bundle-Version: 1.0.0
  Created-By: Apache Maven Bundle Plugin
  Export-Package: activator;uses:="org.osgi.framework";version="1.0.0",ser
   vice;version="1.0.0",impl;uses:="org.osgi.framework,service";version="1
   .0.0"
  Import-Package: org.jruby.embed;version="[1.7,2)",org.jruby.embed.osgi;v
   ersion="[1.7,2)",org.osgi.framework;version="[1.6,2)"
  Tool: Bnd-2.1.0.20130426-122213
  </code></pre>
  
  <p>it's just have some basic jar configuration ,not OSGi bundle:</p>
  
  <pre><code>Manifest-Version: 1.0
  Archiver-Version: Plexus Archiver
  Created-By: Apache Maven
  Build-Jdk: 1.6.0_45
  Main-Class: activator.Activator
  </code></pre>
  
  <p>So ,how do I have to configuration ?</p>