Index: trunk/pom.xml
===================================================================
--- trunk/pom.xml	(revision 19605)
+++ trunk/pom.xml	(revision 19608)
@@ -244,4 +244,36 @@
       </testResource>
     </testResources>
+    <pluginManagement>
+      <plugins>
+        <!-- Prevent m2e from also running checkstyle:check during its own
+             incremental/full IDE builds. Without this, m2e's background build
+             and a manually launched "mvn test" can write checkstyle-josm.xml
+             concurrently, corrupting it. -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <versionRange>[0,)</versionRange>
+                    <goals>
+                      <goal>check</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore/>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <!-- Generate sources -->
@@ -472,4 +504,7 @@
           <argLine>
             @{argLine}
+            <!-- Must be a real -D flag: as a configurationParameters entry it is set too late,
+                 after java-agents below already cached the JDK's default locale provider list. -->
+            -Djava.locale.providers=SPI,CLDR
             -javaagent:${org.jmockit:jmockit:jar}
             --add-opens java.base/java.io=ALL-UNNAMED
@@ -485,5 +520,4 @@
             <configurationParameters>
               file.encoding = UTF-8
-              java.locale.providers = SPI,CLDR
               junit.jupiter.extensions.autodetection.enabled = true
               junit.jupiter.execution.parallel.enabled = true
@@ -755,4 +789,5 @@
               <argLine>
                 @{argLine}
+                -Djava.locale.providers=SPI,CLDR
                 -javaagent:${com.ginsberg:junit5-system-exit:jar}
                 -javaagent:${org.jmockit:jmockit:jar}
