Errors from Eclipse code when terminating Maven
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 559
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 34
Description
A developer on my team gets multiple "Could not write workspace metadata" errors (complete error message below) when terminating a long-running mvn process. This happens for him in two different GitHub projects. He "git cloned" one of them to a different directory and the problem did not occur there. Others on the team have encountered this problem in the past when working on either project, but we don't understand how to make it happen or, more importantly, how to make it not happen. In the problematic directories the errors occur consistently. The errors don't occur if all spotless `` blocks containing `` are removed from the pom.xml.
This parent directory of the file referenced in the error message does not exist:
/tmp/com_diffplug_spotless_extra_eclipse611849813376111559/.metadata/.plugins/org.eclipse.core.resources/
The Maven goal that causes the problem is building and then running the target webapp with an embedded Tomcat instance. When the process is terminated using CTRL-C, the errors are printed. In project directories where the problem occurs, it does not seem to matter whether there are code changes known to git or that require reformatting.
Is anybody else who is using `` seeing this?
Maven 3.6.3
Spotless 2.10.1
CentOS7
```
com.diffplug.spotless
spotless-maven-plugin
${version.spotless}
origin/main
*.md
data/**/*.*
results/**/*.*
scorecard/**/*.*
target/**/*.*
false
true
4
**/*.html
data/**/*.*
results/**/*.*
target/**/*.*
HTML
${basedir}/DevStyleHtml.prefs
**/*.xml
results/**/*.*
scorecard/**/*.*
target/**/*.*
XML
${basedir}/DevStyleXml.prefs
1.7
AOSP
spotless-apply
compile
apply
```
Link: [https://github.com/OWASP/Benchmark](url)
Maven output:
[INFO] Total time: 04:25 min
[INFO] Finished at: 2021-05-06T12:21:12-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Could not write workspace metadata '/tmp/com_diffplug_spotless_extra_eclipse611849813376111559/.metadata/.plugins/org.eclipse.core.resources/0.snap'.
java.io.FileNotFoundException: /tmp/com_diffplug_spotless_extra_eclipse611849813376111559/.metadata/.plugins/org.eclipse.core.resources/0.snap (No such file or directory)
at java.io.FileOutputStream.open0 (Native Method)
at java.io.FileOutputStream.open (FileOutputStream.java:270)
at java.io.FileOutputStream. (FileOutputStream.java:213)
at java.io.FileOutputStream. (FileOutputStream.java:133)
at org.eclipse.core.internal.localstore.SafeChunkyOutputStream. (SafeChunkyOutputStream.java:48)
at org.eclipse.core.internal.localstore.SafeChunkyOutputStream. (SafeChunkyOutputStream.java:44)
at org.eclipse.core.internal.resources.SaveManager.snapTree (SaveManager.java:1474)
at org.eclipse.core.internal.resources.SaveManager.save (SaveManager.java:1198)
at org.eclipse.core.internal.resources.SaveManager.save (SaveManager.java:1143)
at org.eclipse.core.internal.resources.DelayedSnapshotJob.run (DelayedSnapshotJob.java:55)
at org.eclipse.core.internal.jobs.Worker.run (Worker.java:63)
Contributor guide
Assessment
This issue has not been assessed yet.