diff options
39 files changed, 44 insertions, 121 deletions
diff --git a/abi-check-plugin/pom.xml b/abi-check-plugin/pom.xml index 7f77dec7523..a0a1c52428d 100644 --- a/abi-check-plugin/pom.xml +++ b/abi-check-plugin/pom.xml @@ -45,7 +45,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/application/pom.xml b/application/pom.xml index 6e5c6426220..bb1ea4b30ee 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -117,11 +117,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/cloud-tenant-base-dependencies-enforcer/pom.xml b/cloud-tenant-base-dependencies-enforcer/pom.xml index a13d094d19c..1b39095bc55 100644 --- a/cloud-tenant-base-dependencies-enforcer/pom.xml +++ b/cloud-tenant-base-dependencies-enforcer/pom.xml @@ -185,6 +185,7 @@ <include>org.eclipse.jetty:jetty-servlet:${jetty.vespa.version}:test</include> <include>org.eclipse.jetty:jetty-util:${jetty.vespa.version}:test</include> + <include>org.hamcrest:hamcrest:${hamcrest.vespa.version}:test</include> <include>org.hamcrest:hamcrest-core:${hamcrest.vespa.version}:test</include> <include>org.hdrhistogram:HdrHistogram:${hdrhistogram.vespa.version}:test</include> <include>org.json:json:${org.json.vespa.version}:test</include> diff --git a/clustercontroller-core/pom.xml b/clustercontroller-core/pom.xml index 6fc29fc811c..2f5b95b1ce1 100644 --- a/clustercontroller-core/pom.xml +++ b/clustercontroller-core/pom.xml @@ -43,7 +43,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownTest.java index 0f9fad2c76c..fafdbbaa121 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownTest.java @@ -18,7 +18,7 @@ import static com.yahoo.vespa.clustercontroller.core.matchers.EventForNode.event import static com.yahoo.vespa.clustercontroller.core.matchers.NodeEventWithDescription.nodeEventWithDescription; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.AllOf.allOf; -import static org.hamcrest.core.IsCollectionContaining.hasItem; +import static org.hamcrest.core.IsIterableContaining.hasItem; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/ClusterEventWithDescription.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/ClusterEventWithDescription.java index 9dc2fd97718..baaeeccf12c 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/ClusterEventWithDescription.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/ClusterEventWithDescription.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.core.ClusterEvent; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; public class ClusterEventWithDescription extends BaseMatcher<ClusterEvent> { private final String expected; @@ -35,7 +34,6 @@ public class ClusterEventWithDescription extends BaseMatcher<ClusterEvent> { description.appendText(String.format("got description '%s'", other.getDescription())); } - @Factory public static ClusterEventWithDescription clusterEventWithDescription(String description) { return new ClusterEventWithDescription(description); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventForNode.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventForNode.java index 8ce0b52ee8b..55be4dbd709 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventForNode.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventForNode.java @@ -5,7 +5,6 @@ import com.yahoo.vdslib.state.Node; import com.yahoo.vespa.clustercontroller.core.NodeEvent; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; public class EventForNode extends BaseMatcher<NodeEvent> { private final Node expected; @@ -30,7 +29,6 @@ public class EventForNode extends BaseMatcher<NodeEvent> { description.appendText(String.format("got node %s", other.getNode().getNode())); } - @Factory public static EventForNode eventForNode(Node expected) { return new EventForNode(expected); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTimeIs.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTimeIs.java index 42a89b301fe..bcc02e1f4db 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTimeIs.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTimeIs.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.core.Event; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; public class EventTimeIs extends BaseMatcher<Event> { private final long expected; @@ -32,7 +31,6 @@ public class EventTimeIs extends BaseMatcher<Event> { description.appendText(String.format("event time is %d", other.getTimeMs())); } - @Factory public static EventTimeIs eventTimeIs(long time) { return new EventTimeIs(time); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTypeIs.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTypeIs.java index 59a532763b0..228723e2fef 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTypeIs.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/EventTypeIs.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.core.NodeEvent; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; public class EventTypeIs extends BaseMatcher<NodeEvent> { private final NodeEvent.Type expected; @@ -32,7 +31,6 @@ public class EventTypeIs extends BaseMatcher<NodeEvent> { description.appendText(String.format("got description '%s'", other.getDescription())); } - @Factory public static EventTypeIs eventTypeIs(NodeEvent.Type type) { return new EventTypeIs(type); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasMetricContext.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasMetricContext.java index 92123752465..95a1d9f1a28 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasMetricContext.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasMetricContext.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.utils.util.MetricReporter; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; import java.util.Map; import java.util.TreeMap; @@ -64,7 +63,6 @@ public class HasMetricContext extends BaseMatcher<MetricReporter.Context> { return new Dimension(name, value); } - @Factory public static HasMetricContext hasMetricContext(Dimension... dimensions) { return new HasMetricContext(Stream.of(dimensions).collect(Collectors.toMap(dim -> dim.name, dim -> dim.value))); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasStateReasonForNode.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasStateReasonForNode.java index 72f51e21c5a..bf87f58692b 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasStateReasonForNode.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/HasStateReasonForNode.java @@ -5,7 +5,6 @@ import com.yahoo.vdslib.state.Node; import com.yahoo.vespa.clustercontroller.core.NodeStateReason; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; import java.util.Map; @@ -42,7 +41,6 @@ public class HasStateReasonForNode extends BaseMatcher<Map<Node, NodeStateReason } } - @Factory public static HasStateReasonForNode hasStateReasonForNode(Node node, NodeStateReason reason) { return new HasStateReasonForNode(node, reason); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventForBucketSpace.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventForBucketSpace.java index e479e031f10..9951bf50f5c 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventForBucketSpace.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventForBucketSpace.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.core.NodeEvent; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; import java.util.Optional; @@ -34,12 +33,10 @@ public class NodeEventForBucketSpace extends BaseMatcher<NodeEvent> { description.appendText(String.format("got bucket space '%s'", other.getBucketSpace().orElse("null"))); } - @Factory public static NodeEventForBucketSpace nodeEventForBucketSpace(String bucketSpace) { return new NodeEventForBucketSpace(Optional.of(bucketSpace)); } - @Factory public static NodeEventForBucketSpace nodeEventForBaseline() { return new NodeEventForBucketSpace(Optional.empty()); } diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventWithDescription.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventWithDescription.java index b070fa27817..ca5720797e2 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventWithDescription.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/matchers/NodeEventWithDescription.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.clustercontroller.core.matchers; import com.yahoo.vespa.clustercontroller.core.NodeEvent; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; public class NodeEventWithDescription extends BaseMatcher<NodeEvent> { private final String expected; @@ -35,7 +34,6 @@ public class NodeEventWithDescription extends BaseMatcher<NodeEvent> { description.appendText(String.format("got description '%s'", other.getDescription())); } - @Factory public static NodeEventWithDescription nodeEventWithDescription(String description) { return new NodeEventWithDescription(description); } diff --git a/clustercontroller-reindexer/pom.xml b/clustercontroller-reindexer/pom.xml index c94b5b134fe..67321197607 100644 --- a/clustercontroller-reindexer/pom.xml +++ b/clustercontroller-reindexer/pom.xml @@ -58,11 +58,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/config-model/pom.xml b/config-model/pom.xml index bd1e068b61a..7c6fb610bae 100644 --- a/config-model/pom.xml +++ b/config-model/pom.xml @@ -32,7 +32,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/config-provisioning/pom.xml b/config-provisioning/pom.xml index e405f1192b1..9b10fedd79b 100644 --- a/config-provisioning/pom.xml +++ b/config-provisioning/pom.xml @@ -64,11 +64,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/config/pom.xml b/config/pom.xml index ae80d00923b..9f3ec28b54b 100755 --- a/config/pom.xml +++ b/config/pom.xml @@ -76,7 +76,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/configserver-flags/pom.xml b/configserver-flags/pom.xml index e9c0c68685c..63525805669 100644 --- a/configserver-flags/pom.xml +++ b/configserver-flags/pom.xml @@ -91,11 +91,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/configserver/pom.xml b/configserver/pom.xml index 7c94464864c..ece1e497d44 100644 --- a/configserver/pom.xml +++ b/configserver/pom.xml @@ -86,7 +86,7 @@ <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/container-core/pom.xml b/container-core/pom.xml index eec8b60077b..b3794142d0e 100644 --- a/container-core/pom.xml +++ b/container-core/pom.xml @@ -395,13 +395,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.cthul</groupId> - <artifactId>cthul-matchers</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/container-core/src/test/java/com/yahoo/container/logging/CircularArrayAccessLogKeeperTest.java b/container-core/src/test/java/com/yahoo/container/logging/CircularArrayAccessLogKeeperTest.java index f942ee588be..01bbe0d009c 100644 --- a/container-core/src/test/java/com/yahoo/container/logging/CircularArrayAccessLogKeeperTest.java +++ b/container-core/src/test/java/com/yahoo/container/logging/CircularArrayAccessLogKeeperTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.hasItems; import static org.hamcrest.Matchers.contains; import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsCollectionContaining.hasItem; +import static org.hamcrest.core.IsIterableContaining.hasItem; import static org.hamcrest.core.IsNot.not; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java index ae1a6494acd..cbe21d5581b 100644 --- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java +++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerConformanceTest.java @@ -43,13 +43,12 @@ import static com.yahoo.jdisc.Response.Status.NOT_FOUND; import static com.yahoo.jdisc.Response.Status.OK; import static org.apache.http.HttpStatus.SC_INTERNAL_SERVER_ERROR; import static org.apache.http.HttpStatus.SC_NOT_FOUND; -import static org.cthul.matchers.CthulMatchers.containsPattern; -import static org.cthul.matchers.CthulMatchers.matchesPattern; import static org.hamcrest.CoreMatchers.any; import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.matchesPattern; /** * @author Simon Thoresen Hult @@ -119,8 +118,8 @@ public class HttpServerConformanceTest extends ServerProviderConformanceTest { @Override @Test public void testBindingNotFoundException() throws Throwable { - final Pattern contentPattern = Pattern.compile("No binding for URI 'http://.+/status.html'\\."); - new TestRunner().expect(errorWithReason(is(NOT_FOUND), containsPattern(contentPattern))) + final Pattern contentPattern = Pattern.compile(".*No binding for URI 'http://.+/status.html'\\."); + new TestRunner().expect(errorWithReason(is(NOT_FOUND), matchesPattern(contentPattern))) .execute(); } diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java index 6f9c854be64..97237e1c016 100644 --- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java +++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpServerTest.java @@ -84,13 +84,12 @@ import static com.yahoo.jdisc.http.server.jetty.SimpleHttpClient.ResponseValidat import static com.yahoo.jdisc.http.server.jetty.Utils.createHttp2Client; import static com.yahoo.jdisc.http.server.jetty.Utils.createSslTestDriver; import static com.yahoo.jdisc.http.server.jetty.Utils.generatePrivateKeyAndCertificate; -import static org.cthul.matchers.CthulMatchers.containsPattern; -import static org.cthul.matchers.CthulMatchers.matchesPattern; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.matchesPattern; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -143,7 +142,7 @@ public class HttpServerTest { newBindingSetSelector("unknown")); driver.client().get("/status.html") .expectStatusCode(is(NOT_FOUND)) - .expectContent(containsPattern(Pattern.compile( + .expectContent(matchesPattern(Pattern.compile(".*" + Pattern.quote(BindingSetNotFoundException.class.getName()) + ": No binding set named 'unknown'\\.\n\tat .+", Pattern.DOTALL | Pattern.MULTILINE))); diff --git a/container-dependencies-enforcer/pom.xml b/container-dependencies-enforcer/pom.xml index e633df304fa..2706b95cfb1 100644 --- a/container-dependencies-enforcer/pom.xml +++ b/container-dependencies-enforcer/pom.xml @@ -195,6 +195,7 @@ <include>org.eclipse.jetty:jetty-server:${jetty.vespa.version}:test</include> <include>org.eclipse.jetty:jetty-servlet:${jetty.vespa.version}:test</include> <include>org.eclipse.jetty:jetty-util:${jetty.vespa.version}:test</include> + <include>org.hamcrest:hamcrest:${hamcrest.vespa.version}:test</include> <include>org.hamcrest:hamcrest-core:${hamcrest.vespa.version}:test</include> <include>org.hdrhistogram:HdrHistogram:${hdrhistogram.vespa.version}:test</include> <include>org.json:json:${org.json.vespa.version}:test</include> <!-- TODO: Remove on Vespa 9 --> diff --git a/container-disc/pom.xml b/container-disc/pom.xml index 4ec141d2758..65a03b48c59 100644 --- a/container-disc/pom.xml +++ b/container-disc/pom.xml @@ -32,11 +32,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/container-search/pom.xml b/container-search/pom.xml index cea05826ce0..31ce9a00e44 100644 --- a/container-search/pom.xml +++ b/container-search/pom.xml @@ -157,11 +157,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/controller-server/pom.xml b/controller-server/pom.xml index 64cc89c3321..5e738a2dd4a 100644 --- a/controller-server/pom.xml +++ b/controller-server/pom.xml @@ -184,11 +184,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/flags/pom.xml b/flags/pom.xml index 2c736d04ccb..0bfb02b1f32 100644 --- a/flags/pom.xml +++ b/flags/pom.xml @@ -62,7 +62,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> @@ -77,11 +77,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/hosted-tenant-base/pom.xml b/hosted-tenant-base/pom.xml index e528439c1de..c2981d3d936 100644 --- a/hosted-tenant-base/pom.xml +++ b/hosted-tenant-base/pom.xml @@ -116,6 +116,13 @@ <artifactId>junit-vintage-engine</artifactId> <version>${junit.vespa.tenant.version}</version> </dependency> + + <!-- Transitive dependency of junit4 --> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-core</artifactId> + <version>${hamcrest.vespa.version}</version> + </dependency> </dependencies> </dependencyManagement> diff --git a/jdisc_core/pom.xml b/jdisc_core/pom.xml index fa9bf05fad3..4471269358a 100644 --- a/jdisc_core/pom.xml +++ b/jdisc_core/pom.xml @@ -57,11 +57,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/maven-plugins/allowed-maven-dependencies.txt b/maven-plugins/allowed-maven-dependencies.txt index 55a27588c07..e9beb4f2d40 100644 --- a/maven-plugins/allowed-maven-dependencies.txt +++ b/maven-plugins/allowed-maven-dependencies.txt @@ -71,8 +71,8 @@ junit:junit:4.13.2 net.bytebuddy:byte-buddy:1.11.19 net.bytebuddy:byte-buddy-agent:1.11.19 org.apiguardian:apiguardian-api:1.1.2 -org.hamcrest:hamcrest-all:1.3 -org.hamcrest:hamcrest-core:1.3 +org.hamcrest:hamcrest:2.2 +org.hamcrest:hamcrest-core:2.2 org.junit.jupiter:junit-jupiter:5.8.1 org.junit.jupiter:junit-jupiter-api:5.8.1 org.junit.jupiter:junit-jupiter-engine:5.8.1 diff --git a/node-admin/pom.xml b/node-admin/pom.xml index 0f153663e3d..cf45e010d14 100644 --- a/node-admin/pom.xml +++ b/node-admin/pom.xml @@ -142,11 +142,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/orchestrator/pom.xml b/orchestrator/pom.xml index 3ec98af3565..00244124add 100644 --- a/orchestrator/pom.xml +++ b/orchestrator/pom.xml @@ -129,7 +129,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/parent/pom.xml b/parent/pom.xml index 0d3690a7db6..2c4882805f0 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -922,12 +922,6 @@ <version>${bouncycastle.vespa.version}</version> </dependency> <dependency> - <groupId>org.cthul</groupId> - <artifactId>cthul-matchers</artifactId> - <version>1.0</version> - <scope>test</scope> <!-- TODO: remove scope from parent pom --> - </dependency> - <dependency> <groupId>org.eclipse.collections</groupId> <artifactId>eclipse-collections</artifactId> <version>${eclipse-collections.vespa.version}</version> @@ -1009,21 +1003,18 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <version>${hamcrest.vespa.version}</version> - <scope>test</scope> <!-- TODO: remove scope from parent pom --> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>${hamcrest.vespa.version}</version> - <scope>test</scope> <!-- TODO: remove scope from parent pom --> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-library</artifactId> <version>${hamcrest.vespa.version}</version> - <scope>test</scope> <!-- TODO: remove scope from parent pom --> </dependency> <dependency> <groupId>org.hdrhistogram</groupId> diff --git a/testutil/pom.xml b/testutil/pom.xml index f3bc9cb2212..7f57b6defee 100644 --- a/testutil/pom.xml +++ b/testutil/pom.xml @@ -13,7 +13,7 @@ <packaging>jar</packaging> <version>8-SNAPSHOT</version> <name>${project.artifactId}</name> - <description>Library of useful Hamcrest matchers.</description> + <description>Library of useful test utilities.</description> <dependencies> <dependency> <groupId>com.google.guava</groupId> @@ -34,12 +34,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>hamcrest</artifactId> <scope>compile</scope> </dependency> <dependency> diff --git a/testutil/src/main/java/com/yahoo/test/LinePatternMatcher.java b/testutil/src/main/java/com/yahoo/test/LinePatternMatcher.java index 855a0bc851e..c870c0b29b4 100644 --- a/testutil/src/main/java/com/yahoo/test/LinePatternMatcher.java +++ b/testutil/src/main/java/com/yahoo/test/LinePatternMatcher.java @@ -3,7 +3,6 @@ package com.yahoo.test; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; -import org.hamcrest.Factory; import org.hamcrest.Matcher; /** @@ -35,8 +34,7 @@ public class LinePatternMatcher extends BaseMatcher<String> { return false; } - @Factory - public static <T> Matcher<String> containsLineWithPattern(String pattern) { + public static Matcher<String> containsLineWithPattern(String pattern) { return new LinePatternMatcher(pattern); } diff --git a/vespa-athenz/pom.xml b/vespa-athenz/pom.xml index 66b369f00fe..b02fc366d07 100644 --- a/vespa-athenz/pom.xml +++ b/vespa-athenz/pom.xml @@ -118,11 +118,7 @@ </exclusion> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> diff --git a/vespa-dependencies-enforcer/allowed-maven-dependencies.txt b/vespa-dependencies-enforcer/allowed-maven-dependencies.txt index 8b0c76bf973..d2fd7c60f13 100644 --- a/vespa-dependencies-enforcer/allowed-maven-dependencies.txt +++ b/vespa-dependencies-enforcer/allowed-maven-dependencies.txt @@ -182,6 +182,8 @@ org.glassfish.jersey.ext:jersey-entity-filtering:2.25 org.glassfish.jersey.ext:jersey-proxy-client:2.25 org.glassfish.jersey.media:jersey-media-json-jackson:2.25 org.glassfish.jersey.media:jersey-media-multipart:2.25 +org.hamcrest:hamcrest:2.2 +org.hamcrest:hamcrest-core:2.2 org.hdrhistogram:HdrHistogram:2.1.12 org.iq80.snappy:snappy:0.4 org.javassist:javassist:3.20.0-GA @@ -226,10 +228,6 @@ net.bytebuddy:byte-buddy-agent:1.11.19 org.apache.curator:curator-test:5.4.0 org.assertj:assertj-core:3.11.1 org.checkerframework:checker-qual:3.30.0 -org.cthul:cthul-matchers:1.0 -org.hamcrest:hamcrest-all:1.3 -org.hamcrest:hamcrest-core:1.3 -org.hamcrest:hamcrest-library:1.3 org.junit.jupiter:junit-jupiter:5.8.1 org.junit.jupiter:junit-jupiter-params:5.8.1 org.junit.vintage:junit-vintage-engine:5.8.1 diff --git a/vespajlib/pom.xml b/vespajlib/pom.xml index 5ba7f2d2ff2..d3c9831c596 100644 --- a/vespajlib/pom.xml +++ b/vespajlib/pom.xml @@ -67,7 +67,7 @@ <!-- test scope --> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> |