ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi" <koji.sekigu...@bluemartini.com>
Subject RE: Best means to create a Windows cmd file from ant
Date Thu, 05 Feb 2004 04:58:37 GMT
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
View raw message