您的位置:首页 > 运维架构 > Tomcat

maven 创建web 项目及tomcat 启动步骤

2016-01-21 13:37 645 查看

大家好:为大家分享一下 maven 创建web 项目及tomcat 启动步骤

创建maven web项目

1.


2.


3.


4.


5.


6.


7.


8.


9.


接下来是最最最重要的pom.xml 文件了。

<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<groupId>com.text.tomcat</groupId>
<artifactId>TextTomCat</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<build>
<plugins>
<!-- tomcat7 启动所需jar包 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!--端口 -->
<port>8800</port>
<!--注意名称 -->
<path>/TextTomCat</path>
<uriEncoding>UTF-8</uriEncoding>
<!--注意此名字 启动时会用到 -->
<server>tomcat7</server>
</configuration>
</plugin>
</plugins>
</build>
</project>


以上就完成了 maven 创建,接下来完成tomcat 启动。





注意 启动时为:tomcat7:run 不要忘记 :

点击Run tomcat启动



tomcat 启动日志

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  tomcat web maven