# Java-library plugin and war plugin

**URL:** <https://discuss.gradle.org/t/java-library-plugin-and-war-plugin/22787>\
**Category:** Help/Discuss\
**Created:** [May 28, 2017, 8:46pm UTC](https://discuss.gradle.org/t/java-library-plugin-and-war-plugin/22787 "2017-05-28T20:46:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strannik](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Strannik](https://discuss.gradle.org/u/Strannik)\
**Post date:** [May 28, 2017, 8:46pm UTC](https://discuss.gradle.org/t/java-library-plugin-and-war-plugin/22787/1 "2017-05-28T20:46:13Z")

</div>

Hi

I read in the documentation about new ‘java-library’ plugin and its new configurations(scopes): ‘api’ and ‘implementation’. Implementation dependencies are internal to the library.

However if I have a project with ‘war’ plugin that depends on ‘java-library’ project will it fetch ‘implementation’ dependencies and include into war file?

Documentation states that ‘java-library’ plugin is compatible with ‘java’ plugin only. So it’s not clear how it will work with other plugins.

Thanks.

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [May 29, 2017, 9:37am UTC](https://discuss.gradle.org/t/java-library-plugin-and-war-plugin/22787/2 "2017-05-29T09:37:46Z")

</div>

> [@Strannik](#):
>
> Documentation states that ‘java-library’ plugin is compatible with ‘java’ plugin only.

That’s about languages, it’s currently not compatible with the `groovy`, `scala` etc. plugins.

> [@Strannik](#):
>
> However if I have a project with ‘war’ plugin that depends on ‘java-library’ project will it fetch ‘implementation’ dependencies and include into war file?

Yes, since the WAR is a runtime artifact and `implementation` dependencies are needed at runtime.

---

<div class="post-metadata">

**Author:** ![Strannik](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Strannik](https://discuss.gradle.org/u/Strannik)\
**Post date:** [May 29, 2017, 1:30pm UTC](https://discuss.gradle.org/t/java-library-plugin-and-war-plugin/22787/3 "2017-05-29T13:30:06Z")

</div>

Thanks, @st_oehme

Will try that plugin and write here if I have any issues.
