Maven Cheat Sheet



Maven is one of the fantastic tools to automate the application development process automation. You can use this Maven Commands and Concepts as the cheat sheet while you are working with maven projects. In our upcoming articles, we will discuss more on automating development lifecycle. Mac Brew Install. Contribute to axper/maven-cheatsheet development by creating an account on GitHub. Automationdirect port devices driver.

A quick reference to Maven commands.

mvn -Dtest=<unqualified-classname> test

Tests only the specified class

mvn -Dmaven.surefire.debug test

Maven Commands Cheat Sheet

Enables remote debugging of tests on port 5005. Surefire will block on the port until you connect with your debugger.

mvn -Dcargo.wait=true -P int integration-test

Runs CS in Tomcat via cargo

mvn help:effective-pom

Shows the logical contents of a pom.xml, including contents inherited from the parent pom.xml, up to and including the Maven super POM.

mvn dependency:tree

Shows all dependencies (including transitive dependencies) of your project. This is very helpful for debugging dependency version issues.

mvn -X <package-name>

Shows all explicit and transitive dependencies for a package, helping to identify conflicts

Maven Cheat Sheet Pdf

Poe

mvn dependency:sources

Downloads all project sources separate from IDE project creation. Execute from root of parent project, then have your IDE synch up sources.

Maven Commands Cheat Sheet

Not Currently Available to Customers:

mvn -Dupgrade.version=<version you're upgrading to> com.jivesoftware.maven:maven-upgrade-plugin:upgrade

Will generate a list of diff files based on product changes that correspond to your overlays. Also generates a mirrored directory structure with product files that enables you to diff against your project's web directory

Apache Maven Cheat Sheet

Note: requires SVN access; a version is in development to use Maven dependencies instead.

mvn deploy:deploy-file -DgroupId=<package> -DartifactId=<artifact-name> -Dversion=<version-no> -Dpackaging=jar -Dfile=/path/to/file.jar -Durl=https://maven-secure.jiveland.com/archiva/repository/jive.snapshots -DrepositoryId=secure.jive.snapshots

Maven 3 Cheat Sheet

In this example, the command deploys a jar artifact to our repository. This command working depends on your having adequate permissions.