Gradle 2.1 RC1 Failed to apply plugin [id 'ear']

I upgraded from Gradle 2.0 to 2.1RC1 this morning. It seems the EAR plugin may be broken:

FAILURE: Build failed with an exception.
                                                                                                                                                                                                * Where:
                                                                                                           Build file 'J:\git\gradledemo\access\WASApps\AwardsAutomationEAR\build.gradle' line: 1
                                                                                                                                                  * What went wrong:
                                                                                                 A problem occurred evaluating project ':WASApps:AwardsAutomationEAR'.
                                              > Failed to apply plugin [id 'ear']
                                                                                   > Could not create an instance of type org.gradle.plugins.ear.EarPluginConvention_Decorated.
                                                                                                                                         * Try:
                                                                                                             Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

This build.gradle worked fine with 2.0

apply plugin: 'ear'
apply plugin: 'eclipse-wtp'
  dependencies {
 deploy project(
  path:':WASApps:AwardsAutomation',
   configuration:'archives'
  )
 }

Confirmed problem is in also in latest gradle 2.2 nightly.

Here is a stacktrace from 2.1-rc1 https://gist.github.com/bradthurber/d06759bc0fb63e576894

I believe the problem lies in gradle-ear-2.1-rc-1.jar. If I replace that jar with gradle-ear-2.0.jar the build once again works. (I realize this is a “frankenbuild” of sorts. This was just a troubleshooting step).

Thanks for the report: I can reproduce this issue by adding a file ‘META-INF/application.xml’ to the project root directory, and using the trivial build script:

apply plugin: 'ear'

I’ve raised GRADLE-3154 for this issue.

gradle 2.1 RC2 fixes this issue for my builds.

Thanks for letting us know.