jibx-maven-plugin 1.2.5 schema-codegen 目标 <schemaBindingDirectory> 值被忽略

jibx-maven-plugin 1.2.5 schema-codegen goal <schemaBindingDirectory> value ignored

我想将生成的 类 存储在 src/main/java 目录中,但由于 jibx-maven-plugin 的默认设置。java 文件转到 target/generated-sources。

这是我当前的 pom.xml 文件,我在其中修改了 <schemaBindingDirectory> 的值,但目标路径未更改。

<build>
    <pluginManagement>
        <plugins>
            <plugin>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-maven-plugin</artifactId>
            <version>1.2.5</version>
                 <executions>
                      <execution>
                      <id>generate-java-code-from-schema</id>
                             <goals>
                             <goal>schema-codegen</goal>
                             </goals>
                             <configuration>
                             <schemaLocation>src/main/config</schemaLocation>
                             <includeSchemas>
                             <includeSchema>example1.xsd</includeSchema>
                             </includeSchemas>
                             <options>
                             <package>com.poc.jibx</package>
                             </options>
                             </configuration>
                      </execution>

                      <execution>
                            <id>compile-binding</id>
                            <goals>
                            <goal>bind</goal>
                            </goals>
                            <configuration>
                            <schemaBindingDirectory>src/main/java</schemaBindingDirectory>
                            <load>true</load>
                            <validate>true</validate>
                            <!--<verbose>true</verbose>-->
                            <verify>true</verify>
                            </configuration>
                       </execution>  

                       <execution>
                            <id>bind-xml</id>
                            <goals>
                            <goal>bind</goal>
                            </goals>
                       </execution>                                 
                </executions>
         </plugin>


         <plugin>
             <groupId>org.jibx.config</groupId>
             <artifactId>maven-plugin-reactor</artifactId>
             <version>1.3.4-SNAPSHOT</version>
         </plugin>

      </plugins>
   </pluginManagement>
</build>

build.xml 文件是否需要任何更改? pom.xml 文件中是否还有其他错误? 有人可以帮我改变道路吗? 在此先感谢您的帮助。

如果您希望在 src/main/java 中创建生成的 java 个文件,请包括:

                            <schemaBindingDirectory>src/main/java</schemaBindingDirectory>

在 schemaLocation 标记之前的绑定配置中。

此标记未包含在 JiBX 文档中,因为通常您不希望生成的文件包含在源路径中。

我们强烈建议您使用默认文件位置,以免意外提交任何生成的文件。