How to deploy WAR with Maven to Tomcat?

后端 未结 1 356
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 05:49

I use the Maven with Eclipse. Is possible build the project and then deploy built WAR file to Tomcat server?

I use Windows. I can build WAR file, and al

1条回答
  •  北海茫月
    2020-12-29 06:14

    Meanwhile I resolved it. There were a few issues.

    Firstly I set Goal in the Eclipse run configuration to tomcat:deploy.

    And I changed pom.xml following

    
      org.codehaus.mojo
      tomcat-maven-plugin
      
        http://localhost:8080/manager/text
        Apache_Tomcat_7_x86
        /HelloWorld
      
    
    

    URL in configuration depends on Tomcat version. For me works text, for others works html on end of URL. And of course, in tomcat-users.xml must be set role manager-script or manager-gui.

    Maybe it helps to others.

    0 讨论(0)
提交回复
热议问题