[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-c

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project clothing: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files\Java\jre6\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException



出现这情况,是因为,默认的eclipse项目,默认是jre,jre只支持运行时的需要,在打war时,需要更全的JDK的支持

选中项目,选择build path














"Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)" 是一个Maven编译插件执行失败的错误信息。这个错误通常出现在使用Maven构建项目时,编译阶段出现了问题。 这个错误信息的含义是,Maven编译插件在执行编译操作时遇到了问题,具体是由于什么原因导致的需要查看详细的错误日志才能确定。可能的原因包括但不限于以下几点: 1. 项目中存在编译错误:可能是代码中存在语法错误、缺少依赖等问题导致编译失败。 2. Maven配置错误:可能是Maven的配置文件(如pom.xml)中存在错误或者缺少必要的配置信息。 3. Maven插件版本不兼容:可能是使用的Maven编译插件版本与项目中其他插件或依赖的版本不兼容导致的。 为了解决这个问题,你可以尝试以下几个步骤: 1. 检查代码:检查项目中的代码是否存在语法错误或其他编译错误。 2. 检查依赖:检查项目的依赖是否正确配置,并且是否存在缺失的依赖。 3. 检查Maven配置:检查项目的Maven配置文件(pom.xml)是否正确配置,并且是否存在错误或缺失的配置信息。 4. 更新插件版本:尝试更新Maven编译插件的版本,确保与其他插件或依赖的版本兼容。 如果以上步骤都没有解决问题,你可以提供更详细的错误日志或项目配置信息,以便我能够更准确地帮助你解决这个问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值