it gets an error because it automatically converts version 3.1.0 to 3.1
That is something impossible. Maven will never convert version numbers ( with the exception of snapshots ). It will always download the version that you specify in the pom.xml
regardless the version actually exists or not. You can test this by writing a bogus number in the version area of the tag and then fire the mvn install
command, you will see that it will try to download that version and then fail.
To debug your problem, first verify that you have the correct maven entry in the pom
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
Secondly , I would advise you to delete the folder ~/.m2/repository/javax/servlet/
to remove any bad jar and thus force maven to re-download all the javax.servlet jars