我试图在一个项目中生成两个 xmlbean。例如,每一个都获取参与者对象,所以我不能将它们放在一个配置中。我所做的方式是使用两个执行,这是我的 pom 文件:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<version>2.3.3</version>
<executions>
<execution>
<id>xmlbean1</id>
<phase>generate-sources</phase>
<goals>
<goal>xmlbeans</goal>
</goals>
<configuration>
<xmlConfigs>
<xmlConfig implementation="java.io.File">src/main/xsdconfig/xmlbean1</xmlConfig>
</xmlConfigs>
<verbose>true</verbose>
<schemaDirectory>src/main/xsd/xmlbean1</schemaDirectory>
</configuration>
</execution>
<execution>
<id>xmlbean2</id>
<phase>generate-sources</phase>
<goals>
<goal>xmlbeans</goal>
</goals>
<configuration>
<xmlConfigs>
<xmlConfig implementation="java.io.File">src/main/xsdconfig/xmlbean2</xmlConfig>
</xmlConfigs>
<verbose>true</verbose>
<schemaDirectory>src/main/xsd/xmlbean2</schemaDirectory>
</configuration>
</execution>
</executions>
<inherited>true</inherited>
</plugin>
但它根本不起作用。谁能帮帮我,谢谢