简体   繁体   English

IntelliJ maven 项目生成的源未拾取(仅部分)

[英]IntelliJ maven project generated-sources not picked up (only some)

I've reinstalled my windows machine and installed Java 13, Maven 3.6.2 to finally run my projects.我已经重新安装了我的 windows 机器并安装了 Java 13, Maven 3.6.2 以最终运行我的项目。 I use java immutable classes which get generated by maven.我使用由 maven 生成的 java 不可变类。 I have a problem where only SOME generated sources are picked up and some are missing in the editor (shows errors).我有一个问题,只有一些生成的源被拾取,而编辑器中缺少一些(显示错误)。 However, I'm able to run the application through IntelliJ and build with Maven.但是,我可以通过 IntelliJ 运行应用程序并使用 Maven 构建。

Any ideas on how to fix this?有想法该怎么解决这个吗?

Do note that I've gone through a number of similar questions where ALL generated-sources are not picked up and I have the correct settings for picking up source files.请注意,我已经经历了许多类似的问题,其中所有生成的源都没有被拾取,并且我有正确的设置来拾取源文件。

在此处输入图像描述

Kind of a funny situation here... Everything worked fine, but I found that one of the interfaces I used (from which a generated source is made) had another generated source marked as red (as if not imported).这里有一种有趣的情况......一切正常,但我发现我使用的一个接口(从中生成生成的源)有另一个生成的源标记为红色(好像没有导入)。 Importing the full path for it suddenly resolved the issue.导入它的完整路径突然解决了这个问题。

common.advert.Price getPrice();

My guess this is an editor problem that I have.我猜这是我遇到的编辑器问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM