title: Gradle: Include jar dependencies into ear/libs
body: <p>I'm using Gradle to create an ear, but I'm having a hard time figuring out how to properly include dependencies in the lib folder.</p>
  
  <p>I know that I can use </p>
  
  <pre><code>earlib project (group:name:version)
  </code></pre>
  
  <p>to include jars there. And that also those jars' compile dependencies are going to be added in the ear's lib folder.</p>
  
  <p>My problem is that I also have jars that are listed in the ear's build.gradle as</p>
  
  <pre><code>deploy project (':jar-name')
  </code></pre>
  
  <p>How can I add their dependencies in the lib folder?</p>
  
  <p>The only way I found is to add them as earlib or as dependencies of an earlib, but this forces me to write them twice and feels harder than it should be (with Maven you just need to specify your dependencies in the subprojects and they will be added in the ear\lib directory)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Basically what I would like to end up with, is a transitive <code>deploy</code> configuration.</p>