문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top