java - Java 模型状态 - 不能嵌套在里面
问题描述
我的 Visual Studio Code IDE 在 Maven 构建期间向我显示了这个错误:
ENTRY org.eclipse.jdt.apt.core 4 1 2019-07-31 12:58:13.130
!MESSAGE Failed to add classpath entry for generated source folder annotations
!STACK 1Java Model Exception: Java Model Status [Cannot nest '.../target/generated-sources/annotations' inside '.../target/generated-sources'. To enable the nesting exclude 'annotations/' from '.../target/generated-sources']
屏幕右下方会出现一条通知,显示:
Build failed, do you want to continue?
我可以单击Proceed
按钮,构建成功完成。
环境版本:
Version: 1.36.1
Commit: 2213894ea0415ee8c85c5eea0d0ff81ecc191529
Date: 2019-07-08T22:55:08.091Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 5.0.0-050000-generic snap
这是.classpath
文件:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="target/generated-sources/annotations/" kind="src" path=""/>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
它们有很多,例如每个子目录一个。如果我删除所有这些,VSCode 将重新创建它们。
我怀疑Language Support for Java(TM)
Red Hat 的扩展是创建这些文件的那个。
解决方案
推荐阅读
- python - 自动将 python lambda 重构为命名函数
- google-cloud-storage - GCS 访问日志停止存储
- python - 用于问题 SPIDY2 的递归解决方案中的记忆
- angular - 如何在 Ionic 的外部浏览器中创建可点击和打开
- javascript - 元素之和多维数组javascript
- c++ - 数组的第一个元素不会在没有字符限制的情况下输出
- javascript - JQuery Datatables Ajax 动态列
- java - 为什么数组搜索错误对于 case [-2,0,10,-19,4,6,-8] 失败
- javascript - 为什么 AngularJS 记录一个对象,尽管它没有注入函数内部?
- apache-spark - Spark:任务具体包含什么?