Gradle Version: 3.1
BuildShip Version: 1.0.21.v20161010-1637
JVM: 1.7.0_79 (Oracle Corporation 24.79-b02)
OS: Windows 8.1 6.3 amd64Is this a regression? No
When I execute the “build” task for my Gradle project via the Gradle Tasks view, the task runs successfully with the expected Java Home value:
Working Directory: D:\DEV\workspaces\SpringBoot\OIService
Gradle User Home: D:\DEV\gradle_user_home
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 3.1
Java Home: D:\DEV\jdk1.7.0_79
JVM Arguments: None
Program Arguments: None
Gradle Tasks: build
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build
:OIServiceClient:processResources
:OIServiceClient:generateJsonSchema2Pojo
:OIServiceClient:compileJava
:OIServiceClient:classes
:OIServiceClient:jar
:OIServiceClient:sourceJar
:OIServiceClient:assemble
:OIServiceClient:compileTestJava UP-TO-DATE
:OIServiceClient:processTestResources UP-TO-DATE
:OIServiceClient:testClasses UP-TO-DATE
:OIServiceClient:test UP-TO-DATE
:OIServiceClient:check UP-TO-DATE
:OIServiceClient:build
BUILD SUCCESSFUL
Total time: 0.65 secs
Execution of the “assemble” task fails, due to a different, unexpected value for the Java Home being used:
Working Directory: D:\DEV\workspaces\SpringBoot\OIService
Gradle User Home: D:\DEV\gradle_user_home
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 3.1
Java Home: C:\Program Files\Java\jre7
JVM Arguments: None
Program Arguments: None
Gradle Tasks: assemble
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:assemble
:OIServiceClient:processResources
:OIServiceClient:generateJsonSchema2Pojo
:OIServiceClient:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':OIServiceClient:compileJava'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre7 contains a valid JDK installation.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.508 secs
The “assemble” task seems to be the only one that exhibits this behavior.
I’ve verified that the “jdk1.7.0_79” is configured as the default Installed JRE, and that the JavaSE-1.7 execution environment has been configured to specify the “jdk1.7.0_79” JDK.
Thanks,
Tony