Skip to content

"make build" is no-op in CI, pmdTest has never run #821

Description

@corioliskraft

Description

"make build" silently does nothing in CI. As a result, "pmdTest" has never been executed, and 12 PMD violations have accumulated unnoticed in "core/src/test/".

Also, a fresh clone fails on "./gradlew build", although main is green.

Cause

Makefile declares no ".PHONY" targets, so make considers "build" as a filename. Gradle creates a "build/" directory in the root, and after that make considers the target up to date and skips the job.

Steps to reproduce

In CI:

"make build" never executes. The first step creates "build/" (s. ci.yaml:28: "./gradlew spotlessCheck"), therefore by the time when "make build" runs (ci.yaml:37) it is always skipped.

Here is an example for run 31109589148 (s. https://github.com/stackitcloud/stackit-sdk-java/actions/runs/31109589148 , main @ bd7536b)
CI (21) 2026-08-06T14:17:53.3743488Z make: 'build' is up to date.
CI (17) 2026-08-06T14:18:17.5627663Z make: 'build' is up to date.
CI (25) 2026-08-06T14:17:41.5112488Z make: 'build' is up to date.

Locally:

"./gradlew build" : fails on core:pmdTest, and creates "build/"
make build : does nothing with a message "make: `build' is up to date."
rm -rf build && make build : runs again, fails on core:pmdTest

Actual behavior

By coincident, only pmdTest is affected, all other actions that build would do are already covered with other steps (fmt, lint, test and install).

There are three types of violations:
ReplaceJavaUtilDate - 9 cases
CloseResource - 2 cases
FieldNamingConventions - 1 case

All of them can be fixed without changing the public API and without suppressing the rules.

Expected behavior / proposal to fix

Add .PHONY: build fmt lint test install

It makes sense to add all five steps to avoid similar issues in future, for example with a directory "test".

Important: this fix will make main red, therefore 12 violations should be fixed first.

I can do both fixes.

Environment

  • OS: Sequoia 15.7.7
  • Java version: 25.0.1, zulu 1.8.0_502-b07 (8.96.0.19-CA-macos-aarch64)
  • Gradle 9.6.1
  • main @ bd7536b

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