Friday, December 25, 2009

Spring 3.0 & Maven

I wanted to go over the process of upgrading the build from Spring 2.5 to Spring 3.0 (3.0 release announcement) using Maven for the build process. For almost all applications from basic dependency injection to webapps, and even enterprise applications with Spring Web Services and Spring Integration all upgraded without any issues.

I did change all the builds to use the SpringSource Enterprise Bundle Repository. It has all the Spring projects and also repackaged versions of many other open source ones. SpringSource did this to make all the artifacts OSGi enabled and also corrected any errors in dependencies where possible. It isn't necessary to use this repository and all Spring projects are also deployed to the main Maven repository tool.

I primarily switched so the projects could be more easily imported into an OSGi environment if someone needed to the SpringSource Enterprise Bundle Repository (EBR) and to avoid any dependency resolution issues since some artifacts will need to be resolved from the EBR.

Keith Donald, from SpringSource, did a blog discussing using Maven with Spring 3.0. It's called Obtaining Spring 3 Artifacts with Maven and is definitely worth reading to understand things in more detail.

No comments: