How do I configure Maven for offline development?

user130532 picture user130532 · Aug 29, 2011 · Viewed 157.3k times · Source

Does maven require a connection to the internet at some point to be able to use it? Meaning specifically getting the internal maven plugins for compiling, cleaning, packaging, etc?

Answer

nsfyn55 picture nsfyn55 · Aug 29, 2011

You can run maven in offline mode mvn -o install. Of course any artifacts not available in your local repository will fail. Maven is not predicated on distributed repositories, but they certainly make things more seamless. Its for this reason that many shops use internal mirrors that are incrementally synced with the central repos.

In addition, the mvn dependency:go-offline can be used to ensure you have all of your dependencies installed locally before you begin to work offline.