Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scp ant task: fail if directory is empty

 
nlr reddy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using the below code to scp a file to remote dir. but how can I fail the build if local directory is empty? I'have used failonerror=true for scp task but the execution of ant build says build successful even if there is no file.



Thanks,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34680
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the resourcecount condition to fail before calling scp.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic