Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception when mvn build directory is a softlink to actual directory #1858

Closed
4 of 6 tasks
243826 opened this issue Oct 22, 2023 · 0 comments
Closed
4 of 6 tasks

exception when mvn build directory is a softlink to actual directory #1858

243826 opened this issue Oct 22, 2023 · 0 comments

Comments

@243826
Copy link
Contributor

243826 commented Oct 22, 2023

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.

243826 added a commit to 243826/spotless that referenced this issue Oct 23, 2023
243826 added a commit to 243826/spotless that referenced this issue Oct 30, 2023
243826 added a commit to 243826/spotless that referenced this issue Oct 30, 2023
243826 added a commit to 243826/spotless that referenced this issue Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant