Spring Framework
  1. Spring Framework
  2. SPR-10218

Spring 3.2.1 POM missing certain compile time dependencies

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: [Build]
    • Labels:
    • Last commented by a User:
      false

      Description

      The generated POM files for Spring 3.2.1 have inadvertently changed several compile time dependencies to optional, namely:

      spring-orm
      -> spring-tx
      -> spring-jdbc
      
      spring-webmvc
      -> spring-context
      -> spring-web
      
      spring-test
      -> spring-webmvc
      

      The root cause of issue is:

      https://github.com/SpringSource/spring-framework/commit/7f928e83ffb3abdd62f9a1dc4ed1062bfc3b06f6

      This commit intended to change the scope only within the project being merged and not in the 'merge.into' destination.

        Issue Links

          Activity

          Hide
          Phil Webb added a comment -

          To work around this bug you may need to temporarily add the following dependencies to your project POM file.

          If you depend on spring-orm

          <dependency>
          	<groupId>org.springframework</groupId>
          	<artifactId>spring-tx</artifactId>
          	<version>3.2.1</version>
          </dependency>
          <dependency>
          	<groupId>org.springframework</groupId>
          	<artifactId>spring-jdbc</artifactId>
          	<version>3.2.1</version>
          </dependency>
          

          If you depend on spring-webmvc

          <dependency>
          	<groupId>org.springframework</groupId>
          	<artifactId>spring-context</artifactId>
          	<version>3.2.1</version>
          </dependency>
          <dependency>
          	<groupId>org.springframework</groupId>
          	<artifactId>spring-web</artifactId>
          	<version>3.2.1</version>
          </dependency>
          

          If you depend on spring-test

          <dependency>
          	<groupId>org.springframework</groupId>
          	<artifactId>spring-webmvc</artifactId>
          	<version>3.2.1</version>
          </dependency>
          

          Any changes can be reverted when Spring version 3.2.2 is released which contains a fix for the issue.

          For those interested, the root cause of this issue relates to the way that Spring merges modules together so that it can support conflicting dependencies. For example the spring-orm-hibernate4 module is merged into the spring-orm module so that we can support both hibernate versions 3 and 4. The scope on some of the dependencies on these merge modules was recently changed with the assumption that merge destination dependencies would take precedence. Unfortunately this was not the case.

          Show
          Phil Webb added a comment - To work around this bug you may need to temporarily add the following dependencies to your project POM file. If you depend on spring-orm <dependency> <groupId> org.springframework </groupId> <artifactId> spring-tx </artifactId> <version> 3.2.1 </version> </dependency> <dependency> <groupId> org.springframework </groupId> <artifactId> spring-jdbc </artifactId> <version> 3.2.1 </version> </dependency> If you depend on spring-webmvc <dependency> <groupId> org.springframework </groupId> <artifactId> spring-context </artifactId> <version> 3.2.1 </version> </dependency> <dependency> <groupId> org.springframework </groupId> <artifactId> spring-web </artifactId> <version> 3.2.1 </version> </dependency> If you depend on spring-test <dependency> <groupId> org.springframework </groupId> <artifactId> spring-webmvc </artifactId> <version> 3.2.1 </version> </dependency> Any changes can be reverted when Spring version 3.2.2 is released which contains a fix for the issue. For those interested, the root cause of this issue relates to the way that Spring merges modules together so that it can support conflicting dependencies. For example the spring-orm-hibernate4 module is merged into the spring-orm module so that we can support both hibernate versions 3 and 4. The scope on some of the dependencies on these merge modules was recently changed with the assumption that merge destination dependencies would take precedence. Unfortunately this was not the case.

            People

            • Assignee:
              Phil Webb
              Reporter:
              Phil Webb
              Last updater:
              Juergen Hoeller
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 11 weeks, 4 days ago