Issue
-
On the server in DeveloperStudio, the test module is displayed as "Could not create output jar" and is not autodeployed.
-
Reproduction procedure:
1.DeveloperStudio installation
2.Installation of Liferay 7.1
3.In DeveloperStudio, create a gradle module
4.Create a server
5.Drag and drop gradle module to the server
6.Start server
7.Could not create output jar" error message at completion of tomcat startup
8.The test module is not auto-deployed even after modifying the source, and the test module is not found in the search on the Liferay screen.
Environment
- Developer Studio 3.5
solution
- In many cases, the root cause can be confirmed in the Eclipse error log
!ENTRY com.liferay.ide.gradle.core 4 0 2019-06-04 16:55:17.604
!MESSAGE Project test build output error
!STACK 0
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.2-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
(略)
... 3 more
Caused by: java.lang.IllegalStateException: Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_191 contains a valid JDK installation.
(略)
... 3 more
!ENTRY com.liferay.ide.server.core 4 0 2019-06-04 16:55:17.620
!MESSAGE Could not create output jar - The build fails because a JRE is used instead of a JDK.Therefore, no autodeployment is performed.
- You must set the appropriate JDK path:
→Preferences->Gladle->Java Home
→Preferences->Java->Installed JREs
→Preferences->Server->Runtime Environments->Liferay Server