我是 Maven 的新手。我的 maven 项目中有两个 maven 插件,当我生成源时,其中一个始终生成源(jaxb2-maven-plugin
)但其他不(wsdl2java
)生成源。他们彼此冲突。我非常需要他们两个,他们过去工作过,但现在不工作了。我尝试注释掉,jaxb2-maven-plugin
然后其他插件wsdl2java
就可以工作了。有什么我需要做的吗?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>com.x.x.model</packageName>
<generatePackage>com.x.x.model</generatePackage>
<schemaDirectory>src/main/resources/DavisTemplates</schemaDirectory>
<outputDirectory>${project.build.directory}/generated-sources/</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<!-- SourceDirectory should only refer to the directory where the wsdl
resides and not the actual wsdl file itself -->
<sourceDirectory>src/main/resources/wsdl/</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/</outputDirectory>
<packageSpace>com.paypal.touchstone.posapiserv</packageSpace>
<!-- <wsdlFile>${posApiVersion}.wsdl</wsdlFile> -->
<serverSide>false</serverSide>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>