Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring 3.0.5 library jars

Tags:

java

spring

All, I am starting with Spring and got the Spring 3.0.5 distribution. I see the following jars:

  • org.springframework.aop-3.0.5.RELEASE.jar
  • org.springframework.asm-3.0.5.RELEASE.jar
  • org.springframework.aspects-3.0.5.RELEASE.jar
  • org.springframework.beans-3.0.5.RELEASE.jar
  • org.springframework.context.support-3.0.5.RELEASE.jar
  • org.springframework.context-3.0.5.RELEASE.jar
  • org.springframework.core-3.0.5.RELEASE.jar
  • org.springframework.expression-3.0.5.RELEASE.jar
  • org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
  • org.springframework.instrument-3.0.5.RELEASE.jar
  • org.springframework.jdbc-3.0.5.RELEASE.jar
  • org.springframework.jms-3.0.5.RELEASE.jar
  • org.springframework.orm-3.0.5.RELEASE.jar
  • org.springframework.oxm-3.0.5.RELEASE.jar
  • org.springframework.test-3.0.5.RELEASE.jar
  • org.springframework.transaction-3.0.5.RELEASE.jar
  • org.springframework.web.portlet-3.0.5.RELEASE.jar
  • org.springframework.web.servlet-3.0.5.RELEASE.jar
  • org.springframework.web.struts-3.0.5.RELEASE.jar
  • org.springframework.web-3.0.5.RELEASE.jar

I want to know which jar is meant for which module of Spring (ORM, Core, MVC, AOP etc). So that I can choose the correct set of jars for my project.

Is there a reference somewhere that explains each jar and it's use correctly?

like image 660
Ayusman Avatar asked Jan 13 '11 07:01

Ayusman


2 Answers

There is a following chart (from Diagram of Spring 3.0 module dependencies):

alt text

As you can see, there are several groups of modules:

  • "Core Spring" - context and its dependencies (asm is missed, aop depends on it)

  • Web

    • web - basic webapp integration
    • webmvc (web.servlet) - Spring MVC Framework
    • webmvc-portlet (web.portlet) - Spring MVC for portlets
    • web.struts - Struts integration
  • Data access

    • tx (transaction) - basic transaction support
    • jdbc - JDBC support
    • orm - ORM integration
  • Other modules

    • context-support - integration with Quartz, Javamail, Ehcache, etc
    • jms, oxm - JMS and object-XML mapping respectively
    • test - for unit testing
    • aspects - AspectJ intergration (usually not needed)
    • instrument, instrument.tomcat - load-time weaving

So, if you use build tool that supports transitive dependencies (such as Maven), you usually only need to declare the required modules from web and data groups, and some from the other modules, if needed. Also you may need to declare context in order to configure logging.

For example, if you want to create a web application with Spring MVC and Hibernate, you declare webmvc (web.servlet) and orm. If you don't use Maven, you also need to import their transitive dependencies, as shown on the chart.

See also:

  • Diagram of Spring 3.0 module dependencies
  • Obtaining Spring 3 Artifacts with Maven
  • Logging Dependencies in Spring
like image 85
axtavt Avatar answered Oct 20 '22 16:10

axtavt


I'd go with Maven. Even if you can't use it in your project, you can either create a dummy project with it, or see the spring jar dependencies.

With Maven, you just add the jars you need: -orm, -aop, -webmvc (missing from your list), and maven fetches all the other jars that are required.

like image 4
Bozho Avatar answered Oct 20 '22 18:10

Bozho