Apr 23rd, 2010, 10:33 AM
Determining which spring framework jars are needed
How can I systematically determine which jars I'll need, and thus should include in my pom.xml file (I'm using maven as my project management tool)?
When learning spring, to keep things simple and as recommended by the book, I added all the jars (even the ones I never used) to the classpath.
Right now for the most part, I'm looking at the spring context configuration file to determine which jars to include. For example, I know in my spring configuration file, I have:
So, I know I'll need: spring-beans.x.x.x.jar, spring-context-x.x.x.jar, spring-tx-x.x.x.jar, spring-aop-x.x.x.jar
Also, since this is a web app and I'll be using the ContextLoaderListener, I'll need: spring-web.x.x.x.jar
The method I'm currently using (as described above) feels haphazard. Anyone use or know of a better way? Or at least documentation that explains the purpose/use of each jar in the spring framework?
Apr 24th, 2010, 04:13 AM
THe best way is to use maven or ant/ivy to manage the dependencies, saves you a lot of headaches and searches.
Apr 24th, 2010, 06:21 PM
I think it is a valid question/concern and if you read the post abking IS using Maven.
It is not always clear what dependencies to include when you are using specific functionality.
F.e. I still don't know what Maven dependency to include so I can start using @Async (see also my post at http://forum.springsource.org/showthread.php?t=88160).
Tags for this Thread