## 现象
vscode 提示如下类似内容:
```text
vscode target/generated-sources/openapi/src/test/java/cn/com/xxx/openapi/etl [in openapi-xxx] is not on its project's build path
Project configuration is not up-to-date with pom.xml, requires an update
```
## 解决办法
1. 必须确保 mvn 编译正常(因为这是一个vscode的显示问题与代码无关)
2. 使用插件 `build-helper-maven-plugin` 的 `3.3.0` 版本(注: 不要配置 `<sources>`)
```bash
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<?m2e execute onConfiguration?>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
</execution>
</executions>
</plugin>
```
3. `vscode` 安装java插件`Extension Pack for Java` 和 `Language Support for Java(TM) by Red Hat` 最新版本.
## 其他
- 重新加载工作区(Ctrl+Shift+P) `Java: Clean Java language server Workspace`
## 参考:
[generated-sources/java is not picked up as a source path · Issue #1639 · redhat-developer/vscode-java · GitHub](https://github.com/redhat-developer/vscode-java/issues/1639)