ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [PATCH] Added "ant.target.name" property
Date Wed, 12 Sep 2001 16:46:41 GMT
On Thu, 13 Sep 2001 02:44, Stefano Mancarella wrote:
> > I have lobbied (unsucessfully) to remove that inconsistancy by removing
>
> the
>
> > ant.project.name property ;) Feel free to throw in your support for that
> > move
>
> I currently use ant.project.name for a generic documentation target:
>
> <target depends="init" description="Generate documentation" name="docs">
>   <javadoc doctitle="&lt;h1&gt;${ant.project.name}&lt;/h1&gt;"
>     ...
>     windowtitle="${ant.project.name} API">
>   </javadoc>
>  </target>
>
> Perhaps this is not good design, but I can't figure out how could I achieve
> the same goal in a simple way without using ant.project.name.
> Any suggestion on which would be a better design?

Just make it a normal property ;)

So instead of

<project name="foo" default="..." >

you would have

<project default="..." >
  <property name="name" value="foo" />

And that works fine ;) Instead of name you could even use ant.project.name as 
name of property and have it fully compatible ;)

-- 
Cheers,

Pete

-----------------------------------------------------
First, we shape our tools, thereafter, they shape us.
-----------------------------------------------------

Mime
View raw message