# Composite builds and shadowJar

**URL:** <https://discuss.gradle.org/t/composite-builds-and-shadowjar/37598>\
**Category:** Help/Discuss\
**Created:** [September 15, 2020, 9:59am UTC](https://discuss.gradle.org/t/composite-builds-and-shadowjar/37598 "2020-09-15T09:59:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schalk\_Cronje](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schalk_cronje/32/6511_2.png) [@Schalk\_Cronje](https://discuss.gradle.org/u/Schalk_Cronje)\
**Post date:** [September 15, 2020, 9:59am UTC](https://discuss.gradle.org/t/composite-builds-and-shadowjar/37598/1 "2020-09-15T09:59:30Z")

</div>

I have a build that use ShadowJar to do some relocations and then that Jar is the one that gets published to a Maven repository.

```gradle
configure<PublishingExtension> {
    publications {
        create<MavenPublication>("mavenJava") {
            project.shadow.component(this)
            artifact(tasks["sourcesJar"])
            artifact(tasks["javadocJar"])
        }
    }
}

```

I then tried to include this project into another one via composite builds, but it does not find any of the relocations. I can see why this will not happen by default as the classes of the invluded build will be looked up inside `build/classes/main`.

Is there any way to configure this behaviour so that is would rather pull the artifact JAR in?

P.S. I am acutely aware that the publication section has nothing to do with composite builds, but I posted it because I think it provides more clarity in terms of the artifacts of the project.
