Created
November 20, 2016 14:05
-
-
Save guillaumegarcia13/bd9e4785e8aa158bf922de0cbf9bf504 to your computer and use it in GitHub Desktop.
Gradle on WIndows: Error 206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task bootRun206_clean(dependsOn: clean) { } | |
task bootRun206_jar(dependsOn: jar) { } | |
task bootRun206_bootRepackage(dependsOn: bootRepackage) { } | |
task bootRun206_run(type: JavaExec) { | |
description = "Circumvent the error 206 on Windows due to long command line" | |
classpath = files('build/libs/<output name>.jar') | |
classpath += sourceSets.main.runtimeClasspath | |
main = "com.example.<main class>" | |
} | |
task bootRun206(dependsOn: [bootRun206_clean, bootRun206_jar, bootRun206_bootRepackage, bootRun206_run]) { | |
description = "Circumvent the error 206 on Windows due to long command line" | |
group = "application" | |
} | |
bootRun206_jar.mustRunAfter bootRun206_clean | |
bootRun206_bootRepackage.mustRunAfter bootRun206_jar | |
bootRun206_run.mustRunAfter bootRun206_bootRepackage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gradle can reach Windows length limit on command line quite easily, resulting in a
See also: http://tuhrig.de/gradles-bootrun-and-windows-command-length-limit/ for another approach using the 'pathingJar' approach