The problem is what the file should be relative to. The code tries to make the file relative to the current imported file or the build file (and does not succeed due to a bug - the import stack does not currently have a pop in the code).
As always with these questions there is a history ;-). see for example: http://marc.theaimsgroup.com/?l=ant-dev&m=104341261225962&w=2 Peter On Wed, 2003-07-16 at 16:48, Dominique Devienne wrote: > You're kidding, right? How can that be? Isn't import a Task, with a > setFile(File) method? Don't the usual Ant rules apply? --DD > > > -----Original Message----- > > From: peter reilly [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 16, 2003 10:51 AM > > To: Ant Developers List > > Subject: Re: problems with import task > > > > On Wed, 2003-07-16 at 16:32, Erik Hatcher wrote: > > > > > > > > Sorry, but I don't understand. Can you please post a buildfile with > > > > the problem? We can then fix it and add it to the testcases. > > > > > > I did this: > > > > > > <import file="../shared.xml"/> > > > <import file="../shared-db.xml"/> > > > > There is an issue with relative files and import: > > > > The javadoc for the file attribute says: > > * the name of the file to import. How relative paths are resolved > > is still > > * in flux: use absolute paths for safety. > > > > The following should work: > > > > <import file="${basedir}/../shared.xml"/> > > <import file="${basedir}/../shared-db.xml"/> > > > > Peter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]