Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Coverage tool: add support for system properties getting set after JVM startup #219
The Maven Surefire plugin, when given a configuration containing system properties (using "systemProperties" or "systemPropertyVariables"), only sets them into the System.getProperties() object at some later time, not at JVM startup as would happen if "-D" arg-line parameters had been used.
This prevents jmockit from knowing about properties like "coverage-classes" and "coverage-excludes", when it's initialized with the "-javaagent" JVM parameter, since Surefire won't have set them yet. To avoid this problem, the properties need to be read at a later time, after Surefire has had the opportunity to set them.