Maven Build Project Without Unit Tests and Reporting Errors

in #development3 years ago (edited)

Just a quick hack to remember what commands to use during builds with Maven:

CommandResult
mvn clean packageClears the directory, builds the packages, and runs unit tests all which result in creating the JAR.
mvn clean package -Dmaven.test.skip=trueClears the directory and builds the packages which result in creating the JAR. This skips unit tests.
mvn clean package -Dmaven.test.skip=true -eClears the directory and builds the packages which result in creating the JAR. This skips unit tests and outputs any resulting errors
mvn dependency:tree -DskipTests -DverboseUseful to see the dependencies and identify if there's a JAR version clash

These can all be easily copied and pasted in the terminal.

More ETLHelp posts:

SQL In Six Minutes (YouTube) | SQL In Six Minutes (Odysee) | Automating ETL | T-SQL In 2 Hours | Consumer Guide To Digital Security