Deploying war in ear

Hello anyone,

we have a scenario were to include a war file via deploy configuration into an ear file. We also want to customize the web root context via
deploymentDescriptor {
webModule(‘module.war’, ‘/customContext’)

By default the wars are created with version in filename. Gradle automatically creates webModule entries for every war in application.xml (with version). So this does not fit together, because with my custom webModule I get a second entry in application.xml, which does not override the originally generated one.
So my questions:

  • What is the intended way to handle such a scenario - with or without versions in filename?
  • The war files are uploaded to artifactory, too, so I think I need the version in the filename. Is this correct?
  • Is there a way to skip the auto-generating of the webmodules?

Any help appreciated