tomcat-maven-plugin 403 error

前端 未结 21 1374
礼貌的吻别
礼貌的吻别 2020-12-07 18:05

When I use mvn tomcat:deploy of tomcat-maven-plugin there is a 403 error:

Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.0:deploy (default-cli) on pr

21条回答
  •  庸人自扰
    2020-12-07 18:40

    If you are using Tomcat 7:

    1. Change your configuration in pom.xml to use the Tomcat 7 version of the plugin

      
          org.apache.tomcat.maven
          tomcat7-maven-plugin
          2.1
          
              http://127.0.0.1:8080/manager/html
              TomcatServer
              /your_context
              some_user_name
              some_password
          
      
      

    Notice the and values - they are DIFFERENT from the ones for Tomcat 6.

    1. Don't forget to change the "tomcat:deploy" to "tomcat7:deploy" in your scripts, or External Tools Configurations launchers in Eclipse.
    2. Add a server configuration to your settings.xml, usually located under .m2 folder
    
        TomcatServer
        some_user_name
        some_password
    
    
    1. If you need additional options, like deploying a WAR file located in a non-standard folder, visit: Tomcat 7 Maven Plugin

提交回复
热议问题