Without using maven, to run the app on tomcat from the Intellij IDE, all you have to do is create an artifact and a "tomcat" run configuration pointing to that artifact, this way you can see tomcat output, restart the server, and other stuff right in the IDE.
Now using maven, there's no need to create an artifact, because maven already does the compiling, packaging, etc.
I know i can deploy it using the command mvn tomcat7:redeploy
but this way i can't see standart output/errors and debug.
So what is the standard way to run the app from IntelliJ without having to create an artifact?
In pom.xml
add
<build>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<uriEncoding>UTF-8</uriEncoding>
<path>/your-path</path>
<update>true</update>
</configuration>
</plugin>
</build>
In IntelliJ, open Menu > View > Tool Windows > Maven Projects
Plugins > tomcat7 > tomcat7:run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With