在maven进行jetty的调试中出现错误:
  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

详情如下:

  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下配置

  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>

最新文章

  1. Query Designer:Hierarchy层级显示
  2. java23种设计模式
  3. Mac os装软件时提示显示需要安装旧Java SE 6运行环境解决办法
  4. (转)iOS图片拉伸技巧
  5. Linux内存管理学习笔记 转
  6. 史上最全的 UIWebview 的 JS 与 OC 交互
  7. Azure 虚拟机常见问题-下
  8. iOS绘图教程 (转,拷贝以记录)
  9. gre tunnel
  10. react native 添加第三方插件react-native-orientation(横竖屏设置功能 android)
  11. shell脚本报错:&quot;[: =: unary operator expected&quot;
  12. IOS学习4——block代码块
  13. DSAPI 字符串和文件转Md5字符串
  14. 一张图看懂STM32芯片型号的命名规则
  15. Linux 线程实现模型
  16. hibernate 解决 java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
  17. 如何通过ssh远程登录内网的Mac和Linux系统?
  18. [SHOI2012]随机树[期望dp]
  19. 深入分析Java Web技术内幕
  20. iOS开发--改变tableHeaderView的高度

热门文章

  1. Windows Live Writer离线编写博客
  2. volatile 关键字
  3. C++中对象初始化
  4. makefile中的伪目标
  5. PHP通过串口发短信
  6. 【转】dsadd user批量创建AD用户命令详解
  7. ZOJ 1808 Immediately Decodable
  8. Unity3d+Jenkins 自动编译iOS、Android版本
  9. emberjs创建类
  10. 09SpringMvc_再次讲一下SpringMvc的工作流: