gpt4 book ai didi

maven - 如何从源根目录下排除源?

转载 作者:行者123 更新时间:2023-12-02 03:52:58 26 4
gpt4 key购买 nike

在我项目的pom.xml我有负责生成资源的部分:

        <plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.3.0</version>
<executions>
...
<execution>
<id>generate-sources-myownp</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/MyOwnProj.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
...

它运行良好,除了一个“sourceRoot”,它恰好是重复的,因为它包含在两个不同的包中。

有没有办法在 pom.xml 中为该源包指定明确的“排除”? ?

最佳答案

根据文档,通常您不需要指定 sourceRoot。摘自docs :

By default, the codegen plugin follows the Maven convention of "target/generated-sources/cxf" for the output folder for the generated classes. You can override this value using as shown below, but note this is usually not necessary

也许我误解了你的问题。

关于maven - 如何从源根目录下排除源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13709400/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com