Skip to content

Latest commit

 

History

History
143 lines (92 loc) · 3.4 KB

maven.rst

File metadata and controls

143 lines (92 loc) · 3.4 KB

Maven.

~/.m2/settings.xml.

$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Run build with -X option for verbose logging.

http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Introduction to the Standard Directory Layout.
$ mvn help:describe -DartifactId=maven-war-plugin -DgroupId=org.apache.maven.plugins
$ mvn help:describe -Dcmd=dependency:resolve -Ddetail

$ mvn dependency:tree
$ mvn dependency:list
$ mvn dependency:resolve
$ mvn dependency:resolve-plugins

$ mvn -X ...

Reason for inclusion or omitting dependencies:

$ mvn dependency:tree -Dverbose=true

What actual code processed by Maven (dump Maven config):

$ mvn help:effective-settings
$ mvn help:effective-pom

You can try redownload snapshots by:

$ mvn -U compile

You can fix damaged local ~/.m2 with:

$ mvn dependency:purge-local-repository

In order to perform really clean download:

$ mvn -Dmaven.repo.local=$HOME/.my/other/repository clean install

Check commands from versions-maven-plugin:

$ mvn versions:display-dependency-updates
$ mvn versions:display-plugin-updates
mvn exec:java -Dexec.mainClass="com.vineetmanohar.module.Main" -Dexec.args="arg0 arg1 arg2"

test property substituded to **/${test}.java pattern and override any include/exclude patterns:

$ mvn test -Dtest=SeriousComponentTest

or mostly same:

$ mvn test-compile surefire:test -Dtest=RunMe
$ mvn -DskipTests package
$ mvn -Dmaven.test.skip=true package
mvn dependency:resolve -Dclassifier=javadoc
mvn dependency:resolve -Dclassifier=sources
$ mvn -N deploy