DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30569>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30569

basedir is not set correctly when calling subant task through ant task

           Summary: basedir is not set correctly when calling subant task
                    through ant task
           Product: Ant
           Version: 1.6.2
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


- invoke the <ant> task from within an ant script, calling some other ant 
script that in turn invokes <subant>
- <subant> will in turn successfully call into its target ant script, but the 
basedir will be set incorrectly
- so in this final ant script, any attempts to access files with relative paths 
will fail


Example:

We have files:

/opt/workspace/file_a.xml
/opt/workspace/file_b.xml
/opt/workspace/subdir/file_c.xml
/opt/workspace/subdir/file_d.xml

file_a.xml says:
<target name="run">
   <ant antfile="file_b.xml" dir="/opt/workspace" target="run" 
inheritAll="false" />
</target>

file_b.xml says:
<target name="run">
   <subant antfile="file_c.xml" inheritall="false" target="run">
      <buildpathelement location="subdir"/>
   </subant>
</target>

file_c.xml says:
<target name="run">
   <copy file="./file_d.xml" todir="./" />
</target>

----

If you run this, there will be a failure to find file_d.xml, with the 
complaint: "/opt/workspace/subdir/file_d.xml not found"

I have tried to overcome this with various permutations toggling "inheritall" 
on and off and trying to force values on "basedir", but in the end, it is a 
fundamental problem that "basedir" simply is set incorrectly by ant and cannot 
be overridden successfully.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to