User Tools

Site Tools


maven:commands

Run a single test class

mvn -Dtest=TestCircle test

Run a single test method

mvn -Dtest=TestCircle#mytest test

Execute a Java class

mvn exec:java -Dexec.mainClass="ro.medjava.RenameDuplicates"

Remote debug tests

mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" test

Use specified settings file

mvn --settings D:/Pro/MJ_MVN_Settings/settings.xml clean install -DskipTests

Specify local repository

mvn clean install -DskipTests -Dmaven.repo.local=D:/MavenRepo

Deploy to local repository

mvn --settings D:/Pro/MJ_MVN_Settings/settings.xml deploy -DskipTests -Dmaven.repo.local=D:/MavenRepo

Deploy third party jar in remote repository

mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=12.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc8.jar -DgeneratePom=true -DrepositoryId=internal -Durl=https://medjava.ro/archiva/repository/internal

Get dependency tree

mvn dependency:tree

Show full pom

mvn help:effective-pom -Doutput=full.txt

Remote debug single test class

mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" -Dtest=TestTrkPrint test
maven/commands.txt · Last modified: 2018/07/18 11:29 by odefta