Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'File name too long' error when building Spring with Gradle

Tags:

spring

gradle

I tried to build Spring from source using: ./gradlew install

It fails with:

/home/dk/.gradle/caches/1.12/scripts/build_68eiq5ktt9740a7l1bofab8a9a/ProjectScript/no_buildscript/classes/build_68eiq5ktt9740a7l1bofab8a9a$_run_closure27_closure138_closure139_closure140_closure141_closure142_closure143_closure144_closure146_closure147.class (File name too long)

This was reported earlier but should have been fixed in Gradle 0.9.1. However I still have this error with Gradle 1.12. I'm using Ubuntu 14.04 with an ext4 filesystem.

What's the recommend workaround for this?

like image 450
Dennis Kieselhorst Avatar asked Oct 20 '25 13:10

Dennis Kieselhorst


2 Answers

It seems that this error occurs when using an encrypted home directory. I've set GRADLE_USER_HOME to an unencrypted directory and everything works fine.

like image 104
Dennis Kieselhorst Avatar answered Oct 23 '25 07:10

Dennis Kieselhorst


The only solutions I'm aware of are to use a filesystem that can handle long filenames, or to ask the Spring folks to change their build script so that it doesn't use such deep nesting levels (10 seems way too much). In any case, this question should be brought to attention of Spring developers (e.g. in their JIRA). I'd be surprised if none of them used Ubuntu/ext4.

like image 33
Peter Niederwieser Avatar answered Oct 23 '25 08:10

Peter Niederwieser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!