How to fail if a CopySpec is empty?

It there any option that a zip, jar, copy task is failing if the CopySpec is empty. I think on a syntax like:

from("${lib}") {
    include 'slf4j-api-1.6.1.jar'
    failOnEmpty = true

No such option exists. If you wanted to verify that files were copied you could do so in a separate task or in a doLast { } on your copy task.

I use the follow code now:

getRootSpec().getChildren().each{ CopySpec cs ->
    if( cs.buildRootResolver().getAllSource().size() == 0 ) {
        throw new IllegalArgumentException( "No files selected from: " + cs.getSourcePaths() )