title: Maven automatically removes trailing zeroes in dependency version (javax.servlet-api)
body: <p>I am trying to add the <em>javax.servlet-api</em> project to my Maven Java project (see <a href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22javax.servlet%22%20AND%20a%3A%22javax.servlet-api%22" rel="nofollow noreferrer">this link</a> for more information about versions for this dependency). I want to add version <em>3.1.0</em> to my project. So naturally, I add this dependency to my pom.xml file:</p>
  
  <pre><code>&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;
  </code></pre>
  
  <p>However, when Maven tries to download the jar/pom files for this artifact, it gets an error because it automatically converts version <em>3.1.0</em> to <em>3.1</em>, which is not its actual version, and it cannot find that version of the artifact in the central Maven repo:</p>
  
  <pre><code>Downloading: http://repo.maven.apache.org/maven2/javax/servlet/javax.servlet-api/3.1/javax.servlet-api-3.1.pom
  [WARNING] The POM for javax.servlet:javax.servlet-api:jar:3.1 is missing, no dependency information available
  Downloading: http://repo.maven.apache.org/maven2/javax/servlet/javax.servlet-api/3.1/javax.servlet-api-3.1.jar
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  ...
  [ERROR] Failed to execute goal on project my-java-project: Could not resolve dependencies for project com.example.myproject:my-project:war:1.0-SNAPSHOT: Could not find artifact javax.servlet:javax.servlet-api:jar:3.1 in central (http://repo.maven.apache.org/maven2) -&gt; [Help 1]
  </code></pre>
  
  <p>Does anyone know how I can tell Maven to not strip off trailing zeroes in the version tag of a dependency in my pom.xml file? Any other workaround known?</p>
  
  <p><strong>NOTE:</strong> I did check out this SOF post (<a href="https://stackoverflow.com/questions/1979957/maven-dependency-for-servlet-3-0-api">Maven dependency for Servlet 3.0 API?</a>), but this author's solution was to use a <code>&lt;scope&gt;provided&lt;/scope&gt;</code> dependency for servlet-api, which I do not have interest in doing becuase I want to avoid needing to use the <em>provided</em> scope.</p>