Announcement Announcement Module
Collapse
No announcement yet.
Adding 3rd party jar files to spring project in STS. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding 3rd party jar files to spring project in STS.

    Is there a specific directory where we should add 3rd party jar files where they will be included when exporting from STS. I created a lib directory in the root directory of my project and added the jars to the build path in project properties which runs fine from STS. But when I use maven to package the app and run it im getting an error that it can find the classes that are in the 3rd party library. Do I have to add them jars to the pom.xml file manually when I add new jars of is there a way that STS will do it automatically?

    Thanks

  • #2
    Hey!

    Yes, in case you are using Maven in your project (and therefore also for the dependency management), you need to configure the additional libraries in the pom.xml file. That keeps all the dependency definitions in one place. The Maven integration for Eclipse should then take care of adding the right libraries to the classpath of the project. You don't need to put them into a lib folder into the project nor add them to the build path yourself.

    HTH,
    -Martin

    Comment

    Working...
    X