티스토리 뷰

Programming/Maven

Command Line Reference

Jared 2008. 7. 9. 11:47

Command Line Reference

The following command line options are availabl when running Maven:

usage: mvn [options] [<goal(s)>] [<phase(s)>]

Options:
 -q,--quiet                    Quiet output - only show errors
 -C,--strict-checksums         Fail the build if checksums don't match
 -c,--lax-checksums            Warn if checksums don't match
 -P,--activate-profiles        Comma-delimited list of profiles to
                               activate
 -ff,--fail-fast               Stop at first failure in reactorized builds
 -fae,--fail-at-end            Only fail the build afterwards; allow all
                               non-impacted builds to continue
 -B,--batch-mode               Run in non-interactive (batch) mode
 -fn,--fail-never              NEVER fail the build, regardless of project
                               result
 -up,--update-plugins          Synonym for cpu
 -N,--non-recursive            Do not recurse into sub-projects
 -npr,--no-plugin-registry     Don't use ~/.m2/plugin-registry.xml for
                               plugin versions
 -U,--update-snapshots         Forces a check for updated releases and
                               snapshots on remote repositories
 -cpu,--check-plugin-updates   Force upToDate check for any relevant
                               registered plugins
 -npu,--no-plugin-updates      Suppress upToDate check for any relevant
                               registered plugins
 -D,--define                   Define a system property
 -X,--debug                    Produce execution debug output
 -e,--errors                   Produce execution error messages
 -f,--file                     Force the use of an alternate POM file.
 -h,--help                     Display help information
 -o,--offline                  Work offline
 -r,--reactor                  Execute goals for project found in the
                               reactor
 -s,--settings                 Alternate path for the user settings file
 -v,--version                  Display version information

MAVEN_OPTS

Specify additional options using the MAVEN_OPTS environment variable. It is for passing parameters to the Java VM when running Maven. For example, to increase the amount of memory to 1024 Meg for the entire run of Maven, use:

MAVEN_OPTS=-Xmx1024m

Also note that a given plug-in may have a property to set for its memory usage, such as the Javadoc plug-in's maven.javadoc.maxmemory property. This is because that particular plugin forks an additional Java VM.

For another example, set the MAVEN_OPTS to run Java in debug mode:

MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y

After setting this property, run "maven cactus:test" (or whatever goal to debug) and it will block, waiting for a debug connection.

Then, in your IDE, select the "Run -> Debug" window and craete a new "Remote Java Application" configuration, passing the port set in MAVEN_OPTS (8787 in this case).

Once running this configuration in debug, the blocked Maven session will continue, enabling debugging from your IDE.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함