O'Reilly logo

Apache Maven 3 Cookbook by Srirangan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working in offline mode

Stuck on a tropical island with no Internet access? Will you give in to that intrinsic urge to write more code?

Maven, always a good friend of the developer, lets you work away from centralized SCMs, central repositories, and issue tracking systems. It's called the Maven offline mode.

Getting ready

You will need an existing or new project to work on. If your project has dependencies that are not available on the local repository, make sure you have the packages JAR/WAR/EAR available.

How to do it...

It's simple. Just use an -o switch for any Maven command. For example:

mvn install -o
mvn test -o

Does the build fail because of the unavailability of a dependency?

If you have the packaged file (JAR/WAR/EAR), dependencies can be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required