Skip to content

Commit

Permalink
Upgrade to Hamcrest 2.1, switch to hamcrest artifact from -core and -…
Browse files Browse the repository at this point in the history
…library

Closes spring-projectsgh-15555
  • Loading branch information
wilkinsona committed May 22, 2019
1 parent f1dd973 commit 23f803c
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
Expand Down
6 changes: 6 additions & 0 deletions spring-boot-project/spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,12 @@
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
Expand Down
6 changes: 6 additions & 0 deletions spring-boot-project/spring-boot-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public void resolveShorthandArtifactWithDependencies() throws Exception {
public void resolveMultipleArtifacts() throws Exception {
List<File> resolved = this.resolver.resolve(Arrays.asList("junit:junit:4.11",
"commons-logging:commons-logging:1.1.3"));
assertThat(resolved).hasSize(3);
assertThat(resolved).hasSize(4);
assertThat(getNames(resolved)).containsOnly("junit-4.11.jar",
"commons-logging-1.1.3.jar", "hamcrest-core-1.3.jar");
"commons-logging-1.1.3.jar", "hamcrest-core-2.1.jar", "hamcrest-2.1.jar");
}

public Set<String> getNames(Collection<File> files) {
Expand Down
7 changes: 6 additions & 1 deletion spring-boot-project/spring-boot-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<groovy.version>2.5.7</groovy.version>
<gson.version>2.8.5</gson.version>
<h2.version>1.4.199</h2.version>
<hamcrest.version>1.3</hamcrest.version>
<hamcrest.version>2.1</hamcrest.version>
<hazelcast.version>3.12</hazelcast.version>
<hazelcast-hibernate5.version>1.3.2</hazelcast-hibernate5.version>
<hibernate.version>5.4.2.Final</hibernate.version>
Expand Down Expand Up @@ -2245,6 +2245,11 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
Expand Down
16 changes: 15 additions & 1 deletion spring-boot-project/spring-boot-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -401,6 +409,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -660,7 +674,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
9 changes: 8 additions & 1 deletion spring-boot-project/spring-boot-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand All @@ -264,7 +270,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -583,6 +589,7 @@
<bannedDependencies>
<excludes>
<exclude>com.zaxxer:HikariCP-*</exclude>
<exclude>org.hamcrest:hamcrest-*</exclude>
<exclude>javax.*:*:*</exclude>
</excludes>
<includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,22 @@
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand All @@ -57,11 +69,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand Down
12 changes: 12 additions & 0 deletions spring-boot-project/spring-boot-test-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -367,6 +375,10 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down
13 changes: 7 additions & 6 deletions spring-boot-project/spring-boot-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand All @@ -67,12 +73,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down Expand Up @@ -118,6 +114,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test -->
<dependency>
Expand Down
8 changes: 7 additions & 1 deletion spring-boot-project/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -210,7 +216,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down

0 comments on commit 23f803c

Please sign in to comment.