apache / apache/maven-artifact-plugin

check-buildplan: fail flag overwritten by checkVersionRangeInDependencies

Open Beginner friendly
#241 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14
Forks
23
Avg merge
1h 27m
Merged PRs (30d)
8

Description

The `fail` flag in `CheckBuildPlanMojo.execute()` is overwritten at the end, defeating the fail-fast check for non-reproducible plugins.

In `CheckBuildPlanMojo.java`:
- `fail` is set to `true` when a `fail:` (line 145) or too-old plugin (line 158) is found.
- Line 173 then unconditionally clobbers it:

```java
fail = checkVersionRangeInDependencies();
```

If the execution plan contains a non-reproducible plugin but the module has no version-range dependencies, the build will **not** fail even with `check.failOnNonReproducible=true`, silently ignoring the plugin issue.

Suggested fix: `fail = fail || checkVersionRangeInDependencies();`

Contributor guide

No contributing guide indexed for this repository

Research direction

Open CheckBuildPlanMojo.java and start in CheckBuildPlanMojo.execute(), tracing how fail is set before checkVersionRangeInDependencies(). Preserve an earlier failure while incorporating the dependency check result, then run the relevant project tests. Done means non-reproducible plugins still fail the build when check.failOnNonReproducible=true, including when no version-range dependencies exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.