我尝试使用 build-helper-maven 插件附加由 jaxb 或 cxf 生成的源目录。不幸的是,即使我在 mvn generate-sources 中取得了成功,我的 eclipse 也没有将目标目录添加为源文件夹。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated/cxf</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
日志 :
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ coucou-services ---
[INFO] Deleting D:\004_Development\coucou\Workspace\coucou-bom\coucou-services\target
[INFO]
[INFO] --- cxf-codegen-plugin:2.4.6:wsdl2java (generate-sources) @ coucou-services ---
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ coucou-services ---
[INFO] Source directory: D:\004_Development\coucou\Workspace\coucou-bom\coucou-services\target\generated\cxf added.
[INFO]
[INFO] -
你有什么主意吗 ?
此致