0

I have created a library of widgets that export to a jar and reuse in several other projects. In my library, I depend on a few other jars in my war/WEB-INF/lib. The problem is that when I use my library in another project the dependencies of the library do not get carried over so I have to add those jars to the classpath and inherit them in the project as well. There has got to be a better way to handle the dependencies, do I need to use maven or is there another practice that works?

Will
  • 292
  • 4
  • 16

1 Answers1

3

Yes, if you don't want to manually manage your dependencies you will have to use a dependency management system. The 3 big ones are Maven, Ivy, and Gradle. I have included links below so you can read about them. A quick search will reveal the pros/cons of each from the community and also information about alternative dependency management systems. There are quite a few out there.

Apache Maven

Apache Ivy

Gradle

xsee
  • 1,173
  • 1
  • 9
  • 12