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

╰+哭是因爲堅強的太久メ 2022-01-14 10:37 316阅读 0赞

原文: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没有配置插件应此需要

[sql] view plain copy

  1. mvn org.mortbay.jetty:maven-jetty-plugin:run

这样来运行。
如果需要使用jetty:run,那么必须在maven的setting.xml下配置

[plain] view plain copy

  1. org.mortbay.jetty

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

[sql] view plain copy

  1. org.mortbay.jetty
  2. jetty-maven-plugin
  3. /
  4. webx
  5. 9999
  6. 8081
  7. 60000
  8. target/access.log
  9. 90
  10. false
  11. false
  12. GMT+8:00
  13. productionMode
  14. ${productionMode}

发表评论

表情:
评论列表 (有 0 条评论,316人围观)

还没有评论,来说两句吧...

相关阅读