thanks Matt, works great!
Matt Benson wrote:
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
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
[EMAIL PROTECTED] 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:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------------------------------------------------------
<project default="foo">
<property name="dest1" location="ftpscript1" />
<property name="dest2" location="ftpscript2" />
<property name="dest3" location="ftpscript3" />
<property name="dest4" location="ftpscript4" />
<property name="remote.server.username" value="scott" />
<property name="remote.server.password" value="tiger" />
<!-- I tend to abbreviate line.separator this way: -->
<property name="br" value="${line.separator}" />
<target name="1">
<echo file="${dest1}">
user
${remote.server.username}
${remote.server.password}
put *.war
quit
</echo>
</target>
<target name="2">
<concat destfile="${dest2}">
user
${remote.server.username}
${remote.server.password}
put *.war
quit
</concat>
</target>
<target name="3">
<echo file="${dest3}">user${br}</echo>
<echo file="${dest3}" append="true">${remote.server.username}${br}</echo>
<echo file="${dest3}" append="true">${remote.server.password}${br}</echo>
<echo file="${dest3}" append="true">put *.war${br}</echo>
<echo file="${dest3}" append="true">quit${br}</echo>
</target>
<target name="4">
<concat destfile="${dest4}">user${br}</concat>
<concat destfile="${dest4}"
append="true">${remote.server.username}${br}</concat>
<concat destfile="${dest4}"
append="true">${remote.server.password}${br}</concat>
<concat destfile="${dest4}" append="true">put *.war${br}</concat>
<concat destfile="${dest4}" append="true">quit${br}</concat>
</target>
<target name="foo" depends="1,2,3,4" />
<target name="clean">
<delete>
<fileset dir="${basedir}" includes="ftpscript?" />
</delete>
</target>
</project>
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]