MAVEN

From this post I’m going to show how to integrate MAVEN to your JAVA project. You should have MAVEN installed on your computer.

  1. You can download maven form this link.
  2. Then extract it to anywhere you like.
  3. Add MAVEN to your PATH variable.
  4. Using mvn –version in LINUX you can check the installation.

Now let’s see how to integrate it with a JAVA project. I’m using InteliJ IDEA IDE for creating the JAVA project.

  • Run your IDE.
  • Go to File –> New –> Project.

10.png

  • Choose Maven from the left hand side window.

11.png

  • Choose the preferred SDK.

12.png

  • Click Next.

13.png

  • Give a GroupID and an ArtifactID.

14.png

  • Click Next.

15.png

  • Give a Project Name and a Location.

16.png

  • Click Finish.

17

  • Then it will open the Project like below. On the left had side you can see the Project tree. It will automatically create a directory for test as well.

18.png

  • On the right hand side, under Maven, you can see following life cycle details.

20.png

  • It will automatically create a pom.xml file as well.

19

  • At your Project location you can see these files has been created.

21

Inside TestProject :

22

Inside src :

23

Hope now you have a clear idea about integrating MAVEN in to your JAVA project. Thank You!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s