ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Best means to create a Windows cmd file from ant
Date Thu, 05 Feb 2004 06:17:33 GMT
<echo> ${line.separator} </echo>

or for easier use I personally use

<property name="br" value="${line.separator}"/>
<echo> ${br} </echo>


Jan



> -----Original Message-----
> From: Koji Sekiguchi [mailto:koji.sekiguchi@bluemartini.com]
> Sent: Thursday, February 05, 2004 5:59 AM
> To: Ant Users List
> Subject: RE: Best means to create a Windows cmd file from ant
> 
> 
> How about using <fixcrlf> task with eol="dos" attribute
> just after using <echo> task in order to fix the end of lines?
> 
> Koji
> 
> ====================================
> Technical Support
> Blue Martini Software K.K.
> Shinbashi Chuo Building 6th Floor
> 1-11-5 Nishi-shinbashi, Minato-ku
> Tokyo 105-0003 Japan
> Tel: 81-3-5521-6670
> Fax: 81-3-5521-6671
> www.bluemartini.co.jp
> 
> 
> > -----Original Message-----
> > From: coluf [mailto:coluf@hotmail.com]
> > Sent: Thursday, February 05, 2004 1:04 PM
> > To: user@ant.apache.org
> > Subject: Best means to create a Windows cmd file from ant
> > 
> > 
> > I wish to create a script file for Windows, that is, a .cmd file 
> > to start my java project.  
> > 
> > It makes sense to create the file from within ant so any changes 
> > to the class path are reflected in the script.
> > 
> > But what is the best way to create a Windows script file from 
> > within ant?  Using <echo> does not terminate the end-of-lines
> > for Windows correctly (must default for unix?).
> > 
> > An extract from my ant script...
> > 
> >    <target name="dist" depends="init, jar">
> >       ...
> >       <pathconvert targetos="windows" property="dist.libs" 
> > refid="build.classpath"/>
> >       <echo file="${dist.bin}/${corename}.cmd">@echo off
> >          setlocal
> >          set classpath=${jar.filename};${dist.libs}
> >          java ${main.class} -cp %classpath%
> >       </echo>
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message