1.pom.xml
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
其中pre-integration-test和post-integration-test可以让jetty随着maven的命令启动,命令结束而停止。
2.settings.xml
添加
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
不然可能会出这样的错误
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (D:\apache-maven-3.0\repository), nexus (http://localhost:8081/n
exus/content/groups/snapshot), Nexus (http://localhost:8081/nexus/content/groups
/public)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
orPrefixException
分享到:
相关推荐
Eclipse_Maven_Jetty配置
maven jetty插件配置指南。 看看就知道。
java开发中Eclipse+maven+jetty环境配置
NULL 博文链接:https://zxf-noimp.iteye.com/blog/806399
Eclipse Maven项目中配置Jetty,本工程为maven项目。
NULL 博文链接:https://a151555.iteye.com/blog/2168360
maven的项目用jetty 服务器启动项目时配置此段配置,就可以实现热部署(意思就是eclipse改了代码可以不用重启服务器)
NULL 博文链接:https://747017186.iteye.com/blog/2338100
NULL 博文链接:https://caerun.iteye.com/blog/1145451
eclipse + maven多模块项目框架 + jetty热部署的实例源码 让你掌握maven中那些令人迷惑的一堆配置,基于此框架快速搭建maven多模块项目完美环境。
springmvc+maven+ibatis+jetty的pom配置文件,平时书写太麻烦
NULL 博文链接:https://usejava.iteye.com/blog/583067
jetty-maven-springMVC-...数据库配置:/jetty-maven/src/main/resources/applicationContext.xml 数据库导入到test数据库:/jetty-maven/src/main/resources/hms_user.sql 配置好maven环境,联网,开发环境eclipse-jee
Intellij IDEA下建立maven管理的web项目,配置jetty热部署
NULL 博文链接:https://fuaotech.iteye.com/blog/2292707
如何在Maven中使用Jetty 如何在Ant中使用Jetty Maven和Ant的更多支持 Jetty Maven插件(Plugin) Jetty Jspc Maven插件(Plugin) Maven web应用工程原型 Ant Jetty插件(Plugin) 使用集成开发环境(IDEs) 在...
该包适用于maven新手入门,因为作者本身也是一员maven新手,里面包括了maven的下载包,插件包,插件的配置,环境变量的设置,maven项目建立的详解及运行,里面集成了jetty,tomcat,struts2,当然还包括了直接运行jar包...
maven入门使用 maven创建web项目 maven生成eclipse项目 maven+jetty的使用 jetty在eclipse的配置和使用
先配置mvn环境,打开eclipse-jee导入,右击项目--》run as--》maven build--》goals中填入jetty run。 打开浏览器直接访问:http://localhost:8080/jetty-maven。 具体参考:...