You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/06/22 21:28:03 UTC
[Bug 911] - task works locally, but not when called remotely
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=911
*** shadow/911 Sun May 20 17:22:53 2001
--- shadow/911.tmp.22214 Fri Jun 22 12:28:03 2001
***************
*** 1,19 ****
! Bug#: 911
! Product: Ant
! Version: 1.3
! Platform: PC
! OS/Version: Linux
! Status: NEW
! Resolution:
! Severity: Normal
! Priority: High
! Component: Core tasks
! AssignedTo: ant-dev@jakarta.apache.org
! ReportedBy: breese@grandcentral.com
! URL:
! Cc:
! Summary: <exec> task works locally, but not when called remotely
!
I have two build.xml files. One is a master build file which simply calls other
build files. In one of my sub-build files I am calling:
--- 1,19 ----
! +============================================================================+
! | <exec> task works locally, but not when called remotely |
! +----------------------------------------------------------------------------+
! | Bug #: 911 Product: Ant |
! | Status: NEW Version: 1.3 |
! | Resolution: Platform: PC |
! | Severity: Normal OS/Version: Linux |
! | Priority: High Component: Core tasks |
! +----------------------------------------------------------------------------+
! | Assigned To: ant-dev@jakarta.apache.org |
! | Reported By: breese@grandcentral.com |
! | CC list: Cc: |
! +----------------------------------------------------------------------------+
! | URL: |
! +============================================================================+
! | DESCRIPTION |
I have two build.xml files. One is a master build file which simply calls other
build files. In one of my sub-build files I am calling:
***************
*** 85,87 ****
--- 85,127 ----
/home/max/BigBird/src/brivo/core/build.xml:195: Exec returned: 255
Total time: 10 seconds
+
+ ------- Additional Comments From mark.patton@level3.com 2001-06-22 12:28 -------
+ My investigations on this same problem were as follows:
+ - <exec> tasks when run under ANT 1.2 do NOT exhibit this failure
+ - <exec> tasks executed by ANT 1.3 on UNIX platforms exhibit this failure under
+ the following circumstances:
+ + The current working directory of the user (i.e., user.dir system
+ property) when ANT is started is different from the value used for
+ the "execution" directory for the <exec> task (i.e., "dir" attribute
+ of <exec> command).
+ + When the "dir" attribute is not supplied in the <exec> tag, the "execution"
+ directory is defaulted to the directory where the buildfile (i.e.,
+ build.xml) containing the <exec> task resides (this would satisfy the
+ first point if the buildfile was in a directory other than the user's
+ current working directory where he started ANT).
+
+ These observations led me to the Execute.java source file where I realized that
+ ONLY in the case where the user's current working directory is DIFFERENT from
+ the requested command "execution" directory will ANT use a provided OS-
+ specified script (antRun.bat for Win9X and antRun for UNIX) to accomplish the
+ execution of the command.
+
+ When I compared the difference between the antRun UNIX script for ANT 1.2 and
+ ANT 1.3, I found something very interesting. The ANT 1.3 script for UNIX had
+ DOS end-of-line characters (^M) embedded in the file. Well..., knowing that
+ UNIX and DOS don't get along in this area, I removed the DOS artifacts and
+ everything started working just fine.
+
+ I was unable to locate the antRun script in the Jarkarta CVS Repository that
+ was a part of the ANT 1.2 build. I could only find the version (only one version
+ exists) for the ANT 1.3 build. Strangely enough though, when I downloaded the
+ source for antRun from CVS, I didn't notice the script source having any
+ embedded DOS artifacts. I'm not sure where they got introduced at, but they
+ were there when I downloaded and installed the ANT 1.3 binary bundle.
+
+ Maybe someone can confirm that their installation has the same problem with the
+ antRun script and then a developer could look into how they may have been
+ introduced into the release TAR files.
+
+ I hope this is really the solution to the problems described by this Bug.
\ No newline at end of file