Skip to content

Add Maven wrapper pinned to Maven 3.9.16 - #640

Open
jwrosewell wants to merge 1 commit into
mainfrom
feature/610-maven-wrapper
Open

Add Maven wrapper pinned to Maven 3.9.16#640
jwrosewell wants to merge 1 commit into
mainfrom
feature/610-maven-wrapper

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

Problem

This repo had no committed Maven wrapper, so it could not be built on a machine without a system Maven install. Issue #610 records that during local cross-platform verification the Java examples were the only stack that could not be compiled locally, which made the nightly CI dashboard the first real compile for any change.

What was added

The standard Maven wrapper files at the repo root, generated from the official Maven Wrapper 3.3.4 distribution (script-only type, no jar committed).

  • mvnw (POSIX shell script, committed with the executable bit set)
  • mvnw.cmd (Windows script)
  • .mvn/wrapper/maven-wrapper.properties pinning Apache Maven 3.9.16 (the latest 3.9.x release, chosen because the CI scripts do not pin a Maven version themselves and rely on the runner's pre-installed Maven 3.9.x)
  • .gitattributes with two entries that keep mvnw on LF and mvnw.cmd on CRLF so both scripts run correctly whatever the checkout platform's line-ending settings are

No existing file is modified and there is no runtime behaviour change. Anyone can now build with ./mvnw (or mvnw.cmd on Windows) as a drop-in replacement for mvn.

How it was verified

On a Windows 11 machine with JDK 21 and no system Maven installed, both ./mvnw --version (Git Bash) and .\mvnw.cmd --version (Windows shell) downloaded Apache Maven 3.9.16 on first run and reported it correctly. ./mvnw -B compile -pl shared then compiled the shared module successfully (BUILD SUCCESS, classes produced under shared/target/classes). The committed blobs were checked to be stored with LF endings and mvnw is tracked with mode 100755.

Review note

This change was produced with AI assistance as part of a 5th August 2026 housekeeping sweep and needs human review before merge.

Closes #610

Adds mvnw, mvnw.cmd and .mvn/wrapper/maven-wrapper.properties (Maven
Wrapper 3.3.4, script-only type) so the examples can be built without a
system Maven install. Use ./mvnw (or mvnw.cmd on Windows) as a drop-in
replacement for mvn. A .gitattributes entry keeps mvnw on LF and
mvnw.cmd on CRLF so both scripts run correctly on any checkout.

Closes #610
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.

Add a Maven wrapper (mvnw) to the Java example repos so they build without a system Maven

1 participant