我正在尝试使用目标 clean tomcat7:deploy
在eclipse中部署我的maven项目在tomcat-users.xml中:
<user username="milma" password="milma" roles="manager-gui" />
pom xml中的:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:8080/company</url>
<server>TomcatServer</server>
<path>/company</path>
</configuration>
</plugin>
在m2 / settings.xml中:
<server>
<id>TomcatServer</id>
<username>company</username>
<password>company</password>
</server>
</servers>
</settings>
为什么我收到此错误?
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project milma: Cannot invoke Tomcat manager: Connection reset by peer: socket write error -> [Help 1]
是否有人可以帮助我。
答案 0 :(得分:1)
您上传的网址已经过了。它必须是:http://localhost:8080/manager/text
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>TomcatServer</server>
<path>/company</path>
</configuration>
因为URL是tomcat Manager servlet的URL,而不是应该调用应用程序的URL。