0

I have the following dependencies in pom.xml:

  <properties>
      <javax.servlet.version>3.1.0</javax.servlet.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
        <version>${javax.servlet.version}</version>
    </dependency>
  </dependencies>

When I run nvm clean install in my project, in my ~/.m2/repository/javax/servlet/servlet-api/3.1.0/ maven creates servlet-api-3.1.0.jar.lastUpdated and servlet-api-3.1.0.pom.lastUpdated

Why does maven create servlet-api-3.1.0.jar.lastUpdated instead of servlet-api-3.1.0.jar ?

Cristian
  • 1,590
  • 5
  • 23
  • 38

1 Answers1

1

Because download servlet-api-3.1.0.jar failed from network.
you can see the debug,and find wihch reason lead to download failed.

maven find jar process:
1.from your loacal responsitory (.m2 dir)
2.if not found,will find from there(where your pom.xml setting)

<repositories>
    <repository>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>public</id>
        <name>Public Repositories</name>
        <url>http://yourOwnRepository/nexus/content/repositories/thirdparty/</url>
    </repository>
</repositories>

3.if not found,will find from your maven settings.xml config

4.if not fond,will find from default maven repository

Ying Yi
  • 784
  • 4
  • 16