Skip to content

Understand hamcrest-core 2.x #1535

@elharo

Description

@elharo

Affected version

HEAD

Bug description

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

This one's an ugly mess. It has a purpose when present to avoid introducing a transitive dependency on hamcrest-core 1.3, which can happen with JUnit 4. However, it's just a shim that contains no classes and depends on hamcrest.

This creates one of the ugly unused when included and needed when not included warning Catch-22s.

In any case we should never report hamcrest-core 2.2 as unused. It contains nothing, causes no problems, and prevents other problems even though it contributes exactly zero classes to the classpath.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions