Announcement Announcement Module
No announcement yet.
Determining which spring framework jars are needed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:

    <tx:annotation-driven />
    <context:annotation-config />
    <aop:aspectj-autoproxy />

    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?


  • #2
    THe best way is to use maven or ant/ivy to manage the dependencies, saves you a lot of headaches and searches.


    • #3
      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