Creating your First Maven Project

Tihomir R. Todorov

Version 0.0.1
Copyright © 2010 Tihomir R. Todorov
Revision HistoryCommentDateName
tutorial.maven.creating-your-first-maven-prj_0.0.1.v20101122-2200Article created11.22.2010Tihomir R. Todorov

Open a new command prompt (Winkey + R then type cmd) -> into cmd dialog create a new folder called maven-projects (mkdir maven-projects) -> go into maven-projects (cd maven-projects) and type the following command into cmd dialog: mvn3 archetype:create -DgroupId=de.family_todorov.mavenapps -DartifactId=my-first-maven-app

You should see the following:

Go into my-first-maven-app (cd my-first-maven-app) and run (mvn3 install) to compile your maven project.

Now you have created a .jar file. in the target folder. Go into target (cd target) and run your first maven project (java -classpath my-first-maven-app-1.0-SNAPSHOT.jar de.family_todorov.mavenapps.App)

You should see the following:

If you can read "Hello World!" in the cmd dialog you have done !

Congratulations, you have created your First Maven Project!