apache / apache/maven-dependency-analyzer

Understand hamcrest-core 2.2

Open
#251 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
43
Forks
54
Avg merge
10h 49m
Merged PRs (30d)
1

Description

### Affected version

HEAD

### Bug description

```

org.hamcrest
hamcrest-core
2.2
test

```

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies the hamcrest-core 2.2 test dependency and the unused-dependency warning as the target, but names no source file, test, or entry point. First locate the analyzer path that emits unused-dependency reports and its regression tests for dependency scopes; done means hamcrest-core 2.2 is not reported unused while ordinary unused dependencies remain covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.