在 maven 项目中使用 jibx:bind 目标时,是否可以优化插件,使其仅在 .xsd (模式)本身发生变化时才生成模式绑定?我能找到它以避免运行目标的唯一方法是创建配置文件,但我不想选择性地绑定或跳过绑定:我希望插件检测到已经生成的源文件的日期比.xsd 本身。
这是我的 pom.xml 的构建部分目前的样子:
<build>
<plugins>
<plugin>
<groupId>org.jibx</groupId>
<artifactId>jibx-maven-plugin</artifactId>
<version>1.2.6</version>
<configuration>
<schemaBindingDirectory>src/main/resources/bindingmapping</schemaBindingDirectory>
<includeSchemaBindings>
<includeSchemaBindings>binding.xml</includeSchemaBindings>
</includeSchemaBindings>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>bind</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jibx</groupId>
<artifactId>jibx-bind</artifactId>
<version>1.2.5</version>
<exclusions>
<exclusion>
<artifactId>bcel</artifactId>
<groupId>bcel</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>