Skip to content

Commit ae0c34b

Browse files
committed
Improve 3.2 migration guide re: JUnit & Hamcrest
This commit improves the "Spring Test Dependencies" section of the 3.2 migration guide by correctly explaining that Hamcrest Core is now a required transitive dependency of JUnit. Issue: SPR-10251
1 parent aac6b91 commit ae0c34b

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/reference/docbook/migration-3.2.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,14 @@
138138
depend on JUnit 4.11 (<literal>junit:junit</literal>), TestNG 6.5.2
139139
(<literal>org.testng:testng</literal>), and Hamcrest Core 1.3
140140
(<literal>org.hamcrest:hamcrest-core</literal>). Each of these
141-
dependencies is declared as an <emphasis>optional</emphasis> dependency
142-
in the Maven POM. Furthermore, it is important to note that the JUnit
143-
team has stopped inlining Hamcrest Core within the
144-
<literal>junit:junit</literal> Maven artifact as of JUnit 4.11. Thus, if
145-
your existing JUnit-based tests make use of Hamcrest matchers that were
146-
previously available directly within the <literal>junit:junit</literal>
147-
JAR, you will now need to explicitly declare a dependency on
148-
<literal>org.hamcrest:hamcrest-core</literal>,
149-
<literal>org.hamcrest:hamcrest-library</literal>, or
150-
<literal>org.hamcrest:hamcrest-all</literal>.</para>
141+
dependencies is declared as an <emphasis>optional</emphasis> dependency in
142+
the Maven POM. Furthermore, it is important to note that the JUnit team
143+
has stopped inlining Hamcrest Core within the
144+
<literal>junit:junit</literal> Maven artifact as of JUnit 4.11. Hamcrest
145+
Core is now a <emphasis>required</emphasis> transitive dependency of
146+
<literal>junit</literal>, and users may therefore need to remove any
147+
exclusions on <literal>hamcrest-core</literal> that they had previously
148+
configured for their build.</para>
151149
</section>
152150

153151
<section xml:id="migration-3.2-changes">

0 commit comments

Comments
 (0)