pom.xml中添加
<build>
<finalName>igobuy</finalName>
<plugins><!-- tomcat 的插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://xxx:8081/manager/text</url> 必须是text 不能是html
<username>1111</username>
<password>1111</password>
<server>igobuy.deploy</server>
<path>/igobuy</path>
</configuration>
<executions>
<execution>
<id>tomcat-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>igobuy</finalName>
<plugins><!-- tomcat 的插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://xxx:8081/manager/text</url> 必须是text 不能是html
<username>1111</username>
<password>1111</password>
<server>igobuy.deploy</server>
<path>/igobuy</path>
</configuration>
<executions>
<execution>
<id>tomcat-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
tomcat-users.xml中添加
<role rolename="manager-gui"/>
<role rolename="manager-script" />
<user username="1111" password="1111" roles="manager-gui,manager-script"/>
</tomcat-users>
manager-script这是对于外部接口的权限用户对应text上传