[Test] GoogleCloudStorageFixture command line is too long on Windows
Windows has some strong limitations on command line arguments,
specially when it's too long. In the googlecloudstoragefixture anttask
the classpath argument is very long and the command fails. This commit
removes the classpath as an argument and uses the CLASSPATH
environment variable instead.
@@ -61,10 +61,9 @@ thirdPartyAudit.excludes = [
/** A task to start the GoogleCloudStorageFixture which emulates a Google Cloud Storage service **/
task googleCloudStorageFixture(type: AntFixture) {
dependsOn compileTestJava
+ env 'CLASSPATH', "${ -> project.sourceSets.test.runtimeClasspath.asPath }"
executable = new File(project.runtimeJavaHome, 'bin/java')
- args '-cp', "${ -> project.sourceSets.test.runtimeClasspath.asPath }",
- 'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture',
- baseDir, 'bucket_test'
+ args 'org.elasticsearch.repositories.gcs.GoogleCloudStorageFixture', baseDir, 'bucket_test'
}
/** A service account file that points to the Google Cloud Storage service emulated by the fixture **/
