When building projects with the Execution failed for task ':app-web-toolkit:buildWidgetSet'. > A problem occurred starting process 'command 'C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe'' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. This message doesn’t show exact reason of the problem. Open the terminal (e.g. Terminal tool window in the IntelliJ IDEA or CUBA Studio) and run command with gradlew :app-web-toolkit:buildWidgetSet --stacktrace You will get the error output ending like below: ... Caused by: java.io.IOException: Cannot run program "C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe" (in directory "C:\projects\proj\modules\web-toolkit"): CreateProcess error=206, The filename or extension is too long at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25) ... 8 more Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long ... 9 more If the error message contains "CreateProcess error=206" - it means that you meet the infamous Windows limitation - inability to create process with command line of more than 32K characters. Unfortunately, there is no possible automatic way to avoid this problem. Possible solutions for the "The filename or extension is too long" error are:
To determine actual command line length of the Java process that builds widgetset, run the following command in terminal: gradlew -i :app-web-toolkit:buildWidgetSet --stacktrace > build.log Then open created GWT Compiler args: [...] JVM Args: [...] Starting process 'command 'C:\...\bin\java.exe''. Working directory: ... Command: C:\...\java.exe <THOUSANDS OF CHARACTERS> com.company.project.web.toolkit.ui.AppWidgetSet The "Starting process …" line contains all command line with arguments, so its length is near to the actual command line length that we need to shorten. Read more about Gradle user home directory in the Gradle manual.
First you need to discover transitive dependencies of the gradlew :app-web-toolkit:dependencies > deps.log Then open created Then open the configure(webToolkitModule) { configurations.compile { // library dependencies that aren't necessary for widgetset compilation exclude group: 'org.springframework' exclude group: 'org.springframework.security.oauth' exclude group: 'org.eclipse.persistence' exclude group: 'org.codehaus.groovy' exclude group: 'org.apache.ant' exclude group: 'org.eclipse.jetty' exclude group: 'com.esotericsoftware' exclude group: 'com.googlecode.owasp-java-html-sanitizer' exclude group: 'net.sourceforge.htmlunit' // add-on dependencies that don't contain web components or widgetset // and therefore aren't necessary for widgetset compilation exclude group: 'com.haulmont.addon.restapi' exclude group: 'com.haulmont.reports' exclude group: 'com.haulmont.addon.admintools' exclude group: 'com.haulmont.addon.search' exclude group: 'com.haulmont.addon.emailtemplates' exclude group: 'de.diedavids.cuba.metadataextensions' exclude group: 'de.diedavids.cuba.instantlauncher' } // ... } The example presented above is just for reference. In your particular project you might need to exclude more libraries or add-ons. Repeat excluding more libraries until |