Errors from Eclipse code when terminating Maven
- Vorherrschende Sprache
- Java
- Sterne
- 5.6k
- Forks
- 559
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 43
Beschreibung
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)
Beitragsleitfaden
Rechercherichtung
Das Issue nennt die Ausführung von Maven spotless-apply, die Konfiguration und einen Stacktrace der Eclipse-Workspace-Metadaten, aber keine Quelldatei oder keinen Test. Beginne damit, den Fehler mit Maven 3.6.3 auf CentOS 7 zu reproduzieren, während du den embedded-Tomcat-Lauf beendest; erledigt ist dies, wenn die konfigurierten Eclipse-WTP-Formate nicht mehr die FileNotFoundException für Workspace-Metadaten ausgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100