Gradle 2.14 (and 2.14.1) breaks Ear plugin

Gradle Version: 2.14.1
Operating System: Windows
Is this a regression? If yes, which version of Gradle do you know it last worked for?
Yes. Worked in 2.13

Hi, the EAR plugin for 2.14.1 still generates a NullPointerException if provided with an application.xml file with multiple elements e.g.

<application>
  <module>
    <web>
      <web-uri>My.war</web-uri>
      <context-root>Test</context-root>
    </web>
  </module>
<security-role>
    <role-name>ROLE_ADMINISTRATOR</role-name>
  </security-role>
  <security-role>
    <role-name>ROLE_USER</role-name>
  </security-role>
</application>

Stacktrace:

Caused by: java.lang.NullPointerException
        at org.gradle.plugins.ear.descriptor.internal.DefaultDeploymentDescriptor.readFrom(DefaultDeploymentDescriptor.java:314)
        at org.gradle.plugins.ear.descriptor.internal.DefaultDeploymentDescriptor.readFrom(DefaultDeploymentDescriptor.java:240)
        at org.gradle.plugins.ear.EarPluginConvention.setAppDirName(EarPluginConvention.java:67)
        at org.gradle.plugins.ear.EarPluginConvention_Decorated.setAppDirName(Unknown Source)
        at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.setProperty(BeanDynamicObject.java:297)
        at org.gradle.internal.metaobject.BeanDynamicObject.setProperty(BeanDynamicObject.java:154)
        at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.setProperty(DefaultConvention.java:201)
        at org.gradle.internal.metaobject.CompositeDynamicObject.setProperty(CompositeDynamicObject.java:65)
        at org.gradle.internal.metaobject.AbstractDynamicObject.setProperty(AbstractDynamicObject.java:75)
        at org.gradle.groovy.scripts.BasicScript.setProperty(BasicScript.java:58)
        at org.gradle.internal.metaobject.BeanDynamicObject$GroovyObjectAdapter.setOpaqueProperty(BeanDynamicObject.java:435)
        at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.setProperty(BeanDynamicObject.java:314)
        at org.gradle.internal.metaobject.BeanDynamicObject.setProperty(BeanDynamicObject.java:154)
        at org.gradle.internal.metaobject.ConfigureDelegate.setProperty(ConfigureDelegate.java:103)
        at build_43jyxigywjl6s5vvrai28agkb$_run_closure3.doCall(F:\workspace\Perforce\cbevin_main\ICS55EAR\build.gradle:40)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
        at org.gradle.util.ConfigureUtil.configureSelf(ConfigureUtil.java:137)
        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:522)
        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:76)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:104)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection$ContainerElementsDynamicObject.invokeMethod(DefaultNamedDomainObjectCollection.java:359)
        at org.gradle.internal.metaobject.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:96)
        at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.invokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:30)
        at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
        at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)

Thanks for the report!
That’s a regression.
I filled GRADLE-3497 and will fix it for 2.14.1.