You should echo the property "folder-exists" in both targets.

Maybe the property is already set when you reach the first task. ANT will never 
unset it.

CC runs a loop.
Find out in what situations the errer happens.
Is it the first call by CC or the second.

-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Christopher Styles [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 5. Februar 2008 15:21
An: Ant Users List
Betreff: task won't run in cruise control but runs from windows command 
prompt...

Hi,

I know this isn't a Cruise Control list, but I need some assistance with this 
issue, since it centers around Ant - and no one from the Cruise Contol list has 
responded... When I run the tasks below in cruise control 2.7.1, the second 
task fails, which happens to be dependent on the first...
When I run them from the Windows command prompt they work great, but I'm not 
yielding the same results in Cruise Control... What's suppose to happen is, 
target "lib-ext" will be executed, but first the dependency target 
"lib-ext-test" gets executed. If the folder exists, it will set the 
"folder-exists" property. Then, Ant goes back to the "lib-ext" task and checks 
the dependency. If "folder-exists" is set, "lib-ext" will be executed. 
Otherwise, it won't.  In other words, the "lib-ext-test" target checks to see 
if the folder exists, and if it does, "lib-ext" ftps the files within the 
folder.... If the folder doesn't exist, "lib-ext" doesn't execute, and the 
process moves on to the next target in the sequence... As I stated earlier, it 
works great from the Windows command prompt, but in Cruise Control it fails and 
just says "folder doesn't exist"... Why won't this execute in Cruise Control 
like it does from the Windows command prompt...??? If someone could assist me 
with this I'd surely appreciate it...

<target name="lib-ext-test">
   <available property="folder-exists"
      file="${existingExt.dir}"/>
</target>

<target name="lib-ext" if="folder-exists" depends="lib-ext-test">
    <ftp server="${remoteHostName}"
        userid="${remoteInstallUserId}" password="${remoteInstallPassword}"
        remotedir="${remoteExtFtpDir}"
        verbose="yes"
        binary="yes"
        action="put"
        chmod="755">
     <fileset dir="${existingExt.dir}">
        <include name="*.jar"/>
        <include name="*.properties"/>
        <include name="*.txt"/>
        <include name="*.xml"/>
        <include name="*.xsd"/>
     </fileset>
    </ftp>
</target>

Thanks
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to