How to share (VCS) run configurations templates with IntelliJ IDEA

Viewed 247

I've dug a lot and learned how to share the run configurations in IntelliJ IDEA CE (presently using 2019.3.4) via the in .idea/runConfigurations/*.xml files. When we check those file into VCS (Git) others get them and all works as expected.

The question is related to sharing the templates for JUnit and Application configurations. When created manually they end up in .idea/workspace.xml which is not meant for or suitable for sharing (often modified, has personal preferences and even screen locations, ...).

I could not find any mention of how to do this so I tried extracting the relevant <component ...>...</component> fragments into standalone files inside .idea/runConfigurations/. This seemed to work but weird things started happening - IDEA renamed the files from my original names (whatever they were, forgot), to:

  1. .idea/_template__of_JUnit.xml and
  2. .idea/_template__of_Application.xml

I was happy with that and submitted those to Git but then other people commented how IDEA keeps renaming those files further.

What is the proper way to accomplish this?

Thanks!

1 Answers

IntelliJ IDEA doesn't support sharing run/debug configuration defaults at the moment.

Related