Running Tomcat Server with artifact created by Maven in IntelliJ 13

Is it possible to create an artifact with maven before Tomcat Server starts / debugs the IntelliJ 13 configuration?

I tried to do something similar using Maven profiles to create a system for development, preview, and production environments.

Any thoughts?

+6
source share
1 answer

To create an artifact with a profile, you need to create a Maven Run / Debug configuration, as shown in the following figure

Maven build

Then in Tomcat Run / Debug Configuration, add the assembly above in the "Before Run" section by clicking the + button and select "Run Another Configuration", then select the maven assembly.

Make another tool

The result should look like this.

Result

Now, if you run the Tomcat configuration first, the maven build will complete before Tomcat.

+21
source

Source: https://habr.com/ru/post/975667/


All Articles