Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 views
in Technique[技术] by (71.8m points)

How to combine several run configurations in Intellij together?

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 those run configurations together, so i dont need to click run or stop five times?

If it matters, the project is fully mavenized.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

Screenshot of what the setting 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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...