How to combine several run configurations in Intellij together?

前端 未结 5 1556
闹比i
闹比i 2020-12-08 18:47

I have an intellij project with several modules. Some of the modules should be run as servers. For every server(module) i have a run configuration.

Can i bundle thos

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 19:37

    The previously accepted answer does not work for running multiple servers or any scripts which do not terminate.

    The good news is that now you can use the Compound run configuration which is build natively into the program to execute multiple servers simultaneously which do not terminate.

    In fact, even the MultiRun plugin states on their GitHub page that they recommend to use the Compound run configuration over their plugin.

    Official IntelliJ IDEA documentation

    Here's what the options looks like:

    Steps to get it working:

    1. First create your individual run configurations
    2. Then create a new compound configuration
    3. Now choose the individual run configurations you previously set up.
    4. Finally just run your new Compound configuration.

    All the individual configs will run simultaneously. Perfect for servers and other threads which do not exit!

提交回复
热议问题