Last active
July 2, 2019 11:03
-
-
Save sathish-io/af891d783b8d3da18a0c to your computer and use it in GitHub Desktop.
Maven cheat sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To download souce, | |
| mvn dependency:sources | |
| To start spring boot app: | |
| mvn spring-boot:run | |
| To run single test: | |
| mvn -Dtest=TestCircle test | |
| To remote debug maven test case, run with below option, | |
| mvn -Dmaven.surefire.debug test | |
| This will wait for port 5005 | |
| To make it wait for specific port(say 8000), here is the command, | |
| mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test | |
| Refer: | |
| http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html | |
| To run main class: | |
| mvn exec:java -Dexec.mainClass="com.module.Main" | |
| http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment