tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Build Tools > Maven > How to prevent Maven from downloading artifacts on every run

How to prevent Maven from downloading artifacts on every run

Author: Venkata Sudhakar

Maven always tries to download latest dependencies from remote repositories. However this can cause the build to fail sometimes if the remote respositories are not available or accessible for some reason. In such cases we can prevent Maven from attempting to download remote artifacts by working offline. The offline mode can be enabled by using -o or --offline flags from the command line.

-o,--offline                           Work offline

Example commands

mvn install -o
mvn package -o

 
  


  
bl  br