Hi,
usually, most dependencies can be found in maven central (you can browse
it here: http://search.maven.org) and by default this is where Maven
looks to resolve dependencies. If your dependencies cannot be found in
central but can be found in another repository (like codehaus, for
example), you have two mechanisms to indicate those repositories to Maven:
1) Add them in your settings.xml (located in ${user.home}/.m2) within an
active profile: http://maven.apache.org/settings.html#Repositories
2) You can add them directly in you pom.xml:
http://maven.apache.org/pom.html#Repositories
There are pros and cons for both options, I am not discussing them now
as this has been already debated several time.
Whatever you choose, you should remove all the jar dependencies from
your Eclipse build path and only keep the "Maven Dependencies" container.
Cheers,
Guillaume
Le 28/09/2011 13:46, arka.sharma a écrit :
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
--
View this message in context:
http://maven.40175.n5.nabble.com/Adding-dependency-in-pom-tp4848825p4848825.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org