Javatpoint Logo
Javatpoint Logo

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.

maven eclipse project

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.

maven eclipse project directory structure

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.

maven eclipse options




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA