Running Maven Offline Mode

Running Maven Offline Mode

If you want to work with maven on offline mode means don’t want maven to check central repository synchronized with local repository because it makes build process slow. Please follow below steps:

  • Go to your ${user.home}/.m2/settting.xml or if you don’t find settings.xml file here it means you haven’t installed maven yet on your system. Please use this tutorial to install maven on your computer
  • Open settings.xml file and search “offline” you will find below:

Running Maven Offline Mode

  • As you see above by default offline mode is false means every time you build your project it will check maven central repository. To work offline make offline true as below:

Running Maven Offline Mode

  • If you want to achieve this through command line please specify as below:

  • For more information please use maven command complete reference here

Leave a Reply

Your email address will not be published. Required fields are marked *