title: How can I remove maven dependency jar in Eclipse
body: <p>I'm really new to Maven and just converted my app-engine project to a Maven project.
  I've added dependencies in the <code>pom.xml</code> file in order to get rid of the errors.
  but now I get in my code</p>
  
  <blockquote>
    <p>The method getPart(String) is undefined for the type HttpServletRequest</p>
  </blockquote>
  
  <p>So after doing a bit of research on Stack Overflow it appears I need to have a single and updated package of <code>servlet-api</code> to make that work properly.</p>
  
  <p>Apparently I may have a conflict with an older version that is in my Maven dependencies but I never added it in the <code>pom.xml</code> and now I'm stuck with this jar not knowing why it is imported and how I can delete it.</p>
  
  <p>Here is my <code>pom.xml</code>:</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;my-project&lt;/groupId&gt;
    &lt;artifactId&gt;my-project&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.8.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.8&lt;/source&gt;
            &lt;target&gt;1.8&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.2.1&lt;/version&gt;
              &lt;configuration&gt;
                   &lt;webResources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;${basedir}/src/main/webapp/WEB-INF&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
                      &lt;/resource&gt;
                  &lt;/webResources&gt;
              &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;com.google.cloud.tools&lt;/groupId&gt;
          &lt;artifactId&gt;appengine-maven-plugin&lt;/artifactId&gt;
           &lt;version&gt;1.3.1&lt;/version&gt;
              &lt;configuration&gt;
                   &lt;deploy.promote&gt;true&lt;/deploy.promote&gt;
                  &lt;deploy.stopPreviousVersion&gt;true&lt;/deploy.stopPreviousVersion&gt;
              &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.mailjet&lt;/groupId&gt;
          &lt;artifactId&gt;mailjet-client&lt;/artifactId&gt;
          &lt;version&gt;4.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.appengine.tools&lt;/groupId&gt;
          &lt;artifactId&gt;appengine-gcs-client&lt;/artifactId&gt;
          &lt;version&gt;0.8&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;properties&gt;
    &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
    &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
  &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>and here are images of what I get in <code>Maven dependencies</code> in my build path.</p>
  
  <p>my guess is that the error comes from having a 2.5 version of the servlet-api.</p>
  
  <p><a href="https://i.stack.imgur.com/eNNWJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eNNWJ.png" alt="build path section"></a>
  <a href="https://i.stack.imgur.com/gfmCz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gfmCz.png" alt="eventual conflict with servlet-api 2.5 and 3.1"></a></p>
  
  <p>So any help is greatly appreciated, I saw something about the <code>exclusion</code>
  tag but don't even know where to put it as it doesn't look like anything in the <code>pom.xml</code> is asking for this jar.</p>