Skip to content

Latest commit

 

History

History
43 lines (19 loc) · 1.28 KB

mavenguide.md

File metadata and controls

43 lines (19 loc) · 1.28 KB

HOME

Get Started

Creating a project:

You will need somewhere for your project to reside, create a directory somewhere and start a shell in that directory. On your command line, execute the following Maven goal:

mvn archetype:generate -DgroupId=com.default -DartifactId=NameOfProject -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

HINT! : If you leave out -DarchetypeVersion=1.4, Maven automatically creates the newest version in the POM file.

Build project:

mvn package

Test project

You may test the newly compiled and packaged JAR with the following command:

java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App

Clean Project

This command will clean the project, copy dependencies, and package the project (executing all phases up to package, of course).

mvn clean dependency:copy-dependencies package

Generating Site

This phase generates a site based upon information on the project's pom. You can look at the documentation generated under target/site.

mvn site