Total Pageviews

2018/02/09

[Maven] How to stop Maven to check for updates for artifacts in offline mode ?

Problem
I am using offline mode to build my project, the command is as bellows:
mvn -o -Dmaven.repo.local="C:/Users/albert/.m2" clean install -Dmaven.test.skip=true

During the build process, Maven still check for updated for certain artifacts even in offline mode. How to avoid it?


How-To

Go to your local repository (ex. C:/Users/albert/.m2), and delete all *.lastupdated and _remote.repositories files.
Then Maven won't check updates any more.




No comments: