Skip to content

How to run

Timofey Bryksin edited this page Aug 3, 2016 · 9 revisions

How to run WMP

WMP is a multi-application environment that encompasses a number of web services, so this page describes how it could be properly run.

Manual console run using Maven goals

The simplest way to run is by running all services using mvn exec:java and mvn tomcat7:run-war-only console commands. This is the way Travis CI runs everything (see travis configuration file for details). This approach is good enough when your goal is to run everything one single time, but it's not very useful for development since you can't even restart the services without killing all the processes.

Manual run from IDEA using Maven goals

Open IDEA's Maven Projects tab and double click exec:java goal for each module ending with -service and mvn tomcat7:run-war and/or mvn tomcat7:run-war-only for robots-editor module.

This will create more usable environment: IDEA will create a tab for each maven goal run and all of them can be shut and re-run separately.

Automatic run from IDEA using Multirun plugin

Install Multirun IDEA plugin (Settings -> Plugins).

Using Maven Projects tool window or Run -> Edit Configurations window create one run configuration for each maven goal that need to be run.

When done Edit Configurations window should look like this:

Create a new Multirun run configuration (click the green + top-left icon, select Multirun). Add all maven configurations in the Choose configurations to run window. The order of the configurations matters, to work correctly robots-editor should be the last one in the list. Set the delay value into 2-3 seconds (should be even more if your hardware is super slow).

To start everything just run this newly created Multirun configuration. IDEA should start a tab for each running sub-configuration.

NOTE: current Multirun version has some issues with re-using tabs when re-running the configuration, so be careful to stop everything using Run -> Stop Multirun command. Run -> Stop could also be used if the goal is to start everything and restart only some services later using their own (not Multirun-based) configurations.