Skip to content

Fix the container build (Maven download) for v0.2.0 - #77

Merged
an1ndra merged 1 commit into
mainfrom
Develop
Nov 17, 2026
Merged

an1ndra merged 1 commit into
mainfrom
Develop

Conversation

@an1ndra

@an1ndra an1ndra commented Nov 17, 2026

Copy link
Copy Markdown
Owner

The v0.2.0 release failed at the container step:

Error: Failed to validate Maven distribution SHA-256, your Maven distribution
might be compromised.
process "chmod +x mvnw && ./mvnw -B -q -DskipTests dependency:go-offline" exit code 1

The pin is correct — the same URL hashes to 9c1ef917... locally, and the wrapper downloads and verifies it with a clean $HOME. What differs is the image: the wrapper shells out to curl/wget/unzip, which eclipse-temurin does not fully ship, so it produced a file that failed the checksum.

The build stage now installs those tools and fetches Maven with an explicit sha256sum -c against the pin in .mvn/wrapper/maven-wrapper.properties. That keeps one source of truth, removes the wrapper's shell logic from the image, and fails with a usable message if the pin is ever wrong.

Verified the exact RUN body locally: download, checksum OK, unpack, mvn -v reports 3.10.1 from /opt/apache-maven-3.10.1.

What does this change?

Checklist

  • ./mvnw verify passes locally
  • python3 tools/smoke_test.py passes against tools/mock-upstream.py
  • New behaviour is covered by a test (unit or smoke)
  • The matching file in docs/ updated if an endpoint, config key or field changed
  • No credentials, .env files or data/ contents included

The v0.2.0 release failed at the container step:

  Error: Failed to validate Maven distribution SHA-256, your Maven distribution
  might be compromised.
  process "chmod +x mvnw && ./mvnw -B -q -DskipTests dependency:go-offline" exit code 1

The pin is correct — the same URL hashes to 9c1ef917... locally, and the wrapper
downloads and verifies it with a clean $HOME. What differs is the image: the wrapper
shells out to curl/wget/unzip, which eclipse-temurin does not fully ship, so it produced
a file that failed the checksum.

The build stage now installs those tools and fetches Maven with an explicit
sha256sum -c against the pin in .mvn/wrapper/maven-wrapper.properties. That keeps one
source of truth, removes the wrapper's shell logic from the image, and fails with a
usable message if the pin is ever wrong.

Verified the exact RUN body locally: download, checksum OK, unpack, mvn -v reports
3.10.1 from /opt/apache-maven-3.10.1.
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@an1ndra
an1ndra merged commit d00c1ba into main Nov 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant