Issue
After adding a plugin to my pom.xml I am getting this error.
An internal error occurred during: "Building". 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>
Solution
It's because you are building the application using JDK version 9 or above. It is supported till JDK 8.
Answered By - hitesh bedre
Answer Checked By - David Goodson (JavaFixing Volunteer)