简体   繁体   English

在以下过程中发生内部错误:“构建”

[英]An internal error occurred during: "Building"

After adding a plugin to my pom.xml I am getting this error.将插件添加到我的 pom.xml 后,出现此错误。

An internal error occurred during: "Building".在以下过程中发生内部错误:“构建”。 java.lang.reflect.InvocationTargetException 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>

It's because you are building the application using JDK version 9 or above.这是因为您正在使用 JDK 9 或更高版本构建应用程序。 It is supported till JDK 8.它支持到 JDK 8。

My issue was different and below maven plugin was causing the problem.我的问题不同,下面的 maven 插件导致了问题。

jaxb2-maven-plugin jaxb2-maven-插件

It may be your xsd or wsdl issue, if maven is not able to compile it properly.如果 maven 无法正确编译,可能是您的 xsd 或 wsdl 问题。

右键单击项目 --> 运行方式 --> Maven 生成源

I am not sure about the later version, but if you are using the 1.6 version of xjc just change the JRE (whatever) to JavaSE-1.8.我不确定更高版本,但如果您使用的是 1.6 版本的 xjc,只需将 JRE(无论什么)更改为 JavaSE-1.8。 To change the JRE in eclipse, Right click on project -> Build Path -> Configure Build Path -> Libraries -> Select JRE System Library and click on edit button and then select the Execution Environment.要在 Eclipse 中更改 JRE,右键单击项目 -> 构建路径 -> 配置构建路径 -> 库 -> 选择 JRE 系统库并单击编辑按钮,然后选择执行环境。 Hope it works for you !!希望这对你有用 !!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在以下过程中发生内部错误:“构建”。 java.lang.reflect.InvocationTargetException - An internal error occurred during: "Building". java.lang.reflect.InvocationTargetException 在“导入 Maven 项目”和“构建 Maven 项目”期间发生内部错误 - An internal error occurred during: “Importing Maven projects” and “building Maven Projects” TestNG 启动时发生内部错误 - TestNG An internal error occurred during launching 在Eclipse中启动testng时发生内部错误 - An internal error occurred during launching testng in eclipse 期间发生内部错误:“发布到 WAS 8559 ...” - An internal error occurred during: “Publishing to WAS 8559 …” 在“AppXray Indexing ...”期间发生内部错误 - An internal error occurred during: “AppXray Indexing…” 在“ Java搜索”期间发生内部错误。 -1 - An internal error occurred during: “Java Search”. -1 JUnit4 + Eclipse“启动期间发生内部错误” - JUnit4 + Eclipse “An internal error occurred during Launching” 在以下过程中发生内部错误:“启动 <myApp> ”。 Java堆空间 - An internal error occurred during: “Launching <myApp>”. Java heap space 在以下过程中发生内部错误:“启动MyFirstApp”。 java.lang.NullPointerException - An internal error occurred during: “Launching MyFirstApp”. java.lang.NullPointerException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM