Skip to content

How to run

Vladislav Tankov edited this page Aug 28, 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.

Maven profiles note

In case you've installed application stating "different-ports" or "travis" profile you will need to start all tomcat services separately. If you've used "one-tomcat-for-all" profile you should start tomcat server defined in deployment/allintomcat executing mvn tomcat7:run-war -P one-tomcat-for-all. In all cases be sure to state correct profile (which you've used in process of installation) in every mvn command. In following text in all commands profile name will be substituted with <profile>. Place correct profile instead before executing command.

Manual console run using Maven goals

The simplest way to run is by running each service using mvn exec:java -P <profile> and mvn tomcat7:run-war-only -P <profile> (for one or all tomcat services depending on installation profile) 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 -P <profile> goal for each module ending with -service and mvn tomcat7:run-war -P <profile> and/or mvn tomcat7:run-war-only -P <profile> for dashboard, auth and editor services (or use allintomcat configuration and add mvn tomcat7:run-war-only -P <profile> for allintomcat).

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.