/** * Adds a system property that tests can access. * This might be useful to transfer Ant properties to the * testcases when JVM forking is not enabled. * * @param sysp new environment variable to add * @since Ant 1.6 */ public void addConfiguredSysproperty(final Environment.Variable sysp) { // get a build exception if there is a missing key or value // see bugzilla report 21684 final String testString = sysp.getContent(); getProject().log("sysproperty added : " + testString, Project.MSG_DEBUG); getCommandline().addSysproperty(sysp); }
/** * * @param cmd command to configure * @param property property to set * @throws BuildException if the property is not correctly defined. */ protected void declareSysProperty( ExecTask cmd, Environment.Variable property) throws BuildException { addValue(cmd, "-J-D" + property.getContent()); }