Error using Ant and nested "file" resource parameter


(Charles Walker) #1

Hi, I’m having an issue using an rpm task that has a nested “file” parameter like:

tarfileset(prefix: '/usr/share') {
            gzipresource() {
                file(file: 'files/apache-tomcat-7.0.47.tar.gz')
            }
        }

when i execute the build I get the error

Converting class java.util.LinkedHashMap to File using toString() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use java.io.File, java.lang.String, java.net.URL, or java.net.URI instead.
:buildRpm FAILED

and

Execution failed for task ':buildRpm'.
> no resource specified

It looks to me like gradle is interpreting the “file” element as “Project.file()”. I feel like I must be missing something relatively simple but can’t seem to find my answer by searching.

Thanks, Charlie