在我的pom.xml中添加插件后,出现此错误。
在“构建”期间发生内部错误。 java.lang.reflect.InvocationTargetException
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
</plugin>
答案 0 :(得分:2)
这是由于您正在使用JDK 9或更高版本来构建应用程序。它一直支持到JDK8。希望这个答案。
答案 1 :(得分:0)
我的问题是不同的,maven 插件导致了这个问题。
<块引用>jaxb2-maven-plugin
如果 maven 无法正确编译,则可能是您的 xsd 或 wsdl 问题。