ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <roxspr...@yahoo.com>
Subject RE: Feature Request for Ant 2: Line breaks in attribute values
Date Wed, 14 Mar 2001 00:41:32 GMT
I've seen a few postings regarding the uglyness of multiline echoing;
perhaps an interim (or complete) solution would be to augment the echo task
with either a boolean "trim" attribute to decide whether to trim each line
or not:

<target name="makeini">
    <echo file="${build.classes}\default.ini" trim="on">
        Name=Ant
        Version=1.0
        Help-Item=Ant Help,doc/VAJAntTool.html
        Menu-Items=Ant
        Build,org.apache.tools.ant.taskdefs.optional.ide.VAJAntTool,-P;
    </echo>
</target>

or a more xml like approach:
<target name="makeini">
    <echo file="${build.classes}\default.ini" trim="on">
        <line>Name=Ant</line>
        <line>Version=1.0</line>
        <line>Help-Item=Ant Help,doc/VAJAntTool.html</line>
        <line>Menu-Items=Ant</line>

<line>Build,org.apache.tools.ant.taskdefs.optional.ide.VAJAntTool,-P;</line>
    </echo>
</target>

any thoughts??

Rob


> -----Original Message-----
> From: Siberski, Wolf [mailto:Wolf.Siberski@tui.de]
> Sent: 12 March 2001 11:29
> To: 'ant-dev@jakarta.apache.org'
> Subject: Feature Request for Ant 2: Line breaks in attribute values
>
>
> It should be possible to specify line breaks
> in attribute values. I needed that for the echo task,
> and at the moment try to work around that this way:
>
> <target name="makeini">
>     <echo file="${build.classes}\default.ini">
> Name=Ant
> Version=1.0
> Help-Item=Ant Help,doc/VAJAntTool.html
> Menu-Items=Ant
> Build,org.apache.tools.ant.taskdefs.optional.ide.VAJAntTool,-P;
>     </echo>
> </target>
>
> First, this looks ugly, because I can't indent correctly.
> Second, it seems to be unspecified which
> kind of line break the echo task produces (\n or \r\n).
>
> What I would like to see is
>
> <target name="makeini">
>     <echo file="${build.classes}\default.ini">
>         "Name=Ant\n"
>         "Version=1.0\n"
>         "Help-Item=Ant Help,doc/VAJAntTool.html\n"
>         "Menu-Items=Ant
> Build,org.apache.tools.ant.taskdefs.optional.ide.VAJAntTool,-P;"
>     </echo>
> </target>
>
> or something similar (I'm not familiar enough with
> XML to make a well-founded proposal).
>
> IIRC there was another user requesting a similar feature
> to add multi line comments when checking in sources,
> so that feature should not be echo task specific.
>
> Wolf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org


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


Mime
View raw message