ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: ANT 1.7: ManifestClasspath How does it work??
Date Fri, 09 Nov 2007 18:18:38 GMT
On 11/9/07, Francis ANDRE <francis.andre@easynet.fr> wrote:
> The Ant documentation specifies for the <ant> task:
>
> dir: the directory to use as a basedir for the new Ant project. Defaults to the
> current project's basedir, unless inheritall has been set to false, in which
> case it doesn't have a default value. This will override the basedir setting of
> the called project.
>
> So, IMHO, calling as command line:
> C:\MyProj\MySubProj\ant -f build.xml echo-manifest
>
> or calling <ant dir="MySubProj" target="echo-manifest"/>
> from the build.xml file located in C:\MyProj should produce the same result
> since the basedir of the new Ant project is the same as the implicit basedir
> from the previous command line invocation.

As I already mentioned, your use of filelist is the likely culprit,
because it returns a String[], not a File[], so the meaning of the
names depend on the context. Sometimes the String-to-File conversion
uses the project's basedir, sometimes it uses the *current working
directory*. Given the symptoms you describe, it looks like the latter,
then it depends on *where* (which dir) you call Ant from, and not the
basedir. That's easily testable by calling "ant -f
MySubProject\build.xml ..." from MyProj, independently of the "super"
build.

Were you to try my proposed use of <fileset> or <pathelement
location=""> instead of <filelist>, instead of arguing about <ant>,
you might have been done already ;-) This has worked for me in the
past at least ;-))))    --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message