前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Command mvn jetty:run

Command mvn jetty:run

作者头像
Hongten
发布2018-09-13 11:01:50
1.1K0
发布2018-09-13 11:01:50
举报
文章被收录于专栏:HongtenHongtenHongten

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"

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-11-01 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档