Note – This post is for beginners and has been created on demand 🙂
1. Maven downloaded and installed on machine.
2. m2eclipse installed in eclipse
Follow following steps to create your maven java project
1. Go to File ->New-> Project
2. A New Project wizard will pop up. Drill down to Maven->Maven Project and click on next
3. On next screen check the keep the default values and Click on next.
4. On next screen you have to choose the artefact that will suit your need, since we need a simple project we will choose “Nexus Indexer” in catalog and “maven-archetype-quickstart” in filter. In the box below appropriate archetype will appear. Choose that and click on next.
5. On the next scree provide groupId, arctifactId, name, description and version. Please visit following link for more info on these http://maven.apache.org/guides/mini/guide-naming-conventions.html
5. Click on finish and your simple java project is done. On exploding the project in explorer it should look like this
6. Open and verify the contents of your pom.xml.
7. Try adding few other dependencies and add your code in src/main/java/your package. The dependencies should be added automatically.
Guys this post may have mistakes as done in hurry. If you find anything please holla and I will get it corrected. Have fun and bye for now.