I can't auto-deploy in DeveloperStudio


  • On the server in DeveloperStudio, the test module displays "Could not create output jar" and is not auto-deployed.

  • Reproduction procedure:
    1.Installing DeveloperStudio
    2.Installation of Liferay 7.1
    3.Create a gradle module in DeveloperStudio
    4.Create the server
    5.Drag and drop the gradle module to the server
    6.Start the server
    7.Could not create output jar" error is displayed when tomcat startup is completed
    8.The test module is not auto-deployed even if the source is modified, and the test module is not hit by the search in Liferay screen.


  • Developer Studio 3.5


  • 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, auto-deploy will not be performed either
  • You need to set the proper JDK path:
    →Preferences->Gladle->Java Home
    → Preferences->Java->Installed JREs
    →Preferences->Server->Runtime Environments->Liferay Server
0 人中有 0 人觉得有帮助