

To achieve this you'll need to head over to Run -> Edit Configurations, click the "+" and select Maven. Now that you're done with the Tomcat configuration you want the ability to build using Maven and deploy to the now working Tomcat server. If you go to Tools -> External Tools and click on Tomcat, it should start the Tomcat server. The working directory should be set automatically.

And last but not least set an argument with the command jpda run. For example mine is C:\apache-tomcat-8.5.34\bin\catalina.bat.

For tool settings, select the catalina.bat file, usually located in the bin folder of your Tomcat installation. You can add a new tool with whatever name you want. Make sure you install Tomcat in a place that doesn't require admin access, for example next to your project.Īfter that, open File -> Settings and expand Tools and select External Tools. You can get it from here (opens new window).
#How to install maven in intellij how to#
I found some inspiration on Github, but not in the form I wanted, but it was good enough to get me started.īellow is a short tutorial on how to setup Tomcat in Intellij IDEA Community to run/debug, and how to use Maven to build your project and then deploy it to Tomcat. Many Google searches later I found a few plugins that might do the trick but when I tried using them, the famous NullPointerException happened and I started looking for an alternative. The first thing I noticed is that Intellij IDEA Community does not have a Tomcat plugin, unlike the Ultimate edition, that has one out of the box. I got cracking and started configuring the project on my local machine.
#How to install maven in intellij code#
The project uses Maven as a build tool and it deploys the code to a Tomcat server. Recently I started working on a project that required me to have the backend part installed locally, instead of using a remote backend.
