How to skip test in Maven
Maven provides a way to only build the application code and skip executing test cases
Enter the following command to build the application code but don't execute test cases.
Skip executing tests
mvn install -DskipTests
This article shows how to install Maven (3.6.3) on macOS Monterey(version 12.2.1) with M1 processor.
Goto https://maven.apache.org/download.cgi and download the version for instance
apache-maven-3.8.7-bin.tar.gz
x apache-maven-4.0.0-alpha-3/bin/mvn.cmd x apache-maven-4.0.0-alpha-3/bin/mvn x apache-maven-4.0.0-alpha-3/README.txt x apache-maven-4.0.0-alpha-3/LICENSE x apache-maven-4.0.0-alpha-3/NOTICE x apache-maven-4.0.0-alpha-3/lib/ x apache-maven-4.0.0-alpha-3/lib/aopalliance.license x apache-maven-4.0.0-alpha-3/lib/commons-cli.license x apache-maven-4.0.0-alpha-3/lib/commons-codec.license x apache-maven-4.0.0-alpha-3/lib/commons-lang3.license x apache-maven-4.0.0-alpha-3/lib/failureaccess.license x apache-maven-4.0.0-alpha-3/lib/guava.license x apache-maven-4.0.0-alpha-3/lib/guice.license x apache-maven-4.0.0-alpha-3/lib/httpclient.license x apache-maven-4.0.0-alpha-3/lib/httpcore.license
Apache Maven 4.0.0-alpha-3 (2ccf57baa5191468f9911fe85fd99672ac3bacb9) Maven home: /Users/SiddB/DevRuntime/apache-maven-4.0.0-alpha-3 Java version: 18.0.1.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-18.0.1.1.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "12.2.1", arch: "aarch64", family: "mac"
mvn install -DskipTests
mvn eclipse:eclipse -DdownloadSources=true
Executing the following command from the terminal will download the sources for all the artifacts only, attaching the sources in the IDE with the binaries needed to be done seperately..mvn dependency:sources -Dsilent=true
mvn source:jar install