TrigonicSolutions/gradle-rpm-plugin — Issue #10: Directive cannot be cast to java.lang.Number
Author: AlanKrueger
Created: 2012-01-04 18:20:21+00:00
State: open

Received the following failure in a Gradle build using 0.9 of the Gradle RPM Plugin with Gradle 1.0-milestone-6:

FAILURE: Build failed with an exception.

* Where:
Build file '[...]/build.gradle' line: [...]

* What went wrong:
A problem occurred evaluating project ':[...]'.
Cause: org.freecompany.redline.payload.Directive cannot be cast to java.lang.Number

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Something changed between 1.0-milestone-3 and 1.0-milestone-6 that highlighted this. The plugin tries to follow the Redline naming conventions where possible, but Redline's Directive enum cannot reliably use "directive" as a property on a Gradle CopySpec since ["directive" is a property on Groovy's Closure class](http://groovy.codehaus.org/api/groovy/lang/Closure.html#setDirective%28int%29).