# Nested composite builds dependency & plugin resolution

**URL:** <https://discuss.gradle.org/t/nested-composite-builds-dependency-plugin-resolution/39153>\
**Category:** Help/Discuss\
**Created:** [February 25, 2021, 10:22pm UTC](https://discuss.gradle.org/t/nested-composite-builds-dependency-plugin-resolution/39153 "2021-02-25T22:22:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aamiel](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@aamiel](https://discuss.gradle.org/u/aamiel)\
**Post date:** [February 25, 2021, 10:22pm UTC](https://discuss.gradle.org/t/nested-composite-builds-dependency-plugin-resolution/39153/1 "2021-02-25T22:22:32Z")

</div>

Hi, just starting out with Gradle. I’m trying to have a nested composite build. Basically, I want to satisfy this scenario:

1. Monorepo of microservices with each folder can be a module (`dependent-1`, `dependent-2`), library (`dependency-1`), plugin (`plugin-1`).
2. We don’t want to publish library / plugin to a repository, keep everything local
3. Each module can depend to a library / plugin, and can be worked on as individual projects.
4. To satisfy points `2.` and `3.` , each module is a composite build which include builds of library and plugin
5. For scenarios where we want to refactor, we have the `composite` folder / project that includes all modules, library and plugin. We would just open the `composite` project in IntelliJ, then proceed with refactoring shared codes.

But I’m encountering issues with point `5`. Whenever I open a ‘parent’ composite project that includes: ‘child’ composite projects, library, and plugin, I can’t run a `test` task for the plugin in IntelliJ. It results to an error:

```gradle
FAILURE: Build failed with an exception.
* Where:
Build file '/composite-full/module-2/build.gradle.kts' line: 9
* What went wrong:
Plugin [id: 'org.company.plugin.greeting'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (None of the included builds contain this plugin)
- Plugin Repositories (plugin dependency must include a version number for this source)

```

I can run the `test` task of a dependency, it doesn’t produce any error. It’s just for the plugins.

Here’s a build scan report: [Build scan | Gradle Cloud Services](https://scans.gradle.com/s/5cfb56nq7cfri)

I’ve created a minimal repository that repoduces the issue: [GitHub - aamiel16/gradle-composite](https://github.com/aamiel16/gradle-composite).

Greatly appreciate any ideas / thoughts to handle this.

---

<div class="post-metadata">

**Author:** ![aamiel](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@aamiel](https://discuss.gradle.org/u/aamiel)\
**Post date:** [February 28, 2021, 12:10am UTC](https://discuss.gradle.org/t/nested-composite-builds-dependency-plugin-resolution/39153/2 "2021-02-28T00:10:16Z")

</div>

Just found out that this was related to this open issue: [Plugin not found on nested composite builds · Issue #11651 · gradle/gradle · GitHub](https://github.com/gradle/gradle/issues/11651)

Any thoughts for a workaround?
