错误1:
[INFO] ------------------------------------------------------------------------
[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\jre7\..\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/conflu
在eclipse中的goal中使用jetty:run命令报错
No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.mave
解决方法:在setting.xml中添加
<pluginGroups>
<pluginGroup>org.eclipse.jetty</pluginGroup>
</pluginGroups>
然后就可以使用jetty:run前缀 运行jetty了
错误3:
maven版本太低我使用3.0.5 ,jdk版本太低 我使用的jetty-maven-plugin版本为9.4.3是需要jdk1.8的 而我的是1.7 所以启动的时候也一直报错, 后来我改成maven 最新版3.5.0且将jetty-maven-plugin版本降为9.2.18 就可以了
总结一下:1、是eclipse 中jdk设置不对
2、在setting.xml在中未在pluginGroups标签中添加<pluginGroup>jetty-maven-plugin的插件Id</pluginGroup>导致
在eclipse中无法在goal中使用jetty前缀 进行jetty:run启动项目
3、jdk版本,maven版本还有插件版本不符而引起的, 一般jetty插件版本有不同的jdk版本要求 和maven版本要求
http://www.eclipse.org/jetty/download.html