Thursday, April 28, 2016

Using Maven

Source directory:
contains all the source java files

Test directory:
contains all the test java files

pom.xml must be at the same level as the src directory

java -version
gives java version
mvn --version
gives maven version
mvn compile
compiles only the source files to .class files
mvn test-compile
compiles both source and test files to .class files
mvn clean
cleans up the distribution
mvn test
runs the unit tests
mvn package
creates jar file
mvn verify
verifies jar file (?)
mvn install
installs jar file
Maven build lifecycle:
validate, compile, test, package, integration test, verify, install

No comments: