zoukankan      html  css  js  c++  java
  • maven自动部署war包到tomcat 问题

    1.在 pom.xml

    <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.1</version>
    <configuration>
    <url>http://192.168.18.253:8080/manager/text</url>
    <username>admin</username>
    <password>admin</password>
    <server><span style="color:#ff0000;">tomcat7</span></server>
    <path>/junly-jee</path>
    </configuration>
    <executions>
    <execution>
    <id>tomcat-deploy</id>
    <phase>deploy</phase>
    <goals>
    <goal>deploy</goal>
    </goals>
    </execution>
    </executions>
    </plugin>


    2 . 在Tomcat的tomcat-users.xml里添加下面的信息

      <role rolename="manager-gui"/>
      <role rolename="manager-script"/>
      <user username="admin" password="admin" roles="manager-gui,manager-script"/>

    3.  启动Tomcat (这个很重要)

      不启动tomcat 会报   Cannot invoke Tomcat manager: Connection refused: connect ->

    4.  在Eclipse运行Maven build...

    4.  在Eclipse运行Maven build...

    在Goals后输入:

    tomcat7:deploy  


    注意标红的地方。

  • 相关阅读:
    POJ1045 Bode Plot
    POJ1044 Date bugs
    POJ1043 What's In A Name?
    POJ1042 Gone Fishing
    POJ1041 John's trip
    POJ1040 Transportation
    POJ1039 Pipe
    background-size属性
    一些CSS的备忘
    only-child选择器
  • 原文地址:https://www.cnblogs.com/mokingone/p/9109024.html
Copyright © 2011-2022 走看看