Source directory:
Test directory:
pom.xml must be at the same level as the src directory
java -version
src/main/javacontains all the source java files
Test directory:
src/test/javacontains all the test java files
pom.xml must be at the same level as the src directory
java -version
gives java versionmvn --version
gives maven versionmvn compile
compiles only the source files to .class filesmvn test-compile
compiles both source and test files to .class filesmvn clean
cleans up the distributionmvn test
runs the unit testsmvn package
creates jar filemvn verify
verifies jar file (?)mvn install
installs jar fileMaven build lifecycle:
validate, compile, test, package, integration test, verify, install