【发布时间】:2021-10-31 23:31:55
【问题描述】:
我需要在父 pom 项目中跳过插件执行,但在子项目中执行它。这是怎么做到的?子项目使用 cxf-codegen-plugin 和路径 ${basedir}/src/main/resources/${wsdl-name}.wsdl 中的 wsdl,但父项目没有 wsdl。 p>
构建 => 父 pom.xml 中的插件
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/${wsdl-name}.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
【问题讨论】:
标签: java maven pom.xml maven-plugin cxf-codegen-plugin