You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are submitting a bug, please include the following:
summary of problem
I have softlinked the build dir to another location on the filesystem. I reviewed the function and it seems that ensureParentDirExists could be conservative to first check whether the directory exists before firing the command to create the directories and in turn failing.
gradle or maven version
spotless version
2.40.0
operating system and version
linux
copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] Caused by: java.io.UncheckedIOException: Unable to create parent directory for the index file: /mnt/c/Users/chetan/work/xxxx/yyyy/target/linux/spotless-index at com.diffplug.spotless.maven.incremental.FileIndex.ensureParentDirExists (FileIndex.java:149) at com.diffplug.spotless.maven.incremental.FileIndex.write (FileIndex.java:129) at com.diffplug.spotless.maven.incremental.IndexBasedChecker.close (IndexBasedChecker.java:71) at com.diffplug.spotless.maven.incremental.UpToDateChecker$1.close (UpToDateChecker.java:60) at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute (AbstractSpotlessMojo.java:231) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) ....
If you're just submitting a feature request or question, no need for the above.
The text was updated successfully, but these errors were encountered:
243826
added a commit
to 243826/spotless
that referenced
this issue
Oct 23, 2023
If you are submitting a bug, please include the following:
I have softlinked the build dir to another location on the filesystem. I reviewed the function and it seems that ensureParentDirExists could be conservative to first check whether the directory exists before firing the command to create the directories and in turn failing.
2.40.0
linux
gradlew spotless[Apply/Check] Caused by: java.io.UncheckedIOException: Unable to create parent directory for the index file: /mnt/c/Users/chetan/work/xxxx/yyyy/target/linux/spotless-index at com.diffplug.spotless.maven.incremental.FileIndex.ensureParentDirExists (FileIndex.java:149) at com.diffplug.spotless.maven.incremental.FileIndex.write (FileIndex.java:129) at com.diffplug.spotless.maven.incremental.IndexBasedChecker.close (IndexBasedChecker.java:71) at com.diffplug.spotless.maven.incremental.UpToDateChecker$1.close (UpToDateChecker.java:60) at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute (AbstractSpotlessMojo.java:231) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) ....
If you're just submitting a feature request or question, no need for the above.
The text was updated successfully, but these errors were encountered: