From a9394b8fb6751f4850f2019740069b244e74edc1 Mon Sep 17 00:00:00 2001 From: Sergey Matvienko Date: Fri, 6 Mar 2026 00:19:58 +0100 Subject: [PATCH] Fix node_modules pollution between builds in parallel Maven execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building with -T6, multiple JS modules run yarn install concurrently. The --mutex network flag serializes yarn processes, but if node_modules from a previous build (or a different branch/version) is left on disk, yarn may skip reinstalling packages — including devDependencies — treating the stale state as up-to-date. This causes tools like tsc to be missing at build time. Configure maven-clean-plugin to delete node_modules during mvn clean for all JS modules (ui-ngx, msa/js-executor, msa/web-ui). Yarn restores from its global cache (~/.cache/yarn), so the overhead is relinking only. Co-Authored-By: Claude Sonnet 4.6 --- msa/js-executor/pom.xml | 11 +++++++++++ msa/web-ui/pom.xml | 11 +++++++++++ ui-ngx/pom.xml | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/msa/js-executor/pom.xml b/msa/js-executor/pom.xml index 38cb484aee..b333349bd3 100644 --- a/msa/js-executor/pom.xml +++ b/msa/js-executor/pom.xml @@ -96,6 +96,17 @@ + + org.apache.maven.plugins + maven-clean-plugin + + + + ${basedir}/node_modules + + + + org.apache.maven.plugins maven-dependency-plugin diff --git a/msa/web-ui/pom.xml b/msa/web-ui/pom.xml index d1664b1311..93a56957dc 100644 --- a/msa/web-ui/pom.xml +++ b/msa/web-ui/pom.xml @@ -105,6 +105,17 @@ + + org.apache.maven.plugins + maven-clean-plugin + + + + ${basedir}/node_modules + + + + org.apache.maven.plugins maven-dependency-plugin diff --git a/ui-ngx/pom.xml b/ui-ngx/pom.xml index 389177c028..e971854fb4 100644 --- a/ui-ngx/pom.xml +++ b/ui-ngx/pom.xml @@ -71,6 +71,17 @@ + + org.apache.maven.plugins + maven-clean-plugin + + + + ${basedir}/node_modules + + + +