ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "coluf" <co...@hotmail.com>
Subject Best means to create a Windows cmd file from ant
Date Thu, 05 Feb 2004 04:03:44 GMT
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>

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