Errors from Eclipse code when terminating Maven
- Lingua principale
- Java
- Stelle
- 5.6k
- Fork
- 559
- Merge medio
- 1g 14h
- PR unite (30g)
- 43
Descrizione
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)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
La issue nomina l’esecuzione di Maven spotless-apply, la configurazione e uno stack trace dei metadati del workspace di Eclipse, ma non indica alcun file sorgente né alcun test. Inizia riproducendo il fallimento con Maven 3.6.3 su CentOS 7 mentre termini l’esecuzione di embedded-Tomcat; il lavoro è terminato quando i formati Eclipse WTP configurati non emettono più la FileNotFoundException dei metadati del workspace.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100