deploy maven war file to tomcat from IntelliJ

为君一笑 提交于 2019-12-12 12:06:44

问题


I have a maven war project. How can I do do the following from within IntelliJ IDEA:

  • create .war file
  • deploy it to a local Tomcat
  • start Tomcat in debug mode

回答1:


You need to configure maven-war-plugin to build your war. tomcat<x>-maven-plugin will allow you to deploy it to a tomcat instance and may in fact do the war generation too - I use JBoss at my current office so haven't got any experience with the maven tomcat integration.

see http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/ and http://maven.apache.org/plugins/maven-war-plugin/ for some more details on both of these plugins.




回答2:


You can use the cargo plugin too. It works pretty well for me.



来源:https://stackoverflow.com/questions/10349678/deploy-maven-war-file-to-tomcat-from-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!