86
Maven Eclipse Example
Maven eclipse tutorial explains how to create maven example in eclipse.
In eclipse, click on File menu → New → Project → Maven → Maven Project. → Next → Next → Next. Now write the group Id, artifact Id, Package as shown in below figure → finish.
Now you will see a maven project with complete directory structure. All the files will be created automatically such as Hello Java file, pom.xml file, test case file etc. The directory structure of the maven project is shown in the below figure.
Now you can see the code of App.java file and run it. It will be like the given code:
If you right click on the project → Run As, you will see the maven options to build the project.