简体   繁体   English

Maven构建失败-MyEclipse

[英]Maven Build failure - MyEclipse

when i tried to build my project i am getting this error below as: 当我尝试构建项目时,出现以下错误:

    BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 45.435s
    [INFO] Finished at: Wed Jun 13 17:25:47 GMT+05:30 2012
    [INFO] Final Memory: 10M/76M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project DPCommons: Compilation failure: Compilation failure:
C:\MyEclipseWorkspace\Workspace_MayMU24\DPCommons\src\com\afunds\lang\ResourceClassLoader.java:[13,15] sun.misc.Resource is Sun proprietary API and may be removed in a future release

and the project names will appear below. 项目名称将显示在下面。

How can i overcome this. 我该如何克服这个问题。

Do the following steps to solve that problem : 请执行以下步骤来解决该问题:

Window -> Preferences -> Java -> installed JREs -> I have a JRE from the JDK location, my location looks like C:\\Program Files\\Java\\jdk1.6.0_26 窗口->首选项-> Java->已安装的JRE->我在JDK位置有一个JRE,我的位置看起来像C:\\ Program Files \\ Java \\ jdk1.6.0_26

Window -> Preferences -> Java -> installed JREs -> Execution Enviroments -> Select JavaSE-1.6 and select a compatible JRE which should be the one set in the previous step. 窗口->首选项-> Java->已安装的JRE->执行环境->选择JavaSE-1.6并选择兼容的JRE,它应该是上一步中设置的一个。

Look at this link - 看这个链接-

Maven in Eclipse complains that "Unable to locate the Javac Compiler" whenever POM changed Eclipse中的Maven抱怨说,每当POM更改时,“无法找到Javac编译器”

Looks like you have a JDK version which has this problem as per this discussion . 看来您有一个JDK版本,按照本次讨论存在此问题。 Upgrade and retry. 升级并重试。

By providing the below arguments in the pom.xml of my project solved the issue. 通过在我的项目的pom.xml中提供以下参数,解决了该问题。

<compilerArguments>
<bootclasspath>${java.home}\lib\rt.jar</bootclasspath>
</compilerArguments>

But still unclear as to why this works? 但是仍然不清楚为什么这行得通吗?

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM