博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Maven Jetty Plugin运行配置jetty:run
阅读量:6860 次
发布时间:2019-06-26

本文共 983 字,大约阅读时间需要 3 分钟。

如果这个工程是标准的maven-webapp那么基本上不用修改,直接运行jetty:run就可以执行。

 

但是有时候会报错说

 

[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 (C:\Documents and Settings\reymont.li\.m2\repository), central (
)] -> [Help 1]

 

在pom.xml的project.build节点下添加

 

 

<plugins>

 <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.10</version>
        
  </plugin>
  </plugins>

 

 

 

 

 

 

 

In order to run Jetty on a webapp project which is structured according to the usual Maven defaults (resources in ${basedir}/src/main/webapp, classes in${project.build.outputDirectory} and the web.xml descriptor at ${basedir}/src/main/webapp/WEB-INF/web.xml, you don't need to configure anything.

Simply type:

mvn jetty:run

This will start Jetty running on port 8080 and serving your project. Jetty will continue to run until the plugin is explicitly stopped, for example, by a <cntrl-c>.

转载地址:http://lbxyl.baihongyu.com/

你可能感兴趣的文章
孟晓阳:IT运行监控系统设计与使用心得
查看>>
Navicat Premium 12.0.18安装与激活(转)
查看>>
Chart:Amcharts
查看>>
查看mysql服务器连接
查看>>
jquery是什么
查看>>
Yii之路(第八)
查看>>
[UWP小白日记-2]SQLite数据库DOME
查看>>
spring + Mybatis + pageHelper + druid 整合源码分享
查看>>
乐观锁 与 悲观锁 来解决数据库并发问题
查看>>
java.sql.SQLException: Field 'id' doesn't have a default value解决方案
查看>>
设置更改root密码 连接mysql mysql常用命令
查看>>
基于 Token 的身份验证
查看>>
C#从证书存储区读取证书
查看>>
NE555
查看>>
Docker 删除所有无名称的镜像(悬空镜像)
查看>>
URI -URL-URN区别
查看>>
Java 8 lambda表达式示例
查看>>
洛谷P3382 【模板】三分法(三分)
查看>>
简单了解JS中的几种遍历
查看>>
少走弯路的10条忠告
查看>>