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 14475] New: - <ant> task used to call subdirectory confuses base directory
Date Tue, 12 Nov 2002 15:44:27 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=14475>.
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=14475

<ant> task used to call subdirectory  confuses base directory

           Summary: <ant> task used to call subdirectory  confuses base
                    directory
           Product: Ant
           Version: 1.5.1
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: dgreer@fedex.com


I have a project in which a top level build.xml calls subdirectories
each containing their own build.xml.  When one of these build.xml attemts
to use the <exec> target to execute a script in one of its subdirectories, a
java.io.IOException is thrown because it can't find the script.  I've tried
printing out the ${basedir} property which looks fine before the point of
execution.  I've also executed the UNIX "pwd" command which indicates I'm in the
right subdirectory.  I can't really pinpoint what the problem is.  Here is an
example of what I'm doing:

[directory bugexample]
----- begin build.xml snippet --------
<target name="build" description="default target">
    <antcall target="submodules">
        <param name="target" value="build"/>
    </antcall>
</target>

<target name="submodules">
    <echo>[Module test - target: ${target}]</echo>
    <ant dir="test" target="${target}"/>
</target>
----- end build.xml snippet --------

[directory bugexample/test]
----- begin build.xml snippet --------
<target name="build" description="build this package">
    <exec executable="testdir/test.sh"/>
</target>
----- end build.xml snippet --------

[directory bugexample/test/testdir]
[filename: test.sh]
------ begin test.sh source ----
#!/bin/sh

echo "hello world!"
-------end test.sh source ------

--
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