Errors from Eclipse code when terminating Maven
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- java
- Ambito
- build-system
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.
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 <format> blocks containing <eclipseWtp> 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 <eclipseWtp> seeing this?
Maven 3.6.3
Spotless 2.10.1
CentOS7
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${version.spotless}</version>
<configuration>
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
<ratchetFrom>origin/main</ratchetFrom>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>*.md</include>
</includes>
<excludes>
<!-- exclude>src/main/java/org/owasp/**/testcode/*.*</exclude -->
<exclude>data/**/*.*</exclude>
<exclude>results/**/*.*</exclude>
<exclude>scorecard/**/*.*</exclude>
<exclude>target/**/*.*</exclude>
</excludes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace />
<endWithNewline />
<indent>
<tabs>false</tabs>
<spaces>true</spaces>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
<format>
<includes>
<include>**/*.html</include>
</includes>
<excludes>
<exclude>data/**/*.*</exclude>
<exclude>results/**/*.*</exclude>
<exclude>target/**/*.*</exclude>
</excludes>
<eclipseWtp>
<type>HTML</type>
<files>
<file>${basedir}/DevStyleHtml.prefs</file>
</files>
</eclipseWtp>
</format>
<format>
<includes>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>results/**/*.*</exclude>
<exclude>scorecard/**/*.*</exclude>
<exclude>target/**/*.*</exclude>
</excludes>
<eclipseWtp>
<type>XML</type>
<files>
<file>${basedir}/DevStyleXml.prefs</file>
</files>
</eclipseWtp>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<importOrder /> <!-- standard import order -->
<removeUnusedImports /> <!-- self-explanatory -->
<!-- apply a specific flavor of google-java-format -->
<googleJavaFormat>
<version>1.7</version>
<style>AOSP</style>
</googleJavaFormat>
</java>
</configuration>
<executions>
<execution>
<id>spotless-apply</id>
<phase>compile</phase>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
Link: https://github.com/OWASP/Benchmark
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)
- Lingua principale
- Java
- Stelle
- 5.7k
- Fork
- 560
- Merge medio
- 1g 13h
- PR unite (30g)
- 43
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di diffplug/spotless
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Tutte le issue di diffplug/spotless
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
checkstyle/test-configs#263 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Aperta1.0.0-alpha2 Type/Improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wso2/dpdp-accelerator#272 ·