2

I need to add some flags for unit tests, and want to share them for all team members. IntelliJ has a solution to share run configurations, but default configurations doesn't have share checkbox:

enter image description here

Of course, these settings are stored in idea/.workspace, but I don't want to store to the repository all my stuff, like recent searches. Is there any solution to store default run configurations in the repository?

Pang
  • 9,564
  • 146
  • 81
  • 122
neworld
  • 7,757
  • 3
  • 39
  • 61

1 Answers1

0

There is a workaround to pass common params to any project's JUnit run configuration which relies on IntelliJ IDEA's feature of picking maven surefire settings.

So it's sufficient to add common params to the main pom:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <!-- force 7-bit default encoding to ensure that nothing depends on it -->
        <!-- take JFR profiling snapshot on each run -->
        <argLine>-Dfile.encoding=ASCII -Xmx512M -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=name=EcpTest,duration=999s,filename=target/ecp.jfr,settings=profile</argLine>
    </configuration>
</plugin>
Vadzim
  • 24,954
  • 11
  • 143
  • 151