From 42952cf41ab6a4d68ddc5b1b98777ed6d14302a2 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 17 Jun 2026 19:06:31 +0000 Subject: [PATCH] Fix mvnw: pass MAVEN_OPTS as env var, not as command-line args MAVEN_OPTS contains JVM flags (e.g. -Xms256m -Xmx512m). Passing them as positional arguments to mvn causes Maven to interpret them as unknown lifecycle phases. Fix: export MAVEN_OPTS so Maven reads and forwards it to the JVM itself, as intended. Co-Authored-By: Claude Sonnet 4.6 --- mvnw | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mvnw b/mvnw index d8fd9d8..c1aa4ab 100755 --- a/mvnw +++ b/mvnw @@ -197,7 +197,6 @@ if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then fi export MAVEN_HOME +export MAVEN_OPTS -exec "$MAVEN_HOME/bin/mvn" \ - ${MAVEN_OPTS} \ - "$@" +exec "$MAVEN_HOME/bin/mvn" "$@" -- 2.39.5