Exclude Java package from dependency jar : <p>I want to use jar from third party vendor. But in this jar I have old version of Java package <code>org.osgi.framework</code> I need to find some way to exclude the package from the main project. Something like this:</p>

<pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.ibm&lt;/groupId&gt;
          &lt;artifactId&gt;com.ibm.ws.admin.client&lt;/artifactId&gt;
          &lt;version&gt;8.5.0&lt;/version&gt;
          &lt;exclusions&gt;
             &lt;exclusion&gt;org.osgi.framework&lt;/exclusion&gt;
          &lt;/exclusions&gt;
          &lt;type&gt;jar&lt;/type&gt;
&lt;/dependency&gt;
</code></pre>

<p>Can you recommend some solution?</p>
