# Copy all jars from subprojects to root project's bin directory

**URL:** <https://discuss.gradle.org/t/copy-all-jars-from-subprojects-to-root-projects-bin-directory/22617>\
**Category:** Help/Discuss\
**Created:** [May 11, 2017, 8:44am UTC](https://discuss.gradle.org/t/copy-all-jars-from-subprojects-to-root-projects-bin-directory/22617 "2017-05-11T08:44:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbach](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@rbach](https://discuss.gradle.org/u/rbach)\
**Post date:** [May 11, 2017, 8:44am UTC](https://discuss.gradle.org/t/copy-all-jars-from-subprojects-to-root-projects-bin-directory/22617/1 "2017-05-11T08:44:46Z")

</div>

I’d like to copy every jar generated from subprojects from their `/bin/libs` dir to the root project’s `bin` dir. Unfortunately, my current code just copies **everything** from the subprojects into that directory:

```
task muleapp(type: Copy) {
    from '.'
    include '**/bin/libs/*.jar'
    into 'bin'
}

```

How can I achieve the desired functionality?

---

<div class="post-metadata">

**Author:** ![Chris\_Dore](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/chris_dore/32/7592_2.png) [@Chris\_Dore](https://discuss.gradle.org/u/Chris_Dore)\
**Post date:** [June 10, 2017, 12:44am UTC](https://discuss.gradle.org/t/copy-all-jars-from-subprojects-to-root-projects-bin-directory/22617/2 "2017-06-10T00:44:27Z")

</div>

Could you provide a bit more information about what you’d like to accomplish?

Do you wish to copy just the jars produced by all of the subprojects, or do you also wish to copy the jars of external dependencies (ie third-party libs)?
