错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups

简介:

原文:http://blog.csdn.net/wolfchou/article/details/8633861

在maven进行jetty的调试中出现错误:

[plain] view plain copy
  1. [ERROR] No plugin found for prefix 'jetty' in the current project and in the plu  
  2. gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo  
  3. sitories [local (C:\Documents and Settings\Administrator\.m2\repository), centra  
  4. l (http://repo.maven.apache.org/maven2)] -> [Help 1]  
  5. [ERROR]  
  6. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit  


详情如下:

[plain] view plain copy
  1. C:\myjava\workspace>mvn jetty:run  
  2. [INFO] Scanning for projects...  
  3. [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave  
  4. n-deploy-plugin:2.7: Failed to parse plugin descriptor for org.apache.maven.plug  
  5. ins:maven-deploy-plugin:2.7 (C:\Documents and Settings\Administrator\.m2\reposit  
  6. ory\org\apache\maven\plugins\maven-deploy-plugin\2.7\maven-deploy-plugin-2.7.jar  
  7. ): invalid LOC header (bad signature)  
  8. [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave  
  9. n-site-plugin:3.0: Failed to parse plugin descriptor for org.apache.maven.plugin  
  10. s:maven-site-plugin:3.0 (C:\Documents and Settings\Administrator\.m2\repository\  
  11. org\apache\maven\plugins\maven-site-plugin\3.0\maven-site-plugin-3.0.jar): inval  
  12. id LOC header (bad signature)  
  13. Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-  
  14. metadata.xml  
  15. Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat  
  16. a.xml  
  17. Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-m  
  18. etadata.xml (11 KB at 10.7 KB/sec)  
  19. Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata  
  20. .xml (22 KB at 18.2 KB/sec)  
  21. [INFO] ------------------------------------------------------------------------  
  22. [INFO] BUILD FAILURE  
  23. [INFO] ------------------------------------------------------------------------  
  24. [INFO] Total time: 2.110s  
  25. [INFO] Finished at: Sun Mar 03 17:31:20 CST 2013  
  26. [INFO] Final Memory: 4M/15M  
  27. [INFO] ------------------------------------------------------------------------  
  28. [ERROR] No plugin found for prefix 'jetty' in the current project and in the plu  
  29. gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo  
  30. sitories [local (C:\Documents and Settings\Administrator\.m2\repository), centra  
  31. l (http://repo.maven.apache.org/maven2)] -> [Help 1]  
  32. [ERROR]  
  33. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit  



settings.xml没有配置插件应此需要
  1. mvn org.mortbay.jetty:maven-jetty-plugin:run   

这样来运行。
如果需要使用jetty:run,那么必须在maven的setting.xml下配置
[plain] view plain copy
  1. <pluginGroups>  
  2.     <pluginGroup>org.mortbay.jetty</pluginGroup>  
  3.   </pluginGroups>  

或者在对应项目的pom.xml中plugins的节点下添加配置

  1. <plugin>  
  2.                 <groupId>org.mortbay.jetty</groupId>  
  3.                 <artifactId>jetty-maven-plugin</artifactId>  
  4.                 <configuration>  
  5.                     <webApp>  
  6.                         <contextPath>/</contextPath>  
  7.                     </webApp>  
  8.                     <stopKey>webx</stopKey>  
  9.                     <stopPort>9999</stopPort>  
  10.                     <connectors>  
  11.                         <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">  
  12.                             <port>8081</port>  
  13.                             <maxIdleTime>60000</maxIdleTime>  
  14.                         </connector>  
  15.                     </connectors>  
  16.                     <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">  
  17.                         <filename>target/access.log</filename>  
  18.                         <retainDays>90</retainDays>  
  19.                         <append>false</append>  
  20.                         <extended>false</extended>  
  21.                         <logTimeZone>GMT+8:00</logTimeZone>  
  22.                     </requestLog>  
  23.                     <systemProperties>  
  24.                         <systemProperty>  
  25.                             <name>productionMode</name>  
  26.                             <value>${productionMode}</value>  
  27.                         </systemProperty>  
  28.                     </systemProperties>  
  29.                 </configuration>  
  30.             </plugin> 

相关文章
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
Failed to execute goal maven-resources-plugin:3.2.0:resources Input length = 1 -> [Help 1]
127 0
|
Java Maven
Maven打包出现webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
Maven打包出现webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
814 0
|
Java Maven
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
143 0
|
资源调度 JavaScript 前端开发
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
yarn打包报错:error during build: Error: Assigning to rvalue (Note that you need plugins to import files
443 7
|
Java Maven
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No valid Maven installation found. Either set the home directory in the configuration dialog or set
1081 0
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No plugin found for prefix ‘doclint‘ in the current project
No plugin found for prefix ‘doclint‘ in the current project
145 0
|
Java Maven
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1] 问题处理
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project ei-qssso-admin: The plugin org.apache.maven.plugins:maven-resources-plugi n:3.2.0 requires Maven version 3.1.0 -> [Help 1]
|
Java Maven Android开发
eclipse maven 报错Could not get the value for parameter encoding for plugin execution default
问题描述:更改默认的maven仓库路径完成后、即存maven项目或者新建maven项目的时候出现如下错误   Could not get the value for parameter encoding for plugin execution default   原因分析:当问题解决后、回...
1865 1