Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Tomcat Server with an artifact created by Maven into IntelliJ 13

It it is possible generate an artifact with maven before a Tomcat Server Run/Debug Configuration of IntelliJ 13?

I have tried to do something like this, using Maven profiles, in order to build the system for Development, Preview and Production environments.

Any Thoughts?

like image 550
Filipe Avatar asked Sep 22 '14 17:09

Filipe


People also ask

What is artifact in Tomcat?

An artifact is an assembly of your project assets that you put together to test, deploy, or distribute your software solution or its part.

Does IntelliJ have embedded Tomcat?

We're going to create a small web application that runs on Tomcat to demonstrate the integration in IntelliJ IDEA Ultimate: From the Welcome Screen select New Project. If you have an existing project open, click File > New.


1 Answers

To build a artifact with a profile you have to create a Maven Run/Debug configuration as in the following image

Maven Build

Then In Tomcat Run/Debug Configuration add above build in 'Before Launch' section by clicking the '+' button and select 'Run Another Configuration' then select the maven build.

Do Another Tool

The Result should like the below image.

Result

Now if you run Tomcat configuration first the maven build will be executed before Tomcat.

like image 77
Karthikeyan Vaithilingam Avatar answered Oct 04 '22 18:10

Karthikeyan Vaithilingam