Generating WAR and EAR artifacts inside the same Gradle project
问题 Suppose that I have a Gradle web project with a standard web project layout src/main/webapp . Project myproject-web , build.gradle : apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'war' I know that I can wrap the resulting .war file generated by myproject-web inside an .ear if I define a secondary project (say, myproject-ear ) which applies the ear plugin and references myproject-web as a dependency: Project myproject-ear , build.gradle : deploy project(':myproject-web') I