Maven is a very nice build and configuration tool that helps us specify the jar as a GAV (group, artifact, version) in a xml file, that helps manage the project dependencies in a succinct manner.
Steps for creating maven project.
a.
Open Eclipse and got to File -> New ->
Other
b.
Search with ‘Maven’ and select Maven Project.
*** If you are not able to locate MavenProject here, please install maven add on in eclipse.
Eclipse - Help - Install new software and link is http://download.eclipse.org/technology/m2e/releases/
*** If you are not able to locate MavenProject here, please install maven add on in eclipse.
Eclipse - Help - Install new software and link is http://download.eclipse.org/technology/m2e/releases/
c.
Un-check the ‘Use default
Workspace location‘ and choose your workspace .
d.
Select the archetype, for now
just select the ‘maven-aechetype-quickstart‘.
e.
Specify the Group Id & Artifact
Id and click on Finish.
f.
Here is the pom.xml
g.
Right click on the pom.xml and go to Run As > Maven test.
h.
Here are the logs.
No comments:
Post a Comment