Tuesday, June 18, 2013

How to create a Maven project

First install Maven - Read Install Maven 3 on Amazon EC2 Ubuntu.

Create a folder anywhere you like. cd into the directory.

Create a Maven project
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.maventest -DartifactId=maventest
The CLI will prompt for a few options:

1.) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 284:

Push Enter. We will use the default 284.
remote -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
2.) Choose org.apache.maven.archetypes:maven-archetype-quickstart version:

Choose 1.1 (Number 6).

3.) Define value for property 'version':  1.0-SNAPSHOT: :

You can leave the version "1.0-SNAPSHOT" as the default value.

4.) Confirm properties configuration:

Push Enter.


You should see a folder created.

No comments:

Post a Comment