pom.xml中配置插件的作用

pom.xml里面的配置代码

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <configuration>
                <path>/</path>
                <port>8080</port>
            </configuration>
        </plugin>
    </plugins>
</build>

  

 

这样我们运行项目的时候就不用在使用本地的tomcat,直接在pom.xml所在的目录下打开命令窗口(shift+目录下右键菜单),执行mvn tomcat:run就可以运行项目。

posted @ 2021-01-28 18:51  Yaoyaoo  阅读(832)  评论(0)    收藏  举报