Tomcat7 Maven Tomcat部署失败,密码为非空

Tomcat7 Maven Tomcat部署失败,密码为非空,tomcat7,maven-3,Tomcat7,Maven 3,当密码为空时,我能够通过maven tomcat插件成功地将war部署到tomcat上: settings.xml <server> <id>local_tomcat</id> <username>admin</username> <password></password> </server> 知道是什么原因吗 编辑: My pom.xml具有: <plugin> <

当密码为空时,我能够通过maven tomcat插件成功地将war部署到tomcat上:

settings.xml

<server>
  <id>local_tomcat</id>
  <username>admin</username>
  <password></password>
</server>
知道是什么原因吗

编辑:

My pom.xml具有:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>tomcat-maven-plugin</artifactId>
  <configuration>
     <server>local_tomcat</server>
     <url>http://localhost:8080/manager/html</url>
  </configuration>
</plugin>

org.codehaus.mojo
TomcatMaven插件
本地野猫
http://localhost:8080/manager/html
基于密码,如果密码为空,则不应在插件的配置块中定义服务器标记


此外,我建议在使用文本管理器端点(
http://localhost:8080/manager/text
)和只分配了管理器脚本角色(而不是管理器gui)的用户。另见

[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project myapp: Cannot invoke Tomcat manager: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/html/deploy?path=%2Fmyapp&war= -> [Help 1]
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>tomcat-maven-plugin</artifactId>
  <configuration>
     <server>local_tomcat</server>
     <url>http://localhost:8080/manager/html</url>
  </configuration>
</plugin>