Search code examples
jakarta-eewebspheregradle

Gradle - ear task


I was trying to use 'appDirName'in ear task, which has 'META-INF/application.xml' When it is creating ear file, it is creating with 'meta-inf/application.xml'. Ear file is not deployable to Websphere 6.1. application server. Please suggest.

Messsages from WAS 6.1:

The EAR file could be corrupt and/or incomplete. Make sure that the application is at a compatible Java 2 Platform, Enterprise Edition (J2EE) Level for WebSphere Application Server.

AppDeploymentException: [null] org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: META-INF/application.xml


Solution

  • What kind of version do you create? I believe WebSphere 6.1 is J2EE 1.4, but gradle ear-plugin assumes version 6. I had that problem with Weblogic, however it was more verbose. See http://www.gradle.org/ear_plugin.html on how to alter ear-plugin:

    ear {
      deploymentDescriptor {
        version = '1.4'
      }
    }