4
votes

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
2
must you use Tomcat? I have a trick that I use for my development, actually deploying code to jetty server once I change the code(do this with maven).ant

2 Answers

1
votes

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.

0
votes

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