ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: <subant> with genericantfile changes basedir !
Date Thu, 17 Nov 2005 17:14:39 GMT
> What is happening is that genericantfile sets the basedir to something
> like src/localization/en, whereas I really want it to remain as it was,
> that is, just inherit the basedir from the project itself.
>
> Is there a way to override the basedir?  or a better way to implement
> this task?

As Antoine answered, this is by design, and consistent with the
basedir that defaults to "." when not specified in the build file. I
was in fact surprised when someone patched <subant> to add the
genericantfile option.

In your case, since <subant genericantfile> does not what you want,
you have several options:
1) Make your genericantfile build do everything relative to a given
property (for example top.dir), and pass that property to <subant>
explicitly.
2) Create tiny build files in each dir, which import your generic ant
file, and <subant> these normally.
3) Use a combination of Ant-Contrib's <for> and <ant> which allows you
more control over the basedir.

Last, I guess one could imagine adding a <mapper> element to <subant>
to map from the dir recursed into to the basedir to use, but what you
want to do is such a corner case IMHO, and can be worked around easily
enough already, that it's not really warranted and would complexify
<subant> needlessly, no? --DD

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


Mime
View raw message