diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java b/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java index 5c8336f6b5b..93e41568ee3 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchJavaPlugin.java @@ -254,6 +254,7 @@ public class ElasticsearchJavaPlugin implements Plugin { test.systemProperty("java.locale.providers", "SPI,JRE"); } else { test.systemProperty("java.locale.providers", "SPI,COMPAT"); + test.jvmArgs("--illegal-access=warn"); } }); @@ -272,7 +273,6 @@ public class ElasticsearchJavaPlugin implements Plugin { test.jvmArgs( "-Xmx" + System.getProperty("tests.heap.size", "512m"), "-Xms" + System.getProperty("tests.heap.size", "512m"), - "--illegal-access=warn", "-XX:+HeapDumpOnOutOfMemoryError" );