How to use the command mav jetty:run?

There is a simple display as below:

Step 1:

You should generate a web project with maven first.

you could go to "Using Maven to generate a Java Project or Web project" to know how to generate a Web project with maven in Windows 7.

Step 2:

Change the pom.xml in as bellow in the web project you have generated just now.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.b510.shopping</groupId>
<artifactId>shopping-core</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>shopping-core Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>shopping-core</finalName>
<pluginManagement>
<!--Configuration for Jetty-->
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

Step 3:

Type the command mvn jetty:run

 NOTE: You shoud go to the "F:/maven/shopping-core" directory to execute above command.

Step 4:

 Open a broswer and type "http://localhost:8080/shopping-core"

========================================================

More reading,and english is important.

I'm Hongten

大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。
Hongten博客排名在100名以内。粉丝过千。
Hongten出品,必是精品。

E | hongtenzone@foxmail.com  B | http://www.cnblogs.com/hongten

========================================================

最新文章

  1. Atitit onvif协议获取rtsp地址播放java语言 attilx总结
  2. IOS UITableview代理方法总结
  3. JavaScript之全局变量和隐式全局变量
  4. OC基础语法之方法
  5. jquery双击事件
  6. w3wp.exe(IIS ) CPU 占用 100% 的常见原因及解决办法
  7. SQL中关于字符串的处理
  8. Ubuntu(Linux)使用Eclipse搭建C/C++编译环境
  9. poj2407 Relatives 欧拉函数基本应用
  10. CPU大小端判断
  11. 纯javascript 回到 顶部 实例
  12. Tomcat学习笔记 - 错误日志 - NetBeans配置tomcat出错情况总结 -- 部署错误: 启动 Tomcat 失败。-- &#39;127.0.0.1&#39; 不是内部或外部命令,也不是可运行的程序
  13. Qt---自定义界面之QStyle
  14. Codeforces 850C Arpa and a game with Mojtaba
  15. Java-Maven(一):Maven的简介与安装
  16. 基于OpenStreetMap计算驾车距离(Java)
  17. (6)tcp-socket
  18. 破解第三课 关键跳和关键CALL
  19. jq的$.each()方法
  20. Sharepoint 2016 - Deploy Office Online Server

热门文章

  1. js判断当前的访问是手机还是电脑
  2. NS2中修改载波侦听范围和传输范围
  3. [Linux] yum和apt-get用法及区别
  4. ASP.NET 5探险(2):上传文件
  5. x264 - 高品质 H.264 编码器
  6. HR外包系统 - 账款
  7. App界面交互设计规范
  8. 用c语言写一个函数把十进制转换成十六进制(转)
  9. excel、csv、txt文件数据读取
  10. cdh环境下,spark streaming与flume的集成问题总结