You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Gábor Guta <th...@gmail.com> on 2012/12/02 17:51:49 UTC

Target object names

Hi,

  If I list the target names of a project from the build node, there
is an extra target with name "". Is this target represents the global
declarations?

  I have also noticed that the targets in the imported projects appear
in duplicated form (targetName and projectName.targetName). I'm unsure
how to normalize these information (I try to build a dependency graph
from these information). Are there any flag which indicates which one
is with the projectName or pointer which point to the equivalent one?

  You can find the code at http://sourceforge.net/p/antviz2/code/2/tree/trunk/

Thank you for your help in advance!

Gabor

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


AW: Target object names

Posted by Matèrne, "Jan (RZF, SG 481)" <ja...@fv.nrw.de>.
I did a small evaluation:
- the ""-target is the global one


Cheers 
Jan


<project>

    <echo>global</echo>
    
    <target name="target-1">
        <echo>in-t1</echo>
    </target>
    
    <target name="target-2">
        <echo>in-t2</echo>
    </target>
    
    <script language="javascript">
        targets = self.getProject().getTargets();
        tNames = targets.keySet();
        for(it=tNames.iterator(); it.hasNext();) {
            name = it.next();
            tasks = targets.get(name).getTasks();
            java.lang.System.out.println("Target '" + name + "'");
            for(i=0; i&lt;tasks.length; i++) {
                java.lang.System.out.println("  + " + tasks[i].getWrapper().getText() );
            }
        }
    </script>

</project>

-----Ursprüngliche Nachricht-----
Von: Dominique Devienne [mailto:ddevienne@gmail.com] 
Gesendet: Montag, 3. Dezember 2012 15:05
An: Ant Developers List
Betreff: Re: Target object names

On Sun, Dec 2, 2012 at 5:51 PM, Gábor Guta <th...@gmail.com> wrote:
>   If I list the target names of a project from the build node, there
> is an extra target with name "". Is this target represents the global
> declarations?

from http://ant.apache.org/manual/using.html :

"since Ant 1.6.0, every project includes an implicit target that
contains any and all top-level tasks and/or types. This target will
always be executed as part of the project's initialization, even when
Ant is run with the -projecthelp option."

I believe this "" target is the "implicit" target mentioned. --DD

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


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


Re: Target object names

Posted by Dominique Devienne <dd...@gmail.com>.
On Sun, Dec 2, 2012 at 5:51 PM, Gábor Guta <th...@gmail.com> wrote:
>   If I list the target names of a project from the build node, there
> is an extra target with name "". Is this target represents the global
> declarations?

from http://ant.apache.org/manual/using.html :

"since Ant 1.6.0, every project includes an implicit target that
contains any and all top-level tasks and/or types. This target will
always be executed as part of the project's initialization, even when
Ant is run with the -projecthelp option."

I believe this "" target is the "implicit" target mentioned. --DD

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