Command MVN jetty: Run

Source: Internet
Author: User

How to Use the command MAV jetty: run?

There is a simple display as below:

Step 1:

You shoshould generate a web project with Maven first.

You coshould go"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 commandMVN jetty: Run

 Note:You shoud go to the "F:/Maven/shopping-core" directory to execute abve command.

Step 4:

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

 

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

More reading, and English is important.

I'm hongten

 

E | [email protected] B | http://www.cnblogs.com/hongten

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

 

Command MVN jetty: Run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.