ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EXT / FOCAL MALAPRADE Roland <ext.focal.malapr...@sncf.fr>
Subject RE: silly question on "echo" task
Date Wed, 13 Nov 2002 16:41:58 GMT
Instead of using empty echo message to insert a new line, just use
${line.separator} which will put a system-dependant (I think)
return-carriage in your file (be careful if build running on Windows, and
files destined for a Unix machine)

Roland.

> -----Message d'origine-----
> De : Hari Kodungallur [mailto:hkodungallur@rediffmail.com]
> Envoye : mercredi 13 novembre 2002 17:27
> A : Ant Users List
> Objet : Re: silly question on "echo" task
> 
> 
> Note that the message output for an echo is anything from <echo> 
> to </echo>. When you indent your build.xml one tab, those echo 
> tasks where you specify </echo> on the next line (one tab 
> indented) would output one newline and a tab and thats what is 
> contained  between <echo> and </echo>
> 
> -HK
> 
> 
> On Wed, 13 Nov 2002 Jay Yarbrough wrote :
> >I have been using the echo task to create a text file, during the 
> >build process.
> >
> >It would seem that indention of the xml code actually affects the 
> >output from the echo task.
> >
> >Am I crazy, or is this the case?
> >If I indent the following snippet a single tab, it causes the 
> >output to be different, from when it is not indented.
> >
> >-----------------------------------
> ><echo message="${version}"/>
> ><echo message="Component:${product}" file="${product}.txt" 
> >append="false"/>
> ><echo file="${product}.txt" append="true">
> ></echo>
> ><echo message="Version:${version}" file="${product}.txt" 
> >append="true"/>
> ><echo file="${product}.txt" append="true">
> ></echo>
> ><echo message="Date:${time_date}" file="${product}.txt" 
> >append="true"/>
> >
> >
> ><copy file="${product}.txt" 
> >tofile="${outputdir}/${product}.txt"/>
> >
> >---------------------------------------
> >output from above:
> >
> >BUILD SUCCESSFUL
> >Total time: 0 seconds
> >C:\Build\nyx>more test.txt
> >Component:test
> >Version:test
> >Date:11/13/2002 08:33:20
> >
> >output from the above, if indented one tab:
> >
> >BUILD SUCCESSFUL
> >Total time: 0 seconds
> >C:\Build\nyx>more test.txt
> >Component:test
> >                 Version:test
> >                 Date:11/13/2002 08:32:53
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:ant-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: 
> ><mailto:ant-user-help@jakarta.apache.org>
> >
> 
> __________________________________________________________
> Give your Company an email address like
> ravi @ ravi-exports.com.  Sign up for Rediffmail Pro today!
> Know more. http://www.rediffmailpro.com/signup/
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message