Maven Comands
Build command
This one is the ultimate maven command I am using now:
clean install without failing on tests
make a test report
produce a dependency tree for debugging (tree.now file)
produce a reference to the parent in same file (tree.now file)
open test report in the default browser
mvn clean install surefire-report:report dependency:tree site -DgenerateReports=false -U -Dmaven.test.failure.ignore=true -Dmaven.plugin.validation=verbose -Dsonar.login=$SONAR_LOGIN && mvn dependency:tree >> tree.now && mvn dependency:display-ancestors >> tree.now && start target/site/surefire-report.html
Skip sonar and snyk:
mvn clean install surefire-report:report dependency:tree site -DgenerateReports=false -Dsonar.skip=true -Dsnyk.skip=true -U -Dmaven.test.failure.ignore=true -Dmaven.plugin.validation=verbose -Dsonar.login=$SONAR_LOGIN && mvn dependency:tree >> tree.now && mvn dependency:display-ancestors >> tree.now && start target/site/surefire-report.html
Maven formatter
mvn net.revelc.code.formatter:formatter-maven-plugin:format
Last modified: 12 March 2024