Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9940

Spring test module shouldn't pull in hamcrest-all as hard dependency

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2 M2
    • Fix Version/s: 3.2 RC1
    • Component/s: Test
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Trying to upgrade Spring Data JPA from 3.1.2.RELEASE to 3.2.0.BUILD-SNAPSHOT broke my dependency setup as the test module apparently has hamcrest-all as hard dependency in a really ancient version (1.1 (2007), current is 1.3).

      The reason this broke is that my project depends on hamcrest-library only, so that my local declaration of the 1.3 version does not get preferred. I fear we might break quite a few projects with that move as setting up JUnit and Hamcrest to work reasonably is quite a dance anyway and it's not really obvious why tests suddenly don't compile anymore.

      Can we make Hamcrest an optional dependency?
      If not, do we really need the broad hamcrest-all or is hamcrest-library enough as it contains all the Matcher implementations (see http://code.google.com/p/hamcrest/wiki/HamcrestDistributables for details).
      If not, could we at least refer to the latest version (1.3).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                olivergierke Oliver Gierke
                Last updater:
                Sam Brannen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 47 weeks, 1 day ago