maven工程的创建(四)--运行测试

来源:互联网 发布:账户表数据库设计 编辑:程序博客网 时间:2024/06/02 04:33

运行的工程

要运行工程,需要运行聚合工程也就是taotao-manager。
这里写图片描述

Tomcat插件

在taotao-manager工程的pom文件中添加如下内容:
eclipse中就不用在配置tomcat了

<build>        <!-- 配置插件 -->        <plugins>            <plugin>                <groupId>org.apache.tomcat.maven</groupId>                <artifactId>tomcat7-maven-plugin</artifactId>                <configuration>                    <port>8080</port>                    <path>/</path>                </configuration>            </plugin>        </plugins>    </build>

启动工程

使用maven命令:

clean tomcat7:runtomcat7指定使用tomcat7的插件。注意:1、需要把taotao-parent工程安装到本地仓库。Install2、需要把taotao-common安装到本地仓库。Install步骤:右击项目manager--》run as--》maven install

这里写图片描述