ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: retrieving project names with subant
Date Thu, 14 Jul 2005 15:58:14 GMT
thanks ivan.
I was aware of the ${}property, but indeed i want the names of all sub projects
in my main ant files that iterates through these projects.

-----Original Message-----
From: Ivan Ivanov []
Sent: Thu 7/14/2005 5:34 PM
To: Ant Users List
Subject: Re: retrieving project names with subant

--- wrote:
> hello gentle people;
> is there a way to retrieve the names of the project
> being run when using subant?

The name of the currenr project is stored in the
built-in property So you can use
something like this:
<project name="main" default="main" basedir=".">
    <target name="main">
        <echo>Main project name is
        <subant antfile="sub.xml" target="sub"

<project name="sub" default="sub">
    <target name="sub">
        <echo>Sub project name is

But if you want in your main file the names of all sub
projects, it would be harder.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise private information.  If you have received it in error, please notify the sender
immediately and delete the original.  Any other use of the email by you is prohibited.

View raw message