Introduction
This instrunction will help you to understand how maven works. You will work with archetype webapp-javaee6.
Details
- You need to check if maven is installed properly in your system. If some questions appear, please proceed to Installation instructions;
- In terminal/command-line cd to desired directory where you project will be stored;
- In this directory write: mvn archetype:generate. You will get a huge list of all available archetypes. You need archetype number which havewebapp-javaee6 in its name. Most likely it will be 415. Press Enter;
- Enter 415. Press Enter;
- Next, you'll be promted to enter a version. It should automatically choose last version (8: 1.5). Just press Enter;
- Define groupId. For example: com.netcracker. Press Enter;
- artifactId is your projects name. Enter it and press Enter;
- You can enter desired version. But also can press Enter. Version will be assigned automatically: 1.0-SNAPSHOT. Press Enter;
- Package is set automatically. So, you just need to press Enter;
- You will be shown the list of your configuration. Press Enter if all is ok. If not, you'll need to enter new configuration;
- cd to yours newly created project folder. And enter: mvn clean install. Press Enter.
- Wait some time for message BUILD SUCCESS to appear on you screen. Once you get it, you project will completely ready for coding.
- Open project in any IDE as Maven project.
- That's all! You now have a project waiting for you to add some code in it!
Additional links
In English
- Introduction to Archetypes
- Project creation
- Guide to Creating Archetypes
- Maven Archetype Plugin
- 5 things you didn't know about Apache Maven
- Introduction to Apache Maven 2
- Building Web Applications with Maven 2