title: Execution failed for task ':compileJava'
body: <p>I am trying to build a Spring cloud application that provides details of a Customer and the order history he/she has made in the past via gradle. When I am executing the build and clean task, I am unable to obtain the target jar file because of this error.</p>
  
  <p>Execution failed for task ':compileJava'.</p>
  
  <p>This is the message shown in the ExceptionStackTrace of the error log.</p>
  
  <pre><code>org.gradle.tooling.BuildException: Could not execute build using Gradle installation 'C:\gradle\gradle-3.4.1'.
  at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
  at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
  at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
  at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
  </code></pre>
  
  <p>Below is my build.gradle file.</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '1.5.2.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  apply plugin: 'java'
  
  apply plugin: 'eclipse'
  apply plugin: 'org.springframework.boot'
  
  jar {
      baseName = 'yBayApplication'
      version = '0.0.1-SNAPSHOT'
  }
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  repositories {
      mavenCentral()
      maven { url "https://repo.spring.io/snapshot" }
      maven { url "https://repo.spring.io/milestone" }
  }
  
  
  dependencies {
      compile('org.springframework.cloud:spring-cloud-starter-turbine:1.2.3.RELEASE')
      compile('org.springframework.boot:spring-boot-starter-actuator')
      compile('org.springframework.cloud:spring-cloud-starter-hystrix-dashboard')
      compile('org.springframework.cloud:spring-cloud-starter-hystrix')
      compile('org.springframework.cloud:spring-cloud-starter-feign')
      compile('org.springframework.cloud:spring-cloud-starter-eureka:1.2.3.RELEASE')  
      compile('org.springframework.cloud:spring-cloud-starter-ribbon')
      compile('org.springframework.boot:spring-boot-starter-web')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  }
  
  dependencyManagement {
      imports {
          mavenBom "org.springframework.cloud:spring-cloud-dependencies:Brixton.BUILD-SNAPSHOT"
      }
  }
  
  
  eclipse {
      classpath {
           containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
           containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
      }
  }
  </code></pre>
  
  <p>I have checked the Java version which gradle uses and it points to the right directory <code>C:\Program Files (x86)\Java\jdk1.8.0_121</code> and I have also included the <code>gradle.properties</code> file in the project to be double sure that it fetches only the <code>Java_home</code> properties</p>
  
  <p>gradle.properties</p>
  
  <pre><code>org.gradle.java.home=C:\Program Files (x86)\Java\jdk1.8.0_121
  </code></pre>
  
  <p>I had also changed the <code>eclipse.ini</code> file by adding the following lines.</p>
  
  <pre><code>-vm
  C:\Program Files (x86)\Java\jdk1.8.0_121\bin\javaw.exe
  </code></pre>
  
  <p>Still I find that the gradle build is failing. </p>
  
  <p>What am I doing wrong?</p>