Results 1 to 3 of 3

Thread: Adding Maven dependencies to a Maven Project

  1. #1
    Join Date
    Aug 2010
    Posts
    25

    Default Adding Maven dependencies to a Maven Project

    Hi, I am using SpringSource Tool Suite Version: 2.5.0.RELEASE. I created a Java Project then enabled Maven dependency management. Now that I have a pom.xml, I tried to add a dependency on it. (I can type the dependencies in the xml file but I right clicked on the project -> Maven ->Add Dependency). Then I tried to add an existing jar in the .m2/repository. The problem was that it cannot detect any jars in my repository.

    I have also an Eclipse IDE installed in my PC and it works properly there. Am I missing any configurations? (something like STS_HOME or STS_WORKSPACE)

    Thanks!

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hi,

    to make use of this functionality please enable the Maven Repository Download from the preferences (Preferences -> Maven -> Check "Download repository index on startup") and restart STS.

    You should now be able to find dependencies when using "Add Dependency" etc.

    HTH

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3
    Join Date
    Feb 2011
    Posts
    1

    Default Thanks

    Thanks I was looking for this solution for awhile. I couldn't figure out why I could not search for maven jars. I did have to take one extra step. I had to right click my project then select Maven>Update Dependencies. This seemed to hook me up to the maven repository in the sky that holds all the jars I need. Thanks again.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •