I am using a library and I need to pass some VM parameters on launch (e.g.
java -Dcom.kgasoft.param=true -jar mysoftware.jar). I had some unit tests on Jenkins and they failed, because I wasn’t able to pass these VM params.
I tried some Jenkins plugins, but I wasn’t able to achieve the required result. As it turns out I could use surefire plugin’s parameters. So, assuming we use Maven, in my pom file I specified the following in the
This did the trick and the unit tests now pass!