apply plugin: 'ear' dependencies { deploy project(':javaee-demo1-ejb') deploy project(path: ':javaee-demo1-web', configuration: 'archives') } ear { deploymentDescriptor { // custom entries for application.xml: initializeInOrder = false webModule('javaee-demo1-web-' + project.version + '.war', '/api') } }