Source:
public Map<String, String> retrieveMavenProperties() throws IOException { Map<String, String> res = new HashMap<>(mavenProperties); if ( StringUtils.isNotBlank( mavenPropertiesFile )) { File file = new File (mavenPropertiesFile); if (file.exists() && file.isFile()) { try(FileInputStream fileInputStream = new FileInputStream(file)) { Properties properties = new Properties( ); properties.load( fileInputStream ); for (Map.Entry<Object,Object> entry : properties.entrySet()) { res.put((String) entry.getKey(), (String) entry.getValue()); } } } else { throw new IOException("Extra Maven Properties File " + mavenPropertiesFile + " does not exist or not a File" ); } } if (testJDKHome != null) { if (!testJDKHome.exists() || !testJDKHome.isDirectory()) { throw new IOException("Wrong Test JDK Home passed as a parameter: " + testJDKHome); } if (res.containsKey("jvm")) { System.out.println("WARNING: Maven properties already contain the 'jvm' argument. " + "Overriding the previous Test JDK home value '" + res.get("jvm") + "' by the explicit argument: " + testJDKHome); } else { System.out.println("Using custom Test JDK home: " + testJDKHome); } final String javaCmdAbsolutePath = new File(testJDKHome, "bin/java").getAbsolutePath(); res.put("jvm", javaCmdAbsolutePath); res.put("javaVersion", getJavaVersion(javaCmdAbsolutePath)); } if (StringUtils.isNotBlank(testJavaArgs)) { if (res.containsKey("argLine")) { System.out.println("WARNING: Maven properties already contain the 'argLine' argument. " + "Merging value from properties and from the command line"); res.put("argLine", res.get("argLine") + " " + testJavaArgs); } else { res.put("argLine", testJavaArgs); } } return res; }

Target:
public Map<String, String> retrieveMavenProperties() throws IOException { Map<String, String> res = new HashMap<>(mavenProperties); if ( StringUtils.isNotBlank( mavenPropertiesFile )) { File file = new File (mavenPropertiesFile); if (file.exists() && file.isFile()) { try(FileInputStream fileInputStream = new FileInputStream(file)) { Properties properties = new Properties( ); properties.load( fileInputStream ); for (Map.Entry<Object,Object> entry : properties.entrySet()) { res.put((String) entry.getKey(), (String) entry.getValue()); } } } else { throw new IOException("Extra Maven Properties File " + mavenPropertiesFile + " does not exist or not a File" ); } } if (testJDKHome != null) { if (!testJDKHome.exists() || !testJDKHome.isDirectory()) { throw new IOException("Wrong Test JDK Home passed as a parameter: " + testJDKHome); } if (res.containsKey("jvm")) { System.out.println("WARNING: Maven properties already contain the 'jvm' argument. " + "Overriding the previous Test JDK home value '" + res.get("jvm") + "' by the explicit argument: " + testJDKHome); } else { System.out.println("Using custom Test JDK home: " + testJDKHome); } final String javaCmdAbsolutePath = getTestJavaCommandPath(); res.put("jvm", javaCmdAbsolutePath); } if (StringUtils.isNotBlank(testJavaArgs)) { if (res.containsKey("argLine")) { System.out.println("WARNING: Maven properties already contain the 'argLine' argument. " + "Merging value from properties and from the command line"); res.put("argLine", res.get("argLine") + " " + testJavaArgs); } else { res.put("argLine", testJavaArgs); } } return res; }