title: Exclude servlet-api from test scope Maven
body: <p>I have the following dependency in my pom.xml so that my IDE (IntelliJ) has the servlet-api classes available during compilation, but not provided in the build. </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;3.0-alpha-1&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>But provided scope adds the classes in this dependency to the classpath when running in test scope, that's a problem for Jetty which I start programmatically. Since it already has it in its library I get a </p>
  
  <pre><code> java.lang.SecurityException: class "javax.servlet.FilterRegistration"'s signer information does not match signer information of other classes in the same package
  </code></pre>
  
  <p>If I remove this dependency the Jetty server starts correctly in test scope, but I need this dependency for IntelliJ to compile my code. Whats the best way to solve this, is there a way I can exclude this dependency for the test scope ?</p>