Add '.mvn/jvm.config' in commons, rendering & platform?

The goal is to add JVM required memory flags so that anyone running mvn ... will have it working even if he/she doesn’t have MAVEN_OPTS or .mavenrc set.

It also allows to have the same values on the CI and locally.

See Maven – Configuring Apache Maven

Potential issues:

  1. I need to check which one has precedence if you have them all defined though.
  2. Maybe the local memory reqs should not be the same as the CI ones since you usually don’t execute the full build locally (even if I do that from time to time on my side for ex).

WDYT?

It depends if this configuration only apply to where you are running Maven or if you also inherit it when only building a single sub module (in which case it’s a -1 for me since there is no reason to make everyone allocate tons of memory to build a single platform module, which is by far the most common use case outside of the ci).

Are you saying that you change your maven memory settings depending on whether you build a single module or several? Personally I have MAVEN_OPTS set and I never change it.

Are you saying that you change your maven memory settings depending on whether you build a single module or several?

No that’s not my point, my point is that not everyone has the luxury to allocate 2G of RAM to Maven despite the fact that it needs a fraction of that to build a single of a few modules which is the most common use case and I don’t think it’s a good idea to make the huge memory allocation the default.