[英]maven tomcat7:deploy fails with status code:403, ReasonPhrase:Forbidden
I'm using a tomcat maven plugin to deploy my java web app. 我正在使用tomcat maven插件来部署我的java web应用程序。 Now everythings work when i use tomcat 7.0.32, this is my plugin configuration 现在,当我使用tomcat 7.0.32时,每个人都可以工作,这是我的插件配置
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<server>my-tomcat</server>
<path>/myapp</path>
</configuration>
</plugin>
my settings.xml configuration 我的settings.xml配置
<servers>
<server>
<id>my-tomcat</id>
<username>manager</username>
<password>pwd</password>
</server>
</servers>
my tomcat-users.xml 我的tomcat-users.xml
<role rolename="manager-gui"/>
<user username="managerGui" password="pwd" roles="manager-gui"/>
<role rolename="manager-script"/>
<user username="manager" password="pwd" roles="manager-script"/>
while if use a different version of tomcat, for example 7.0.50, i get the following error 而如果使用不同版本的tomcat,例如7.0.50,我会收到以下错误
code:403, ReasonPhrase:Forbidden 代码:403,ReasonPhrase:禁止
I also try to connect on tomcat 7.0.50 at 我也尝试在tomcat 7.0.50上连接
http://localhost:8080/manager/text
and not work, while with the 7.0.32 version i get the authentication pop-up. 并且不工作,而在7.0.32版本中,我获得了身份验证弹出窗口。
Where am I doing wrong? 我哪里做错了?
I faced similar issue, solved it by creating settings.xml in C:\\Users{userName}\\.m2\\ with following content <settings> <servers> <server> <id>my-tomcat</id> <username>manager</username> <password>pwd</password> </server> </servers> </settings>
我遇到了类似的问题,通过在C:\\ Users {userName} \\。m2 \\中创建settings.xml解决了这个问题,其中包含以下内容<settings> <servers> <server> <id>my-tomcat</id> <username>manager</username> <password>pwd</password> </server> </servers> </settings>
It seems for some reason plugin not picking up credentials from %MAVEN_HOME%/conf/settings.xml and expect it to present in C:\\Users{userName}.m2\\settings.xml 由于某种原因,插件似乎没有从%MAVEN_HOME%/ conf / settings.xml中获取凭据并期望它出现在C:\\ Users {userName} .m2 \\ settings.xml中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.