Hamcrest Core

org.hamcrest : hamcrest-core

Core Hamcrest API - deprecated, please use "hamcrest" instead

[Website] ·
2k usages
· 1.9k stars

Add dependency in Maven / Gradle

<dependency>
    <groupId>org.hamcrest</groupId>
    <artifactId>hamcrest-core</artifactId>
    <version>2.2</version>
</dependency>

How to add dependency in a project

  1. Add dependency to a Maven project
  2. Add dependency to a Gradle project
  3. Add dependency to a SBT Scala project
  4. Add dependency to a Grape project

1. Add dependency to a Maven project

Maven: Add the org.hamcrest:hamcrest-core library to the dependencies element of your pom.xml file:

<dependencies>
<dependency>
  <groupId>org.hamcrest</groupId>
  <artifactId>hamcrest-core</artifactId>
  <version>2.2</version>
</dependency>
</dependencies>

To install org.hamcrest:hamcrest-core library use the following command:

mvn install

2. Add dependency to a Gradle project

Gradle Groovy DSL: Add the org.hamcrest:hamcrest-core library to the dependencies section of your build.gradle file:

dependencies {
implementation 'org.hamcrest:hamcrest-core:2.2'
}

Gradle Kotlin DSL: Add the org.hamcrest:hamcrest-core library to the dependencies section of your build.gradle.kts file:

dependencies {
implementation("org.hamcrest:hamcrest-core:2.2")
}

3. Add dependency to a SBT Scala project

Scala: Add the org.hamcrest:hamcrest-core library to your build.sbt file:

libraryDependencies += "org.hamcrest" % "hamcrest-core" % "2.2"

4. Add dependency to a Grape project

Grape: Add an annotation org.hamcrest:hamcrest-core library to your groovy script file:

@Grapes(
    @Grab('org.hamcrest:hamcrest-core:2.2')
)

Compile Dependencies (1)

Group / Artifact Usage
org.hamcrest » hamcrest 1,205

Provided Dependencies (0)

Group / Artifact Usage

Test Dependencies (0)

Group / Artifact Usage