首页 > 其他 > 详细

IDEA 社区版集成TOMCAT

时间:2018-11-10 11:37:59      阅读:152      评论:0      收藏:0      [点我收藏+]

直接在POM.XML中添加以下内容

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <port>8888</port>
        <path>/</path>
        <contextFile>src/main/webapp/META-INF/context.xml</contextFile>
    </configuration>
</plugin>

该插件会自动下载一个嵌入式的TOMCAT,可以在configuration配置节里面对这个嵌入式的TOMCAT配置端口,目录和content.xml信息。

要运行这个TOMCAT,需要在IDEA-RUN-DEBUG,editconfiguration,新增-MAVEN,名称输入TOMCAT7,commandline为:tomcat7:run

关于tomcat7-maven-plugin的官方信息见:http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin/usage.html

 

IDEA 社区版集成TOMCAT

原文:https://www.cnblogs.com/yesok/p/9938373.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!