From beba6931ff0ed1543fe5037564091b19c24640bd Mon Sep 17 00:00:00 2001 From: Guillaume Lethuillier Date: Tue, 12 Feb 2019 12:47:50 +0100 Subject: [PATCH 1/2] fix(build.gradle): Prevent 'The input is too long' error on Windows --- build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle b/build.gradle index b92b2d6197..4c073da0da 100644 --- a/build.gradle +++ b/build.gradle @@ -336,6 +336,9 @@ startScripts { doLast { unixScript.text = unixScript.text.replace('PANTHEON_HOME', '\$APP_HOME') windowsScript.text = windowsScript.text.replace('PANTHEON_HOME', '%~dp0..') + + // Prevent the error originating from the 8191 chars limit on Windows + windowsScript.text = windowsScript.text.replace('%CLASSPATH%', '%APP_HOME%\\lib\\*') } } From 3c37715cd86a261d19a4afda7e588950b6ae8c0f Mon Sep 17 00:00:00 2001 From: Guillaume Lethuillier Date: Wed, 13 Feb 2019 23:52:50 +0100 Subject: [PATCH 2/2] fix(build.gradle): [Windows] shorten 'set CLASSPATH=...' in generated pantheon.bat --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4c073da0da..dc82168e6e 100644 --- a/build.gradle +++ b/build.gradle @@ -333,12 +333,21 @@ run { } startScripts { + + def shortenWindowsClasspath = { line -> + line = line.replaceAll(/^set CLASSPATH=.*$/, "set CLASSPATH=%APP_HOME%/lib/*") + } + doLast { unixScript.text = unixScript.text.replace('PANTHEON_HOME', '\$APP_HOME') windowsScript.text = windowsScript.text.replace('PANTHEON_HOME', '%~dp0..') // Prevent the error originating from the 8191 chars limit on Windows - windowsScript.text = windowsScript.text.replace('%CLASSPATH%', '%APP_HOME%\\lib\\*') + windowsScript.text = + windowsScript + .readLines() + .collect(shortenWindowsClasspath) + .join('\r\n') } }