2

I am using eclipse mars,in that I am creating a rest webservice by refering this link.

As mentioned in this link I have to add maven dependencies.I tried googling it but didn't find any solution for it.

How to add it to my dynamic web project created ?or is it already available in my eclipse,if it so then how could I add jar files.

Priyantha
  • 4,839
  • 6
  • 26
  • 46
allDroid
  • 405
  • 1
  • 10
  • 21
  • create maven web project or convert dynamic web project to maven project and add dependency in pom.xml – Roshan Dec 18 '15 at 06:33
  • You should really have a look at [this](http://stackoverflow.com/a/30020830/2587435). I left it link in your previous question. It will give you a running jersey maven app out the box – Paul Samsotha Dec 18 '15 at 10:03

2 Answers2

2

If you convert your project to maven project pom.xml will be automatically created,if not
1- Create pom.xml file -by clicking on project directory->new->file
2- search frm google maven dependencies for ex: if you want to download spring-context.jar ,then search for maven spring context ,you will get groupid and artifactid paste it in pom.xml file.jars will be automatically downloaded.

Irshad
  • 3,071
  • 5
  • 30
  • 51
0

Don't create a dynamic project, instead :

1)Create a new maven project in eclipse from File-->New-->Other and select Maven

2)Give location of project and click next

3)From the archetype select maven-archetype-webapp and click next

4)In Group Id give the package name like "com" and in Artifact Id give appropriate name so by all this a package will be created

5)Now your maven project is ready, to add the jar files means you need to add dependencies

6)So goto mvnrepository.com and search for the jar files you need to add,select the latest stable release and then copy the dependency from the Maven Tab

7)Now open pom.xml from the created project and add the copied dependency inside the dependencies tag and do a ctrl + s

8)It will automatically download and add the required jar files to your library

Akhil Menon
  • 306
  • 1
  • 9