Browse Source

Allow paths to be passed to environment variables of exec task.

Example usage
  <target name="exectest">
      <exec command="exectest.bat" dir=".">
        <env key="ANT_TEST" path="../test:../test2"/>
      </exec>
  </target>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267839 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
c7321fa321
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/types/Environment.java

+ 6
- 0
src/main/org/apache/tools/ant/types/Environment.java View File

@@ -76,9 +76,15 @@ public class Environment {
public void setKey(String key) {
this.key = key;
}
public void setValue(String value) {
this.value = value;
}
public void setPath(Path path) {
this.value = path.toString();
}

public String getContent() throws BuildException {
if (key == null || value == null) {
throw new BuildException("key and value must be specified for environment variables.");


Loading…
Cancel
Save