【发布时间】:2018-05-17 12:19:21
【问题描述】:
我有一个相当大的 .xsd。我在使用 xjc 创建类时遇到了问题。出现以下错误:
[ERROR] Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000.
我使用 xjc -nv 做了一个解决方法。
我目前正在尝试通过 maven 创建 java 类。
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- The package of your generated sources -->
</configuration>
</plugin>
</plugins>
每当我编译项目时,都会出现错误。
有没有办法让 maven 也使用 -nv 参数?
【问题讨论】:
-
maven-jaxb2-plugin 具有设置
strict,默认为false。
标签: java maven jaxb pom.xml xjc