« Return to Thread: Any tool for ant build.xml file documentation

Re: Any tool for ant build.xml file documentation

by Steve Loughran :: Rate this Message:

Reply to Author | View in Thread

Dave Pawson wrote:

>
> It would help if ant were namespace aware, then additional documentation
> could be added in another namespace.

Ant is namespace aware, it merely chooses not to ignore content in other
namespaces, as it assumes they are tasks declared into a different
namespace.

>
> <project xmlns:d="http://www.dpawson.co.uk#ns"
>     name="generate"
>     basedir="/sgml/site2/pawson/"
>     default="help">
> <d:description>Main variable set</d:description>
>
> Error reported:
>
> build.xml:16: Problem: failed to create task or type
> http://www.dpawson.co.uk#ns:description
> Cause: The name is undefined.
>
>
> That would be a very helpful feature for larger build files.
--
Consider this, then, my gift to you:

<presetdef name="description" uri="http://www.dpawson.co.uk#ns" >
        <echo level="debug" />
</presetdef>

you now get a description
<d:description>Main variable set</d:description>

which gets printed when you run
ant -debug

[description] Main variable set

--
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

 « Return to Thread: Any tool for ant build.xml file documentation