You can specify in your maven settings file that you want to run in offline mode, but is there an equivalent command line option?
I would imagine something like e.g
mvn -o works in most of cases but in some cases it will not enough as from Maven 3 a downloaded artifact from a remote/central repository creates a _remote.repositories file in your local repository with a reference about where the dependency was downloaded.
It may causes some issues if later you don't have access to this remote repository during your builds.
A workaround that may work is using mvn -o -llr yourGoal.
From the help documentation :
-llr,--legacy-local-repository Use Maven 2 Legacy Local
Repository behaviour, ie no use of
_remote.repositories. Can also be
activated by using
-Dmaven.legacyLocalRepo=true
-o,--offline Work offline
Another way to execute mvn in an offline way is deleting these _remote.repositories meta data stored in the directory of the downloaded dependencies.