From 3f9ed9d28bde2006c5bb78acaee118a20a2ce751 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Tue, 7 Jul 2026 13:48:10 -0400 Subject: [PATCH] docs: document Maven Wrapper caching and generated interactiveMode - README: note that cache: 'maven' also caches/restores the Maven Wrapper distribution (~/.m2/wrapper/dists), not just the local repository. - advanced-usage: note that the generated settings.xml sets interactiveMode=false for non-interactive CI runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- README.md | 2 ++ docs/advanced-usage.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index d11e1855..fa3f8394 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,8 @@ The workflow output `cache-hit` is set to indicate if an exact match was found f The cache input is optional, and caching is turned off by default. +**Maven Wrapper:** when `cache: 'maven'` is enabled, the action also caches and restores the Maven Wrapper distribution downloaded to `~/.m2/wrapper/dists` (in addition to the local repository), so wrapper-based (`./mvnw`) builds don't re-download the wrapper on every run. This is keyed on `**/.mvn/wrapper/maven-wrapper.properties` as shown above. + #### Caching gradle dependencies ```yaml steps: diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 3f25fc37..16ae592d 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -516,6 +516,8 @@ The two `settings.xml` files created from the above example look like the follow ***NOTE***: The `settings.xml` file is created in the Actions `$HOME/.m2` directory. If you have an existing `settings.xml` file at that location, it will be overwritten. See [below](#apache-maven-with-a-settings-path) for using the `settings-path` to change your `settings.xml` file location. +***NOTE***: The generated `settings.xml` sets `false` so that Maven never blocks a CI run waiting on an interactive prompt. This is applied automatically whenever the action generates `settings.xml`. + If you don't want to overwrite the `settings.xml` file, you can set `overwrite-settings: false` ### Extra setup for pom.xml: