0

我使用 org.jvnet.jaxb2.maven2 插件从 XSD 模式生成源。当模式未更改时,也会为每个构建生成源。这严重减慢了构建速度。如何防止这种行为并仅在确实需要时自动生成源?

我当前的插件配置:

<execution>
    <goals>
        <goal>generate</goal>
    </goals>
    <configuration>
        <schemaIncludes>
                    <include>jaxb/foo/*.xsd</include>
        </schemaIncludes>
        <episodeFile>${project.build.directory}/generated-sources/xjc/META-INF/jaxb-foo.episode</episodeFile>                           
            <generatePackage>com.foo</generatePackage>
    </configuration>
    <id>jaxb-generate-foo</id>
</execution>
4

0 回答 0