Working on adopting Gradle for our first ever real build tool, and I’m confused about publishing EARs. I’m new to Gradle so maybe I’m just not interpreting the documentation correctly.
I’m working on implementing Gradle for a J2EE web application. It consists of several JARs and a WAR that get packaged into an EAR. Building and publishing the JARs and WAR is working fine with maven-publish, but it looks like maven-publish doesn’t support publishing EARs yet. Since maven-publish doesn’t support publishing EARs, I think I need to use the “old way” outlined in Chapter 53 of the user guide.
I’ve configured the artifacts configuration and uploadArchives task to include the ear and upload to our Artifactory respectively. That works in that the EAR is uploaded to Artifactory, but the POM and associated meta-data is not uploaded like it is for the JARs and WAR with maven-publish. An ivy.xml is uploaded though I don’t know why. How do I get the POM and meta-data to upload/publish for the EAR? Do I need to somehow include them in the archives artifact?
I’m running Gradle 2.9 and publishing to Artifactory 4.2.2.