From 26217e5cd830c56ee6f3bcc2789a1775b4740aa8 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Wed, 4 Jan 2017 11:44:24 +0000 Subject: [PATCH 1/3] Added a fix for the windows specific command line too long error when running the IRS demo. --- samples/irs-demo/build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 85d30012fb..96b3404b09 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -101,6 +101,16 @@ task integrationTest(type: Test, dependsOn: []) { classpath = sourceSets.integrationTest.runtimeClasspath } +// This fixes the "line too long" error when running this demo with windows CLI +// TODO: Automatically apply to all projects via a plugin +tasks.withType(CreateStartScripts).each { task -> + task.doLast { + String text = task.windowsScript.text + text = text.replaceFirst(/(set CLASSPATH=%APP_HOME%\\lib\\).*/, { "${it[1]}*" }) + task.windowsScript.write text + } +} + idea { module { downloadJavadoc = true // defaults to false From 0fb77f9fa24d54dfceb95d13aaa511241bede549 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Wed, 4 Jan 2017 16:57:47 +0000 Subject: [PATCH 2/3] Added comment explaining fix to IRS demo on windows. --- samples/irs-demo/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 96b3404b09..42c4476c8c 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -106,6 +106,7 @@ task integrationTest(type: Test, dependsOn: []) { tasks.withType(CreateStartScripts).each { task -> task.doLast { String text = task.windowsScript.text + // Replaces the per file classpath (which are all jars in "lib" with a wildcard on lib text = text.replaceFirst(/(set CLASSPATH=%APP_HOME%\\lib\\).*/, { "${it[1]}*" }) task.windowsScript.write text } From 3151586d5415fe90dfdf9c4661d625c1cf979e9f Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Wed, 4 Jan 2017 16:58:32 +0000 Subject: [PATCH 3/3] Spelling fix. --- samples/irs-demo/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 42c4476c8c..bb0f50f518 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -106,7 +106,7 @@ task integrationTest(type: Test, dependsOn: []) { tasks.withType(CreateStartScripts).each { task -> task.doLast { String text = task.windowsScript.text - // Replaces the per file classpath (which are all jars in "lib" with a wildcard on lib + // Replaces the per file classpath (which are all jars in "lib") with a wildcard on lib text = text.replaceFirst(/(set CLASSPATH=%APP_HOME%\\lib\\).*/, { "${it[1]}*" }) task.windowsScript.write text }