# Plugins should use detached configurations for managing their user defined dependencies instead of adding configurations to the project's container

**URL:** <https://discuss.gradle.org/t/plugins-should-use-detached-configurations-for-managing-their-user-defined-dependencies-instead-of-adding-configurations-to-the-projects-container/264>\
**Category:** Old Forum Archive\
**Created:** [February 10, 2012, 11:18am UTC](https://discuss.gradle.org/t/plugins-should-use-detached-configurations-for-managing-their-user-defined-dependencies-instead-of-adding-configurations-to-the-projects-container/264 "2012-02-10T11:18:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [February 10, 2012, 11:18am UTC](https://discuss.gradle.org/t/plugins-should-use-detached-configurations-for-managing-their-user-defined-dependencies-instead-of-adding-configurations-to-the-projects-container/264/1 "2012-02-10T11:18:00Z")

</div>

The current pattern for plugins that have user defined dependencies is to add a configuration to ‘project.configurations’. This can cause problems as the plugin user may unintentionally influence these configurations via ‘project.configurations.all’.

See [this post](http://forums.gradle.org/gradle/topics/modify_dependencies_of_plugin_checkstyle_configurations) for an example.

It seems like we should establish the idiom that detached configurations are used for such cases.

So instead of:

```gradle
configurations {
  checkstyle «checkstyle tools»
}

```

it would be something like:

```gradle
checkstyle {
  dependencies «dependency notation»
}

```

---

<div class="post-metadata">

**Author:** ![bak2k2](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@bak2k2](https://discuss.gradle.org/u/bak2k2)\
**Post date:** [October 14, 2013, 11:12pm UTC](https://discuss.gradle.org/t/plugins-should-use-detached-configurations-for-managing-their-user-defined-dependencies-instead-of-adding-configurations-to-the-projects-container/264/2 "2013-10-14T23:12:00Z")

</div>

DO you have any answer for this? For me when I try to run gradle with and checkstyle task, it throws an error saying It could not locate the commons logging logfactory in ,my root directory!! Tried including that in dependencies but its not getting added to checkstyle classpath, is it different?
