Skip to content

Commit

Permalink
Gradle - Remove workaround for long paths at Windows (#9581)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvliss authored and atomfrede committed Apr 19, 2019
1 parent 744a933 commit 73e50ba
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions generators/server/templates/build.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import org.gradle.internal.os.OperatingSystem

buildscript {
repositories {
mavenLocal()
Expand Down Expand Up @@ -123,29 +121,6 @@ springBoot {
mainClassName = "<%= packageName %>.<%= mainClass %>"
}

if (OperatingSystem.current().isWindows()) {
// https://stackoverflow.com/questions/40037487/the-filename-or-extension-is-too-long-error-using-gradle
task classpathJar(type: Jar) {
dependsOn configurations.runtime
appendix = "classpath"

doFirst {
manifest {
attributes "Class-Path": configurations.runtime.files.collect {
it.toURI().toURL().toString().replaceFirst(/file:\/+/, "/").replaceAll(" ", "%20")
}.join(" ")
}
}
}

bootRun {
dependsOn classpathJar
doFirst {
classpath = files("$buildDir/classes/java/main", "$buildDir/resources/main", classpathJar.archivePath)
}
}
}

test {
exclude "**/*IT*", "**/*IntTest*", "**/*CucumberIT*"

Expand Down

3 comments on commit 73e50ba

@sometxdude
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this workaround going to be added back or replaced by something? I ask this because I am getting the long path error on Windows when using JHipster 6.0.0

@mraible
Copy link
Contributor

@mraible mraible commented on 73e50ba May 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sometxdude If you add this into your build.gradle, does it fix the problem? If so, create a new PR and we’ll add it back in.

@sometxdude
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mraible . I've now created Issue #9713 for this.

Please sign in to comment.