ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: AW: Creating a file programmaticaly
Date Thu, 13 Apr 2006 14:17:06 GMT
You talk about keeping your file indented correctly...
I wouldn't consider that necessary anyway... In any
event, the attached buildfile shows how to use concat
or echo, sacrificing formatting, then using a task per
line.

-Matt

--- Rakesh Patel <rakesh.mailgroups@gmail.com> wrote:

> Hi Matt,
> 
> can you give me an example of using <echo>? I am
> already using 
> fixlastline=true with no result.
> 
> Thanks
> 
> Rakesh
> 
> Matt Benson wrote:
> 
> >--- Rakesh Patel <rakesh.mailgroups@gmail.com>
> wrote:
> >
> >  
> >
> >>Hi,
> >>
> >>almost there with the concat task but am having
> >>problems with keeping my 
> >>build.xml file formatted correctly and giving the
> >>text to pass in ie if 
> >>each line is indented, the indents go into the
> file.
> >>
> >>I tried individual staements but i can't seem to
> >>generate a new line. 
> >>Here's what i have so far:
> >>
> >><concat destfile="README"
> >>append="true">user</concat>
> >><concat destfile="README" append="true"
> >>fixlastline="true" 
> >>eol="crlf">${remote.server.username}</concat>
> >><concat destfile="README" append="true"
> >>fixlastline="true" 
> >>eol="crlf">${remote.server.password}</concat>
> >><concat destfile="README" append="true"
> >>fixlastline="true" 
> >>eol="crlf">put *.war</concat>
> >><concat destfile="README" append="true"
> >>fixlastline="true" 
> >>eol="crlf">quit</concat>
> >>
> >>The output just comes out on one line.
> >>    
> >>
> >
> >fixlastline="true"
> >
> >or, use <echo> instead of <concat>, and probably
> >include ${line.separator} manually...
> >
> >-Matt
> >  
> >
> >>Rakesh
> >>
> >>Jan.Materne@rzf.fin-nrw.de wrote:
> >>
> >>    
> >>
> >>><concat destfile="myfile.txt">
> >>>user
> >>>scott
> >>>tiger
> >>>put *.war
> >>>quit
> >>></concat> 
> >>>
> >>>
> >>>or with use of properties
> >>>
> >>>
> >>><concat destfile="${file}">
> >>>user
> >>>${db.user}
> >>>${db.pwd}
> >>>put *.war
> >>>quit
> >>></concat> 
> >>>
> >>>
> >>>Jan
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>that seems to only produce name value pairs.
> >>>>        
> >>>>
> >>Unfortunately, 
> >>    
> >>
> >>>>the file i want to create looks more like this:
> >>>>
> >>>>user
> >>>>scott
> >>>>tiger
> >>>>put *.war
> >>>>quit
> >>>>   
> >>>>
> >>>>        
> >>>>
>
>>---------------------------------------------------------------------
> >>    
> >>
> >>>To unsubscribe, e-mail:
> >>>      
> >>>
> >>user-unsubscribe@ant.apache.org
> >>    
> >>
> >>>For additional commands, e-mail:
> >>>      
> >>>
> >>user-help@ant.apache.org
> >>    
> >>
> >>> 
> >>>
> >>>      
> >>>
> >>    
> >>
>
>---------------------------------------------------------------------
> >  
> >
> >>To unsubscribe, e-mail:
> >>user-unsubscribe@ant.apache.org
> >>For additional commands, e-mail:
> >>user-help@ant.apache.org
> >>
> >>
> >>    
> >>
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> >  
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
View raw message