# Need provideCompile for java plugin

**URL:** <https://discuss.gradle.org/t/need-providecompile-for-java-plugin/10457>\
**Category:** Bugs\
**Tags:** eclipse, plugins\
**Created:** [July 6, 2015, 5:13pm UTC](https://discuss.gradle.org/t/need-providecompile-for-java-plugin/10457 "2015-07-06T17:13:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidBiesack](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/davidbiesack/32/2531_2.png) [@DavidBiesack](https://discuss.gradle.org/u/DavidBiesack)\
**Post date:** [July 6, 2015, 5:13pm UTC](https://discuss.gradle.org/t/need-providecompile-for-java-plugin/10457/1 "2015-07-06T17:13:08Z")

</div>

The `war` plugin provides a `providedCompile` configuration for dependencies.  
The `java` plugin needs this also. There are [some workarounds](http://stackoverflow.com/questions/13925724/providedcompile-without-war-plugin) but they are incomplete or require third party libraries.

Justification: if building a jar file for a servlet filter, the servlet needs to have a `providedCompile` dependency on servlet-api. The servlet filter is a reusable class that is meant to be embedded in war files. Thus, the project is not a war project, just a jar, so using the `war` plugin is incorrect.

By extension, the `eclipse` and other ide plugins should recognize this configuration and perform the correct code/configuration code generation for java projects.

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [July 6, 2015, 5:34pm UTC](https://discuss.gradle.org/t/need-providecompile-for-java-plugin/10457/2 "2015-07-06T17:34:32Z")

</div>

I think Nebula [extra-configurations-plugin](https://github.com/nebula-plugins/gradle-extra-configurations-plugin) does everything you need here, including integration with eclipse and idea plugins.
