Saturday, December 8, 2012

Very simple Maven application from cmd


Introduction

This instrunction will help you to understand how maven works. You will work with archetype webapp-javaee6.

Details

  1. You need to check if maven is installed properly in your system. If some questions appear, please proceed to Installation instructions;
  2. In terminal/command-line cd to desired directory where you project will be stored;
  3. 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;
  4. Enter 415. Press Enter;
  5. Next, you'll be promted to enter a version. It should automatically choose last version (8: 1.5). Just press Enter;
  6. Define groupId. For example: com.netcracker. Press Enter;
  7. artifactId is your projects name. Enter it and press Enter;
  8. You can enter desired version. But also can press Enter. Version will be assigned automatically: 1.0-SNAPSHOT. Press Enter;
  9. Package is set automatically. So, you just need to press Enter;
  10. You will be shown the list of your configuration. Press Enter if all is ok. If not, you'll need to enter new configuration;
  11. cd to yours newly created project folder. And enter: mvn clean install. Press Enter.
  12. Wait some time for message BUILD SUCCESS to appear on you screen. Once you get it, you project will completely ready for coding.
  13. Open project in any IDE as Maven project.
  14. That's all! You now have a project waiting for you to add some code in it!

Additional links

In English

На Русском

Friday, September 14, 2012