我正在运行一个 maven 脚本,它使用 maven-jaxb1-plugin 版本 1.0.rc-11 从 xsd 生成 jaxb 类。该脚本在 java 版本 1.4 和 maven 版本小于 3 中成功运行。现在相同的脚本在 java 1.6 版和 maven 3.0.3 版环境中运行时会引发异常**
执行 org.jvnet.jaxb1.maven2:maven-jaxb1-plugin:1.0.rc-11:generate:com.sun.msv.grammar.Grammar 时缺少必需的类
** 此插件的所有依赖项都在我的存储库中可用。我仍然收到此错误。
下面是我的 pom.xml
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>javax.xml.parsers</groupId>
<artifactId>jaxp-api</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb1.maven2</groupId>
<artifactId>maven-jaxb1-plugin</artifactId>
<version>1.0.rc-11</version>
<executions>
<execution>
<configuration>
<schemaIncludes>
<include>response.xsd</include>
</schemaIncludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
是否像 maven-jaxb1-plugin 不能在 jdk1.6 和 maven 3.0.3 环境中使用。非常感谢任何帮助,谢谢。