Skip to content

Instantly share code, notes, and snippets.

@mondain
Created February 9, 2016 18:37
Show Gist options
  • Save mondain/82ac968e5936fa1c96d1 to your computer and use it in GitHub Desktop.
Save mondain/82ac968e5936fa1c96d1 to your computer and use it in GitHub Desktop.
Using Maven offline

To use Maven in an "offline" mode, first fetch all dependencies you need.

To get the dependencies and overwrite the ones where the file timestamp is newer (applies to snapshots and releases)

mvn dependency:go-offline -DoverWriteIfNewer=true

When the dependency downloads complete, use the -o parameter to tell maven to work in offline mode

mvn -o <normal mvn parameters here>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment