Nx
Enterprise
Nx
fix(maven): synchronize Maven adapter invoke() to prevent concurrent access Maven 4's ResidentMavenInvoker (LookupInvoker.invoke()) is not thread-safe — it snapshots/restores System.getProperties() and the thread context classloader in a finally block, and all concurrent invocations share the same resident MavenContext. The batch runner's parallel thread pool can call invoke() from multiple threads simultaneously when tasks are independent roots in the task graph, which can cause deadlocks in Maven's internal session machinery. Add @Synchronized to both Maven 3 and Maven 4 adapter invoke() methods to serialize Maven executions through the shared invoker instance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nx-cloud record -- nx sync:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx-cloud record -- nx sync:check
Click to copy
Linux
4 CPU cores
0357aaa6
34600