title: how to bundle com.sun.tools.jar?
body: <p>I am developing an eclipse plugin, Where i need to use the tools.jar as an dependency.As we know eclipse does not take normal jar as dependencies. so i tried to change the jar as osgi bundle. But the generated osgi bundle does not contain the com.sun packages inside. </p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;com.sun&lt;/groupId&gt;
          &lt;artifactId&gt;tools&lt;/artifactId&gt;
          &lt;version&gt;1.7.0&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${env.JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
  &lt;/dependency&gt; 
  </code></pre>
  
  <p>I tried to bundle all the dependencies given in the pom.</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;groupId&gt;com.nuwaza.aqua&lt;/groupId&gt;
  &lt;artifactId&gt;osgi-tool-bundle&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;bundle&lt;/packaging&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun&lt;/groupId&gt;
          &lt;artifactId&gt;tools&lt;/artifactId&gt;
          &lt;version&gt;1.7.0&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${env.JAVA_HOME}/lib/tools.jar&lt;/systemPath&gt;
      &lt;/dependency&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;org.osgi&lt;/groupId&gt;
          &lt;artifactId&gt;org.osgi.core&lt;/artifactId&gt;
          &lt;version&gt;4.3.0&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;1.4.0&lt;/version&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;configuration&gt;
                  &lt;manifestLocation&gt;META-INF&lt;/manifestLocation&gt;
                  &lt;instructions&gt;
                      &lt;Bundle-SymbolicName&gt;osgi-tool-bundle&lt;/Bundle-SymbolicName&gt;                     
                      &lt;Bundle-Name&gt;osgi-tool-bundle&lt;/Bundle-Name&gt;
                      &lt;Bundle-Version&gt;1.0.0&lt;/Bundle-Version&gt;
                      &lt;Export-Package&gt;*&lt;/Export-Package&gt;
                      &lt;Private-Package&gt;com.nuwaza.aqua.bundle&lt;/Private-Package&gt;
                      &lt;Bundle-Activator&gt;com.nuwaza.aqua.bundle.Activator&lt;/Bundle-Activator&gt;
                      &lt;Import-Package&gt;*;resolution:=optional&lt;/Import-Package&gt;
                      &lt;Embed-Dependency&gt;*;scope=compile|runtime|system&lt;/Embed-Dependency&gt;                 
                      &lt;Embed-Directory&gt;target/dependency&lt;/Embed-Directory&gt;
                      &lt;Embed-StripGroup&gt;true&lt;/Embed-StripGroup&gt;
                      &lt;Embed-Transitive&gt;true&lt;/Embed-Transitive&gt;
                  &lt;/instructions&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
  
  
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;copy-dependencies&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
               &lt;/executions&gt;
            &lt;/plugin&gt;
          &lt;profiles&gt;
          &lt;profile&gt;
            &lt;activation&gt;
                &lt;property&gt;
                  &lt;name&gt;m2e.version&lt;/name&gt;
              &lt;/property&gt;
          &lt;/activation&gt;
          &lt;properties&gt;
              &lt;osgi-version-qualifier&gt;qualifier&lt;/osgi-version-qualifier&gt;
          &lt;/properties&gt;
          &lt;build&gt;
              &lt;pluginManagement&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;configuration&gt;
                              &lt;!-- PDE does not honour custom manifest location --&gt;
                              &lt;manifestLocation&gt;META-INF&lt;/manifestLocation&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/pluginManagement&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p></p>
  
  <p>The generated bundle only contains <code>org.osgi</code> packages not <code>com.sun</code> packages. I even included system scope in <code>&lt;Embed-Dependency&gt;*;scope=compile|runtime|system&lt;/Embed-Dependency&gt;</code>.</p>
  
  <p>What am i missing ?</p>