- I installed maven and configured based on their 5 minute tutorial
- Created a eclipse project using Maven
- Installed Maven Integration for eclipse by going to eclipse market place
- Added dependencies (spring, log4j) to pom.xml by getting the xml snippet from mvnrepository.com
- right click on pom.xml and run as Maven Install.
I was not able to use the new jar files immediately, had to do mvn install several times and finally all the jar files are showed up in the project.
what could be the problem? Is it not updating the class path correctly?
My questions are:
- Are my steps above correct?
- I see all the dependent jar files in the main folder. I want to place these jar files under lib folder. How do i do that?
- How can i add external jar file to the repository, these are not in mvnrepository
- How do i generate ear file to be deployed to weblogic?
Edit: Attached the screenshot of the repository
Edit2: i picked the wrong project type. Once i picked webapp archetype, it puts all dependencies in “Maven Dependencies”. This is related to my second question.
For your question 3 : You can add any public maven repositories in to your pom file which contains your required jar files.
http://forum.springsource.org/showthread.php?63612-Maven-repository-location
or else if you have that jar file in your local machine you can manually install it into maven repository.
As per the Guide to installing 3rd party JARs.
For your 2nd question you can use:
http://maven.apache.org/plugins/maven-dependency-plugin/