Browse Source

Fix node_modules pollution between builds in parallel Maven execution

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 <noreply@anthropic.com>
pull/15164/head
Sergey Matvienko 7 months ago
parent
commit
a9394b8fb6
  1. 11
      msa/js-executor/pom.xml
  2. 11
      msa/web-ui/pom.xml
  3. 11
      ui-ngx/pom.xml

11
msa/js-executor/pom.xml

@ -96,6 +96,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

11
msa/web-ui/pom.xml

@ -105,6 +105,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

11
ui-ngx/pom.xml

@ -71,6 +71,17 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
<profiles>

Loading…
Cancel
Save