tomcat-maven-plugin 403 error

前端 未结 21 1355
礼貌的吻别
礼貌的吻别 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:41

    There are a few steps one must be sure that are accomplished. this can be a true black hole.

    If your are using tomcat-maven-plugin from org.codehaus.mojo, you must use this configuration:

    
        http://localhost:8080/manager/text
        your_war_filename.war
        server_name_on_settingsxml
    
    

    Please ensure that you have 'server_name_on_settingsxml' server credentials defined on maven settings.xml. Use mvn tomcat:deploy (you must use this 'tomcat' prefix), this is the only way that when deploying the above configurations are read.

    However if you are using tomcat7-maven-plugin from org.apache.tomcat.maven, you must use mvn tomcat7:deploy. The 'tomcat7' prefix will read configuration from plugin:

            
                org.apache.tomcat.maven
                tomcat7-maven-plugin
    

    I was using tomcat:deploy, and i had on the pom.xml the tomcat7-maven-plugin defined. So, the maven deploy was never reading my configurations tag...

    If you ensure you have usernames and passwords correctly define and you use the correct plugin when deploying, it will work.

提交回复
热议问题