maven部署tomcat项目时403错误的解决方法

 

web模块的pom文件

pom.xml

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0</version>
    <configuration>
      <url>http://localhost:8080/manager/text</url>
      <server>localhost</server>
      <path>/${project.build.finalName}</path>
    </configuration>
</plugin>

maven的配置文件

~/.m2/settings.xml

<servers>
<server>
   <id>localhost</id>
   <username>admin</username>
   <password>s3cret</password>
</server>

 

tomcat的配置文件

tomcat-users.xml

<role rolename="manager-script"/>
<user username="admin" password="s3cret" roles="manager-script"/>

After changing tomcat-users.xml do not forget to restart the server. Also do not assign the manager-guirole with the manager-script to the same user.

相关文章:

  • 2021-07-07
  • 2021-08-14
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2021-11-10
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2021-06-27
  • 2021-11-11
  • 2021-08-14
  • 2022-01-21
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案