[Solved] Mavenwas cached in the local repository

Today I was prompted with an error message when compiling a maven project using the command mvn compile:

 was cached in the local repository, resolution will not be reattempted until the update interval of


Cause of the problem :
By default, Maven will use the local cached repository to compile the project, for the last failed library download, maven will create xxx.lastUpdated file in ~/.m2/repository/<group>/<artifact>/<version>/ directory. Once this file exists, the dependencies will not be updated until the next nexus update. Add the following. <repositories> <repository> <id>public</id> <url>地址</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> </repositories>

Read More: