Repository navigation
Conversation
CI invoked the runner's ambient `mvn`, whose version drifts with the GitHub runner images. Maven 4 is not a viable target: it requires Java 17 to run, while this portlet targets Java 11. Add the Maven Wrapper pinned to 3.9.16 (latest Java-11-compatible line) and switch CI to `./mvnw -B package` so the build uses a fixed, reproducible Maven regardless of the runner default. A repo .gitignore negation is added because a global ~/.gitignore commonly ignores .mvn. Verified locally: ./mvnw -v -> Apache Maven 3.9.16 on Java 11; ./mvnw -B package -> BUILD SUCCESS.
Contributor
Author
|
Follow-up idea (not for this PR): the wrapper pins the Maven binary per-repo, which is necessarily per-repo since the Maven version is selected before any parent POM is read. The policy could be centralized though — a |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI runs a bare
mvn -B package, so it uses whatever Maven the GitHub runner image ships — a version that drifts over time. A recent runner Maven bump has been breaking builds across the uPortal portlets. Maven 4 is not a viable target here: it requires Java 17 to run, while this portlet targets Java 11.Change
mvnw,mvnw.cmd,.mvn/wrapper/maven-wrapper.properties.mvn -B packageto./mvnw -B package..gitignorenegation so.mvn/wrapper/maven-wrapper.propertiesis tracked (a global~/.gitignorecommonly ignores.mvn).Verification
./mvnw -v→ Apache Maven 3.9.16 on Java 11../mvnw -B package→ BUILD SUCCESS locally on Java 11.Notes