aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes scp ant task: fail if directory is empty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "scp ant task: fail if directory is empty" Watch "scp ant task: fail if directory is empty" New topic
Author

scp ant task: fail if directory is empty

nlr reddy
Greenhorn

Joined: Jul 05, 2009
Posts: 9
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

Joined: May 26, 2003
Posts: 30764
    
156

You can use the resourcecount condition to fail before calling scp.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scp ant task: fail if directory is empty