Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding dependency in pom

 
Arka Sharma
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having a project that I have created in Eclipse.This project conatins hibernate,drools.So I have added all the necessary jars in the project build path.Now I have created a maven quickstart archetype where inside main folder I have kept my java source and inside test directory I have kept my JUnit test sources.
Now in pom.xml I have added the dependencies by searching dependeny for the jars I have added in my build path in eclipse.But maven is unable to find repositories.I can manually install the jars using installer:install but it is too hectic because there are lots of jars.Is there any easy way to specify dependency for all the jars used in my project ?

Regards,
Arka
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you installed the m2eclipse plugin? If so, you can create a Maven Project. Then the POM editor will let you search the repositories for the dependencies you are interested in. Some dependencies might not be in Maven Central, so you will have to locate the repository they belong to and ad that repository to your settings.xml file (or you can add it to your pom.xml, or you can installed a repository manager such as Nexus and have it manage all of that for you. Personally, I would go with Nexus, that removes a lot of headaches.)

For Hibernate, and other JBoss-related artifacts, see this: http://community.jboss.org/wiki/MavenRepository
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic