yesok

直接在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

 

分类:

技术点:

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2021-04-01
  • 2021-07-02
  • 2022-01-01
  • 2022-01-01
  • 2021-04-01
猜你喜欢
  • 2021-07-23
  • 2022-01-01
  • 2021-04-21
  • 2021-12-26
  • 2021-05-16
  • 2021-07-11
  • 2021-10-07
相关资源
相似解决方案