You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Gintautas Grigelionis <g....@gmail.com> on 2013/09/30 15:39:36 UTC

finding out the original target names in an imported project

I have noticed (belatedly) a change in Ant API, namely, that there
seems to be no way to find out
what the original target names in an imported project are. Previously,
original names were returned by
getName() in a corresponding Target, which was consistent with
getDependencies().

Now getName() returns the original name prepended by the top project
name, the same as
corresponding key in getTargets() in a Project, and getProject()
returns the top project name,
so there is no way to find out what the original name is.

It should be considered a bug: either getName(), getProject() or
getDependencies() must be fixed
so that the information is consistent: either "fully qualified" names
are used everywhere, or else
there should be a way to obtain the original target names (which I
would prefer).

Gintas

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


Re: finding out the original target names in an imported project

Posted by Gintautas Grigelionis <g....@gmail.com>.
But, there is one definite bug: the original name of the default target has
its location set to <project default="..." ...> line rather than the actual
<target name="..." ...> line.

Gintas


2013/9/30 Gintautas Grigelionis <g....@gmail.com>

> I must correct myself again... the short names are there, too, and one may
> use getLocation() to get rid of the doubles/correct getDependencies().
> Still, the inconsistency remains...
>
> Gintas
>
>
> 2013/9/30 Gintautas Grigelionis <g....@gmail.com>
>
>> Sorry for double post, my description of the problem is incorrect. The
>> middle paragraph should read:
>>
>> Now getName() of a Target returns the original name prepended by the name
>> of the *imported* project (the same as corresponding key in getTargets()
>> in a Project), *but* getProject() returns the top project name, so there
>> is no way to find out what the original name is. Neither is there a simple
>> way to correct the dependency names.
>>
>> Gintas
>>
>>
>> 2013/9/30 Gintautas Grigelionis <g....@gmail.com>
>>
>>> I have noticed (belatedly) a change in Ant API, namely, that there
>>> seems to be no way to find out
>>> what the original target names in an imported project are. Previously,
>>> original names were returned by
>>> getName() in a corresponding Target, which was consistent with
>>> getDependencies().
>>>
>>> Now getName() returns the original name prepended by the top project
>>> name, the same as
>>> corresponding key in getTargets() in a Project, and getProject()
>>> returns the top project name,
>>> so there is no way to find out what the original name is.
>>>
>>> It should be considered a bug: either getName(), getProject() or
>>> getDependencies() must be fixed
>>> so that the information is consistent: either "fully qualified" names
>>> are used everywhere, or else
>>> there should be a way to obtain the original target names (which I
>>> would prefer).
>>>
>>> Gintas
>>>
>>
>>
>

Re: finding out the original target names in an imported project

Posted by Gintautas Grigelionis <g....@gmail.com>.
I must correct myself again... the short names are there, too, and one may
use getLocation() to get rid of the doubles/correct getDependencies().
Still, the inconsistency remains...

Gintas


2013/9/30 Gintautas Grigelionis <g....@gmail.com>

> Sorry for double post, my description of the problem is incorrect. The
> middle paragraph should read:
>
> Now getName() of a Target returns the original name prepended by the name
> of the *imported* project (the same as corresponding key in getTargets()
> in a Project), *but* getProject() returns the top project name, so there
> is no way to find out what the original name is. Neither is there a simple
> way to correct the dependency names.
>
> Gintas
>
>
> 2013/9/30 Gintautas Grigelionis <g....@gmail.com>
>
>> I have noticed (belatedly) a change in Ant API, namely, that there
>> seems to be no way to find out
>> what the original target names in an imported project are. Previously,
>> original names were returned by
>> getName() in a corresponding Target, which was consistent with
>> getDependencies().
>>
>> Now getName() returns the original name prepended by the top project
>> name, the same as
>> corresponding key in getTargets() in a Project, and getProject()
>> returns the top project name,
>> so there is no way to find out what the original name is.
>>
>> It should be considered a bug: either getName(), getProject() or
>> getDependencies() must be fixed
>> so that the information is consistent: either "fully qualified" names
>> are used everywhere, or else
>> there should be a way to obtain the original target names (which I
>> would prefer).
>>
>> Gintas
>>
>
>

Re: finding out the original target names in an imported project

Posted by Gintautas Grigelionis <g....@gmail.com>.
Sorry for double post, my description of the problem is incorrect. The
middle paragraph should read:

Now getName() of a Target returns the original name prepended by the name
of the *imported* project (the same as corresponding key in getTargets() in
a Project), *but* getProject() returns the top project name, so there is no
way to find out what the original name is. Neither is there a simple way to
correct the dependency names.

Gintas


2013/9/30 Gintautas Grigelionis <g....@gmail.com>

> I have noticed (belatedly) a change in Ant API, namely, that there
> seems to be no way to find out
> what the original target names in an imported project are. Previously,
> original names were returned by
> getName() in a corresponding Target, which was consistent with
> getDependencies().
>
> Now getName() returns the original name prepended by the top project
> name, the same as
> corresponding key in getTargets() in a Project, and getProject()
> returns the top project name,
> so there is no way to find out what the original name is.
>
> It should be considered a bug: either getName(), getProject() or
> getDependencies() must be fixed
> so that the information is consistent: either "fully qualified" names
> are used everywhere, or else
> there should be a way to obtain the original target names (which I
> would prefer).
>
> Gintas
>