title: Installing a new version of Groovy on my OSGi environment makes my bundle import it, though it shouldn't
body: <p>I have a little bundle that uses Groovy to interpret scripts.</p>
  
  <p>The manifest Import-Package instruction looks like this:</p>
  
  <pre><code>Import-Package: groovy.util;version="[1.8,2)"
  </code></pre>
  
  <p>The version range above clearly states the import version must be between 1.8 (inclusive) and 2.0 (exclusive).</p>
  
  <p>When I run this bundle in an OSGi environment with only Groovy 1.8.6 installed, it works as expected... when I type <code>inspect package requirement 4</code>, it prints:</p>
  
  <pre><code>-&gt; com.athaydes.gradle.osgi.groovy-1-8-6-runner [4] imports packages:
  ------------------------------------------------------------------
  ipojo.example.code; version=0.0.0 -&gt; com.athaydes.gradle.osgi.code-runner-api [1]
  groovy.util; version=1.8.6 -&gt; groovy-all [5]
  </code></pre>
  
  <p>This is exactly as I expected, and when I ask the CodeRunner to interpret this Groovy snippet:</p>
  
  <pre><code>GroovySystem.version
  </code></pre>
  
  <p>It correctly returns <code>1.8.6</code>.</p>
  
  <p>Now, when I start my OSGi environment with both Groovy 1.8.6 and 2.3.3 installed, when I inspect the packages for my bundle, I get this instead:</p>
  
  <pre><code>-&gt; com.athaydes.gradle.osgi.groovy-1-8-6-runner [4] imports packages:
  ------------------------------------------------------------------
  ipojo.example.code; version=0.0.0 -&gt; com.athaydes.gradle.osgi.code-runner-api [1]
  </code></pre>
  
  <p>The <code>groovy.util</code> import is gone (even though the MANIFEST still has it, of course)! And now, when I run <code>GroovySystem.version</code> I get 2.3.3, not 1.8.6 as it should be!</p>
  
  <p>This is crazy stuff, it seems like just the fact that a newer version of Groovy is present is breaking the OSGi promise that I should be able to use whatever version of a dependency I want.</p>
  
  <p>I have tested this in Felix and Equinox, with the exact same result.</p>
  
  <p>I have also used an exact version in the manifest instead of a range, but that did not change anything.</p>
  
  <p>Can anyone see what exactly is going on here??</p>
  
  <p>PS. if you don't believe me, try yourself, here's the project on GitHub: <a href="https://github.com/renatoathaydes/osgi-run/tree/next/osgi-run-test/ipojo-dosgi">https://github.com/renatoathaydes/osgi-run/tree/next/osgi-run-test/ipojo-dosgi</a></p>