You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@locus.apache.org on 2000/07/25 16:08:34 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types Environment.java
conor 00/07/25 07:08:34
Modified: src/main/org/apache/tools/ant/types Environment.java
Log:
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>
Revision Changes Path
1.2 +6 -0 jakarta-ant/src/main/org/apache/tools/ant/types/Environment.java
Index: Environment.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Environment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Environment.java 2000/07/19 13:00:41 1.1
+++ Environment.java 2000/07/25 14:08:33 1.2
@@ -76,9 +76,15 @@
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.");