I have the issue that my mvn compile
fails on an internal project for some reason. Two other colleagues tried it as well and it does not fail on their machines.
We use Lombok there (I am not a fan but that was not my choice) and for some reason it fails with a StackOverflowError
. After some research I found a solution, adding:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<fork>true</fork>
<compilerArgs>
<arg>-J-Xss4M</arg>
</compilerArgs>
</configuration>
</plugin>
This works fine, but I'd like not to change the pom.xml if this only happens on my machine. So is there a way to add the Xss
flag to some environment variable?
I tried to add it via MAVEN_OPTS, in Windows as well as in IntelliJ -> Maven Runner Settings, with and without -J
in front, but it fails as before.