You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dan Finkelstein <da...@nosimpler.com> on 2005/11/17 15:51:33 UTC
with genericantfile changes basedir !
Hi --
I have a number of <ant> sub-projects that I wish to call. I call them
with the same ant build file. I have a number of directories such as
src/localization/en
src/localization/fr
src/localization/es
representing all the languages I need to build for. And I use the
<dirset> element of <subant> to pluck out each language, "en", "fr",
"es", etc.
I'm also using the genericantfile attribute in <subant> to specify the
name of the build file.
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?
Thanks,
Dan
Re: with genericantfile changes basedir !
Posted by Dominique Devienne <dd...@gmail.com>.
> 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
Re: with genericantfile changes basedir !
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Dan,
ant-contrib is a project on source forge :
AntContrib
The Ant-Contrib project is a collection of user supplied task (like an
|<if>| task) and a development playground for experimental tasks like a
C/C++ compilation task for different compilers.
Compatibility: 1.4.1 and above
URL: http://ant-contrib.sourceforge.net/
Contact: project mailing list
<http://sourceforge.net/mail/?group_id=36177>
License: Apache Software Foundation license
Cheers,
Antoine
Dan Finkelstein wrote:
> Hi Antoine,
>
> I'm afraid I don't know which contribution you're talking about. I
> don't see one that has to do with for-each !! Which do you mean?
>
> Thanks again,
> Dan
>
> At 11:50 PM 11/16/2005, Antoine Levy-Lambert wrote:
>
>> Hello Dan,
>>
>> maybe you could try to use for or for-each in ant-contrib to do what you
>> want..
>> If you read the documentation of subant, it is stated clearly AFAIK that
>> genericantfile changes the base dir.
>>
>> Cheers,
>> Antoine
>>
>> Dan Finkelstein wrote:
>>
>> > Hi --
>> >
>> > I have a number of <ant> sub-projects that I wish to call. I call
>> > them with the same ant build file. I have a number of directories
>> > such as
>> > src/localization/en
>> > src/localization/fr
>> > src/localization/es
>> > representing all the languages I need to build for. And I use the
>> > <dirset> element of <subant> to pluck out each language, "en", "fr",
>> > "es", etc.
>> >
>> > I'm also using the genericantfile attribute in <subant> to specify the
>> > name of the build file.
>> >
>> > 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?
>> >
>> > Thanks,
>> > Dan
>> >
>> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with genericantfile changes basedir !
Posted by Gisbert Amm <gi...@webde.de>.
I think the mentioned ant-contrib is http://ant-contrib.sourceforge.net/
Regards,
Gisbert Amm
Dan Finkelstein wrote:
>
> I'm afraid I don't know which contribution you're talking about. I
> don't see one that has to do with for-each !! Which do you mean?
>
> At 11:50 PM 11/16/2005, Antoine Levy-Lambert wrote:
>> Hello Dan,
>>
>> maybe you could try to use for or for-each in ant-contrib to do what you
>> want..
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with genericantfile changes basedir !
Posted by Dan Finkelstein <da...@nosimpler.com>.
Hi Antoine,
I'm afraid I don't know which contribution you're talking about. I don't
see one that has to do with for-each !! Which do you mean?
Thanks again,
Dan
At 11:50 PM 11/16/2005, Antoine Levy-Lambert wrote:
>Hello Dan,
>
>maybe you could try to use for or for-each in ant-contrib to do what you
>want..
>If you read the documentation of subant, it is stated clearly AFAIK that
>genericantfile changes the base dir.
>
>Cheers,
>Antoine
>
>Dan Finkelstein wrote:
>
> > Hi --
> >
> > I have a number of <ant> sub-projects that I wish to call. I call
> > them with the same ant build file. I have a number of directories
> > such as
> > src/localization/en
> > src/localization/fr
> > src/localization/es
> > representing all the languages I need to build for. And I use the
> > <dirset> element of <subant> to pluck out each language, "en", "fr",
> > "es", etc.
> >
> > I'm also using the genericantfile attribute in <subant> to specify the
> > name of the build file.
> >
> > 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?
> >
> > Thanks,
> > Dan
> >
> >
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: with genericantfile changes basedir !
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Dan,
maybe you could try to use for or for-each in ant-contrib to do what you
want..
If you read the documentation of subant, it is stated clearly AFAIK that
genericantfile changes the base dir.
Cheers,
Antoine
Dan Finkelstein wrote:
> Hi --
>
> I have a number of <ant> sub-projects that I wish to call. I call
> them with the same ant build file. I have a number of directories
> such as
> src/localization/en
> src/localization/fr
> src/localization/es
> representing all the languages I need to build for. And I use the
> <dirset> element of <subant> to pluck out each language, "en", "fr",
> "es", etc.
>
> I'm also using the genericantfile attribute in <subant> to specify the
> name of the build file.
>
> 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?
>
> Thanks,
> Dan
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org