我在部署到tomcat作爲服務安裝到遠程機器時遇到問題。 我的Tomcat用戶如下:tomcat7 maven插件部署失敗
<tomcat-users>
<role rolename="manager"/>
<user username="admin" password="admin" roles="tomcat, admin, manager-gui, manager-script"/>
</tomcat-users>
我的settings.xml是:
<settings>
<pluginGroups>
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
</pluginGroups>
<servers>
<server>
<id>tomcat7</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
</settings>
而且我的pom.xml有以下幾點:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<server>tomcat7</server>
<url>http://localhost:8081/manager/text</url>
<warFile>target/editor-${project.version}.war</warFile>
</configuration>
我不斷獲取maven控制檯輸出的401未授權。你能告訴我我做錯了什麼嗎?
http://stackoverflow.com/questions/3714080/tomcat-7-maven-plugin –
你可以看到我的回答在http://stackoverflow.com/questions/16230666/failed-to-execute-goal-org-codehaus-mojotomcat-maven-plugin1-1deploy-default/16292897#16292897 – sancho21
請參閱我對http:// stackoverflow的回答。com/questions/16230666/failed-to-execute-goal-org-codehaus-mojotomcat-maven-plugin1-1deploy-default/16292897#16292897 – sancho21