maven部署tomcat项目,403错误解决

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.

你可能感兴趣的:(tomcat)