# Plugin-publish plugin does not include transitive dependency rules in Pom

**URL:** <https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803>\
**Category:** Plugin Portal\
**Tags:** plugins\
**Created:** [July 26, 2015, 1:57pm UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803 "2015-07-26T13:57:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![foragerr](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/foragerr/32/2605_2.png) [@foragerr](https://discuss.gradle.org/u/foragerr)\
**Post date:** [July 26, 2015, 1:57pm UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803/1 "2015-07-26T13:57:39Z")

</div>

I have some transitive dependency excludes in my custom-plugin build script. Like so:

```
configurations {
    compile.exclude group: 'commons-math3', module: 'commons-math3'
}

dependencies {
    'org.apache.jmeter:ApacheJMeter:2.13',
}

```

When publishing to `plugins.gradle.org` using `com.gradle.plugin-publish` version `0.9.1`, the excludes are not propagated to the generated POM:

```
<dependency>
  <groupId>org.apache.jmeter</groupId>
  <artifactId>ApacheJMeter</artifactId>
  <version>2.13</version>
  <scope>compile</scope>
</dependency>

```

Is there a workaround? Can I somehow use plugin-publish’s `withDependencies` extension?

`Maven-publish` plugin has (or at least, used to have) a similar issue. See [here](https://discuss.gradle.org/t/maven-publish-plugin-does-not-add-excludes-to-generated-pom/7297)

---

<div class="post-metadata">

**Author:** ![foragerr](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/foragerr/32/2605_2.png) [@foragerr](https://discuss.gradle.org/u/foragerr)\
**Post date:** [July 30, 2015, 5:27pm UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803/2 "2015-07-30T17:27:39Z")

</div>

Can I get a comment from any of the devs please? I feel like this should be a new defect along the lines of [https://issues.gradle.org/browse/GRADLE-2945](https://issues.gradle.org/browse/GRADLE-2945) but for the plugin-publish plugin.

---

<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:** [February 13, 2016, 7:08pm UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803/3 "2016-02-13T19:08:51Z")

</div>

This is actually GRADLE-3274 which also applies to the plugin-publish plugin.

---

<div class="post-metadata">

**Author:** ![foragerr](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/foragerr/32/2605_2.png) [@foragerr](https://discuss.gradle.org/u/foragerr)\
**Post date:** [February 13, 2016, 7:47pm UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803/4 "2016-02-13T19:47:47Z")

</div>

Good to know it’s already in the defect tracker. If there a reason this plugin code is not public? It contains some sort of publishing keys maybe?

---

<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:** [February 14, 2016, 5:43am UTC](https://discuss.gradle.org/t/plugin-publish-plugin-does-not-include-transitive-dependency-rules-in-pom/10803/5 "2016-02-14T05:43:14Z")

</div>

There’s nothing really secret in there. It’s simply considered part of the plugin portal ecosystem which is closed source.
