img
. .
Figure 2-2 shows STS with a simple Spring utility project. The screen comes from the project's
pom.xml (Maven Project Object Model) file and m2e plug-in's dependency hierarchy viewer, which is
displaying all the dependencies required for the project. From the dependency hierarchy diagram, you
can see that the project depends on spring-context, which in turns requires spring-aop, spring-beans,
spring-core, spring-expression, and spring-asm. Also, spring-aop further depends on aopalliance,
while spring-core depends on commons-logging. By default, the Spring project use log4j for logging
purposes. Finally, you can see other testing dependencies (spring-test, junit).
Figure 2-2. Spring's dependency hierarchy for a simple Spring utility project that utilizes Spring's bean
factory and DI features
Spring Modules on the Maven Repository
Besides downloading them from the Internet, you also can manage Spring libraries via an application
dependency management tool, such as Ivy and Maven. In this section, we will take a look at the Spring
modules on the Maven repository.
Founded by Apache Software Foundation, Maven (http://maven.apache.org) has become one of the
most popular tools in managing the dependencies for Java applications, from open source to enterprise
environments.
Maven is a powerful application building, packaging, and dependency management tool. It manages
the entire build cycle of an application, from resource processing and compiling to testing and packaging.
There also exists a large number of Maven plug-ins for various tasks, such as updating databases and
deploying a packaged application to a specific server (e.g., Tomcat, JBoss, WebSphere, etc.).
Almost all open source projects support distribution of their library via the Maven repository. The
most popular one is the Maven Central repository hosted on Apache, and you can access and search for
the existence and related information of an artifact on the Maven Central web site
(http://search.maven.org). If you download and install Maven into your development machine, you
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home