The following is a TO DO list when upgrading your Maven projects from Spring 3.0.3 to Spring 3.1.1.

  1. Take out the version number in the xsd(s) referenced in the xsi:schemaLocation:
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd 
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
    
    These xsd configurations will usually be found in the applicationContext.xml, servlet.xml and <web-app>-security.xml files.

  2. Modify the propertyConfigurer bean configuration to comply to the new class specification of the same bean in Spring 3.1.1:
    From:
    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations" value="file:$\{user.home\}/academic-ose-reporting.properties" />
    </bean>
    
    To:
    <bean id="propertyConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>file:$\{user.home\}/academic-ose-reporting.properties</value>
            </list>
         </property>
         <property name="ignoreResourceNotFound" value="true" />    
    </bean>
    
    The propertyConfigurer bean are found in applicationContext.xml, servlet.xml and may be applicationContext-test.xml.

  3. Delete the springframework dependencies in the pom.xml of the web application to use the transitive dependencies inherited from csf.  The following is the list of spring 3.1.1 dependencies defined in csf:
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-asm</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-instrument</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-instrument-tomcat</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc-portlet</artifactId>
        <version>3.1.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc-struts</artifactId>
        <version>2.5.6.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-mobile-device</artifactId>
        <version>1.0.0.M2</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>3.1.0.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.1.0.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>3.1.0.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.ldap</groupId>
        <artifactId>spring-ldap-core</artifactId>
        <version>1.3.1.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>pring-security-config</artifactId>
        <version>3.1.0.RELEASE</version>
    <dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>pring-security-taglibs</artifactId>
        <version>3.1.0.RELEASE</version>
    <dependency>
    

  4. If the web application uses spring web flow or spring batch, update the versions of the related modules in the dependencies in the pom file so that they are compatible with spring 3.1.1:
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-binding</artifactId>
        <version>2.3.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-faces</artifactId>
        <version>2.3.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-webflow</artifactId>
        <version>2.3.1.RELEASE</version>
    </dependency>  
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-core</artifactId>
        <version>2.1.8.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
        <exclusions>
            <exclusion>
                <artifactId>spring-tx</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            </exclusions>
        </dependency>
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-infrastructure</artifactId>
        <version>2.1.8.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-test</artifactId>
        <version>2.1.8.RELEASE</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    
  • No labels