File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

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
 
Similar Threads
ant script error
possible to have scp task with fileset for files on remote host?
Problem with "scp" in ANT build file (Urgent please)
Ant war task and JSP tag files
Problem with packaging using ant