如果已经存在,maven-jaxb2-plugin不会生成文件

时间:2019-06-24 13:43:48

标签: maven maven-jaxb2-plugin

我正在使用maven-jaxb2-plugin从第三方提供的dld文件中生成文件。

即使没有进行任何更改,如何防止每次都重新生成相同的文件?

1 个答案:

答案 0 :(得分:0)

知道了。

其根本原因是在文件开头生成的免责声明,在文件中添加了 randomndess 因素。

This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.2-hudson-jaxb-ri-2.2-63- 
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
Any modifications to this file will be lost upon recompilation of the source schema. 
Generated on: XXX XXX XXX 

在插件的<args><arg>-no-header</arg></args>配置中添加pom解决了该问题。