ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Senger <sen...@ebi.ac.uk>
Subject Re: Empty arguments on the command-line under windows
Date Thu, 01 Sep 2005 08:37:10 GMT
Hi,
> 
> If you run ANT in verbose mode (-v) what does it
> output as the string that is generated...?
>
   This is how it look underw windows:

[testing] Executing 'C:\Program Files\Java\jre1.5.0_04\bin\java.exe' with arguments:
  [testing] '-classpath'
  [testing] 'C:\Documents and settings\martin\....jar'
  [testing] 'TestArgs'
  [testing] '-cacheDir'
  [testing] ''
  [testing] '-dt'
  [testing] 
  [testing] The ' characters around the executable and arguments are
  [testing] not part of the command.
  [testing] 0: -cacheDir
  [testing] 1: -dt

   And this is how it looks under linux:

[testing] Executing '/usr/local/j2sdk1.4.2_08/jre/bin/java' with
arguments:
  [testing] '-classpath'
  [testing] '/home/senger/....jar'
  [testing] 'TestArgs'
  [testing] '-cacheDir'
  [testing] ''
  [testing] '-dt'
  [testing]
  [testing] The ' characters around the executable and arguments are
  [testing] not part of the command.
  [testing] 0: -cacheDir
  [testing] 1:
  [testing] 2: -dt


   And this is the Ant task (I have already posted this in my previous
email, sorry for the repetition):

     <property name="my.property" value=""/>

     <java classname="TestArgs" taskname="testing"
       classpathref="build.classpath" fork="true" failonerror="true">
       <arg value="-cacheDir"/>
       <arg value="${my.property}"/>
       <arg value="-dt"/>
     </java>

   So my (sad) conclusion is that I must write my build.xml conditionally
for various OS's. That's also what Antoine suggested:

> you can, using the condition task, set registry.cache.dir to
> &quot;&quot; only when running under windows.
>

   Is this usual with Ant and OS-dependency? This is the first time I am
forced to be switching between OS's so I can't say.

   Many thanks for your help and suggestions. At least I know now how to
solve the problem. (But still, I think I am going to look into Ant's
sources why it is like it is... )

   Cheers,
   Martin

-- 
Martin Senger
   email: martin.senger@gmail.com
   skype: martinsenger
consulting for:
   International Rice Research Institute
   Biometrics and Bioinformatics Unit
   DAPO BOX 7777, Metro Manila
   Philippines, phone: +63-2-580-5600 (ext.2324)




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message