Maven

From Piszczynski

Install Maven

sudo yum -y update

sudo yum install java-1.8.0-openjdk -y

sudo yum install maven -y

test to see if installed correctly:

mvn --version

Get maven to generate a test hello world archetype project:

mvn archetype:generate -DgroupId=test.hello -DartifactId=hello-maven -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

run a test with maven on the project

mvn test

Compile the hello world app into a package after test is successful:

mvn package

run the compiled package

java -cp target/hello-maven-1.0-SNAPSHOT.jar test.hello.App