且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何配置 IntelliJ IDEA 和/或 Maven 以使用 jaxb2-maven-plugin 生成的 Java 源代码自动添加目录?

更新时间:2022-03-03 02:23:16

与Maven的约定是在target/generated-sources/中生成代码,例如target/generated-sources/jaxb2

The convention with Maven is to generate code in target/generated-sources/<tool>, for example target/generated-sources/jaxb2

遵循此约定,IDEA 会将文件夹添加为源文件夹(请参阅 IDEA-53198).

Follow this convention and IDEA will add the folder as source folder (see IDEA-53198).