# Exclude plugin syntax

**URL:** <https://discuss.gradle.org/t/exclude-plugin-syntax/23897>\
**Category:** Help/Discuss\
**Created:** [August 28, 2017, 6:00pm UTC](https://discuss.gradle.org/t/exclude-plugin-syntax/23897 "2017-08-28T18:00:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scphantm](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/scphantm/32/5691_2.png) [@scphantm](https://discuss.gradle.org/u/scphantm)\
**Post date:** [August 28, 2017, 6:00pm UTC](https://discuss.gradle.org/t/exclude-plugin-syntax/23897/1 "2017-08-28T18:00:49Z")

</div>

i want to try to do something like this

```
project.plugins.withType(JavaPlugin) {
  exclude = ["com.mycompany.bla.javascriptPlugin"]
  project.plugins.apply(GroovydocJarPlugin)
}

```

my issue is with the fact that all the good stuff is based on the Java plugin. So i have plugins that have nothing to do with Java, but need the java plugin to get things like sourcesets and such. But, things like a groovydocJar task has no place on a Javascript plugin and just wastes time/effort during a javascript build. So i would like to exclude it on create. And i have to do it by classname to avoid a circular dependency. Not ideal, i know, but its what i have right this moment. I will refactor it out later.

Ive tried to do an exclude before, but i hit a concurrency issue. It only works if the javascript has already been applied, if the JS plugin is applied afterwards, the simple solution doesn’t work.
