The build

What one command runs on a Java project. The three lifecycles and their phases come first, each phase with the plugin goal a jar build binds to it, then mvn compile and the target/classes folder it fills, a second run that compiles nothing, and a compile error read in full. mvn test follows with the surefire report and the counts it prints, then mvn package and mvn install, the jar in target, java -cp, java -jar and the manifest that makes the second one work. The part closes with the switches a build is run with: -q, -X, -DskipTests, -Dtest and -B, and what each one changes in the log.

01 Lifecycles and phases The three lifecycles and their phases, and the plugin goal each phase of a jar build runs. Open 02 mvn compile and target/classes mvn compile, target/classes, a second run that compiles nothing, and a compile error. Open 03 mvn test and the surefire report mvn test: the test classes, surefire, the counts and the report files. Open 04 Package, install and run the jar mvn package and mvn install, the jar in target, java -cp, java -jar and the manifest. Open 05 -q, -X, -DskipTests, -Dtest and -B The switches a build is run with, and what each one changes in the log. Open

Articles