Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. Maven Jump-Start > Using the Maven Console - Pg. 19

SNAPSHOT dependency. This lab will show you how to perform an offline build using Maven. How do I do that? The process is simple: just use the -o command-line option. For exam- ple, if you do not have a network connection, but would like to execute the test goal, run maven -o test. Maven will then execute the test goal without checking for dependencies. If your project does not depend on SNAPSHOT builds, you should be able to disconnect your environment without having to add the -o flag. If you do rely on SNAPSHOT builds, you will need to use the -o flag, as Maven will attempt to check for the pres- ence of a newer SNAPSHOT every time it executes a goal. In this case, the project will not build successfully without the use of the -o flag. What about... ...performing an offline build if I haven't downloaded any artifacts? Of course, this won't work. For an offline build to work you must already