ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Surette <>
Subject Re: Suggestions for documentation & exec
Date Fri, 19 Oct 2001 06:40:33 GMT
I concur wholeheartedly. The topics on FileSets,
Paths, etc. should appear in the table of contents,
and there should be an index as well. (Maybe
the recently-touted lucene could help with this?!)

As for your last point, (6), not sure if you're citing
this as a commonly asked question, or as an actual
limitation of ant. Just in case, you can save the
output of an exec using the outputproperty

    <target name='echopath'>
        <exec executable="cmd" outputproperty='path'>
            <arg value='/c'/>
            <arg value='echo'/>
            <arg value='%path%'/>
        <echo>path = ${path}</echo>

This will get at your path environment variable under
win32 and the path property will be accessible from
the rest of your script.

Yyy Xxx wrote:
> The documentation for ant is nice -- concise and
> helpful.  But it took a long time for me to realize
> that <target> came with "if" and "unless" attributes.
> This is because I read the Using page months ago and
> forgot that it contained *reference* material as well
> as *guide* material. Each time I go to read about
> <target>, I automatically go to the "Built-in Tasks"
> section because that's where I spend most of my time.
> Then I realize my mistake and have to pause to
> remember if I really should go to the "Installing",
> "Running", or "Using" page.
> The documentation could be improved if (1) it came
> with an index and (2) there was some way to show that
> the "Using" section contained reference material.
> There are hyperlinks scattered throughout the task
> documentation pages that tell people about "path link
> structures".  For instance in <available>:
> "Available's classpath attribute is a
> [hyperlink]path-like structure[/hyperlink] and can
> also be set via a nested <classpath> element."
> (3) There should be hyperlinks for "property"
> throughout the task pages.  The page for <available>
> could be improved if the beginning read:
> "Description
>  Sets a [hyperlink]property[/hyperlink] if a resource
> is available at runtime. This resource can be a file,
> a directory, a class in the classpath, or a JVM system
> resource.
> "
> The hyperlink would take us to the "Using Ant"
> Property section.
> I didn't find any discussion in the documentation as
> to scope of properties.  The <property> task seems
> local to each <antcall>, for instance.  I can
> <antcall> a target that sets a property and then
> <antcall> the target again and set the same property
> name again.  If this isn't already in the
> documentation, (4) it should be written up.
> People often ask questions about "if" and "unless" in
> this mailing list.  (5) there should be more examples
> in the documentation.  Perhaps in conjunction with the
> <available> or <condition> tasks.
> And (6), I'd like to have a way to store the return
> code of an <exec> in a property.  I'd like to
> conditionally execute tasks based on the return code
> of an exec'd program.  My only choice seems to use the
> "failonerror" attribute, but I don't want to fail my
> ant.
> Thank you for a fine program.
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.

View raw message