I have a particular test case that is run by surefire which fails when this vm arg is not set.
I am able to get the test to successfully pass if i run:
mvn test -Dtest=TestClass -Djava.net.preferIPv4Stack=true
This works great. Now I want to generalize this so that the vm arg is set for all maven builds.
In my .bashrc I've added
MAVEN_OPTS='-Djava.net.preferIPv4Stack=true'
I have confirmed via echoing the env variable that it is set. This unfortunately does not make a difference for my test case. What other considerations am I missing that would interfere here?
Thanks! R
Based on the documentation you can give a supplemental configuration to the maven-surefire-plugin: