title: Error: type org.osgi.util.tracker.ServiceTracker does not take parameters
body: <p>I have a OSGi project and I am using Maven. In a bundle I need to import org.osgi.util.tracker.ServiceTracker, and create a property:</p>
  
  <pre><code>...
  import org.osgi.util.tracker.ServiceTracker;
  ...
  
  private ServiceTracker&lt;Object, Object&gt; serviceTracker;
  </code></pre>
  
  <p>I clearly have org.eclipse.osgi in my dependencies as denoted in below (part of my pom.xml).</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse&lt;/groupId&gt;
          &lt;artifactId&gt;org.eclipse.osgi&lt;/artifactId&gt;
          &lt;version&gt;3.8.0.v20120529-1548&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Within Eclipse, I can find the definition of the class.</p>
  
  <pre><code>public class ServiceTracker&lt;S, T&gt; implements 
               ServiceTrackerCustomizer&lt;S, T&gt; 
  {
     ...
  }
  </code></pre>
  
  <p>However, when I compile my project by maven command:</p>
  
  <pre><code>mvn clean install
  </code></pre>
  
  <p>I got the error:</p>
  
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project &lt;my project name&gt;: Compilation failure: Compilation failure:
  [ERROR]  &lt;link to my source code dir&gt;/Activator.java:[75,27] type 
  org.osgi.util.tracker.ServiceTracker does not take parameters
  </code></pre>
  
  <p>What the hell is happening?</p>