O'Reilly logo

Apache Maven Cookbook by Raghuram Bharathan

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

Understanding command-line options in Maven

While the most popular way to run Maven is to specify goals, Maven provides a number of command-line options to customize its behavior. They range from specifying values for properties, to varying the verbosity of the Maven output. It is useful to know some of the arguments, as they will often help with troubleshooting issues with Maven.

Getting ready

Maven is set up on your system and is verified as working.

How to do it...

To understand command-line options in Maven, perform the following steps:

  1. Open the command prompt.
  2. Run the following command:
    mvn –h
    
  3. You will see an output such as the following screenshot:

A number of options that Maven supports are displayed in the preceding screenshot.

How it works... ...

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