且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

maven-jaxb2-plugin无法在Linux机器上编译xsd,但可以在Windows上运行?

更新时间:2023-09-27 18:33:46

我遇到了同样的问题,即完全有效的XSD无法在Linux上编译,但可以在Windows和Mac上运行.我必须在maven-jaxb-2插件配置中关闭严格验证,如下所示:

I had the same issue where perfectly valid XSDs failed to compile on Linux but worked on Windows and Mac. I had to turn off strict validation in the maven-jaxb-2 plugin configuration like so :

<configuration>
    <schemaDirectory>src/main/resources/xsd</schemaDirectory>
    <strict>false</strict>
    <extension>true</extension>
</configuration>