From d4709afd8186a478550af81f9b32aee3320987f6 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Wed, 29 Apr 2026 10:01:57 -0400 Subject: [PATCH] Use `${maven.multiModuleProjectDirectory}/spotless.xml.prefs` for robust resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The relative `./spotless.xml.prefs` path resolves correctly when Maven is invoked from the multi-module root, but can fail when invoked from elsewhere (e.g., a submodule's `basedir`, an IDE's per-module run, or nested Maven invocations). Switching to the `${maven.multiModuleProjectDirectory}` property — which always points at the directory containing the parent `pom.xml` — makes resolution robust regardless of invocation context. Verified `mvn spotless:check` and `mvn -pl ml/com.ibm.wala.cast.python.ml spotless:check` both succeed after the change. Co-Authored-By: Claude Opus 4.7 (1M context) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1aa7c1a40..ccb3f7dbe 100644 --- a/pom.xml +++ b/pom.xml @@ -230,7 +230,7 @@ XML - ./spotless.xml.prefs + ${maven.multiModuleProjectDirectory}/spotless.xml.prefs