ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7046] New: - Exec doesn't find correct path if using nested ant files.
Date Tue, 12 Mar 2002 13:52:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7046>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7046

Exec doesn't find correct path if using nested ant files.

           Summary: Exec doesn't find correct path if using nested ant
                    files.
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jbleijen@csc.com


Consider a project called anttest that has a subdirectory called subdir
the 'toplevel' buildfile build.xml states:

<project name="testant" default="dist" basedir=".">
  <target name="dist">
	<ant antfile="build.xml" dir="subdir" target="dist"/> 
  </target>
</project>

the buildfile in the subdir states:
<project name = "subproject" default = "dist" basedir = ".">  
	<target name = "dist">       
		<!--description="Executing test.bat ..."/-->
		<exec dir = "." executable = "test.bat" os = "Windows NT">
		</exec>     
	</target>  
</project>

ant test.bat (located in the subdir) contains these lines:
@echo off
echo Current dir is:
cd

Than the project will build successfully if ant is executed in the subdirectory,
howerver ant will fail when executed in the toplevel.
BUILD FAILED

D:\anttest\subdir\build.xml:8: Execute failed: java.io.IOException: CreateProces
s: test.bat error=2

This behaviour is reproducable on Sun as well. What is wrong here (or am I 
missing the point). I tried the manuals but all <ant> states is:

dir: the directory to use as a basedir for the new Ant project. Defaults to the 
current directory.

Please help

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message