如何在一个pom文件中生成两个xmlbeans

Luk*_*uke 5 java xmlbeans maven xmlbeans-maven-plugin

我试图在一个项目中生成两个xmlbeans.例如,每一个都获得参与者对象,因此我不能将它们放在一个配置中.我的方式是使用两次执行,这是我的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>
Run Code Online (Sandbox Code Playgroud)

但它根本不起作用.有人可以帮助我,谢谢

Tor*_*ten 1

您应该尝试使用另一个不同的阶段进行第二次调用。据我所知,同一个插件不能在同一生命周期阶段执行两次。