![JAR search and dependency download from the Maven repository](/logo.png)
com.slickqa.junit.testrunner.commands.SystemPropertyOption Maven / Gradle / Ivy
package com.slickqa.junit.testrunner.commands;
import picocli.CommandLine;
import java.util.HashMap;
import java.util.Map;
public class SystemPropertyOption {
@CommandLine.Option(names={"-D"}, description = "Set system properties the same as if you passed them on the java command before the jar, ie name=value")
Map systemProperties = new HashMap<>();
public void setProperties() {
if(systemProperties != null && systemProperties.size() > 0) {
for(String propertyName : systemProperties.keySet()) {
System.setProperty(propertyName, systemProperties.get(propertyName));
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy