Description
JVM version (java -version
): 1.8.0_172 (runtime)/10.0.1 (compile)
OS version: Windows 10 64bit
Description of the problem including expected versus actual behavior:
Running gradle check
on master will fail with ClassNotFoundException: org/elasticsearch/test/NamingConventionsCheck
in the namingConventions
task. Digging into this it seems that it's related to the gradle user home folder residing on a path that has a whitespace in it (below is a snippet from the error with each path on a separate line for better readibility):
> Process '
C:\Java\jdk1.8.0_172\bin\java -Djna.nosys=true
-cp
C:\Users\Andrei%20Stefan\.gradle\caches\jars-3\906aad01a823bc489ba5ed9b3d3dd164\buildSrc-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\server\build\classes\java\main;
W:\Eclipse_workspace_mine\elasticsearch\server\build\resources\main;
W:\Eclipse_workspace_mine\elasticsearch\libs\x-content\build\distributions\elasticsearch-x-content-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\test\framework\build\distributions\framework-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\libs\cli\build\distributions\elasticsearch-cli-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\libs\nio\build\distributions\elasticsearch-nio-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\libs\core\build\distributions\elasticsearch-core-7.0.0-alpha1-SNAPSHOT.jar;
W:\Eclipse_workspace_mine\elasticsearch\libs\secure-sm\build\distributions\elasticsearch-secure-sm-7.0.0-alpha1-SNAPSHOT.jar;
C:\Users\Andrei Stefan\.gradle\caches\modules-2\files-2.1\org.apache.lucene\lucene-core\7.4.0\730d9ac80436c8cbc0b2a8a749259be536b97316\lucene-core-7.4.0.jar;
C:\Users\Andrei Stefan\.gradle\caches\modules-2\files-2.1\org.apache.lucene\lucene-analyzers-common\7.4.0\e1afb580df500626a1c695e0fc9a7e8a8f58bcac\lucene-analyzers-common-7.4.0.jar;
.....
C:\Users\Andrei Stefan\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpasyncclient\4.1.2\95aa3e6fb520191a0970a73cf09f62948ee614be\httpasyncclient-4.1.2.jar;
C:\Users\Andrei Stefan\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore-nio\4.4.5\f4be009e7505f6ceddf21e7960c759f413f15056\httpcore-nio-4.4.5.jar;
W:\Eclipse_workspace_mine\elasticsearch\server\build\classes\java\test;
W:\Eclipse_workspace_mine\elasticsearch\server\build\resources\test
org.elasticsearch.test.NamingConventionsCheck --test-class org.apache.lucene.util.LuceneTestCase --integ-test-class org.elasticsearch.test.ESIntegTestCase -- W:\Eclipse_workspace_mine\elasticsearch\server\build\classes\java\test' finished with non-zero exit value 1
The first jar put on the classpath has a %20
instead of a whitespace in the path, while the other jars put in the classpath afterwards, have the correct path naming. Setting GRADLE_USER_HOME to something that has no whitespaces on the path fixed the issue. That first jar from the classpath is also the one that should have the missing class, thus the complaint.