# Warning after gradle update 1.9 with PMD plugin

**URL:** <https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731>\
**Category:** Old Forum Archive\
**Created:** [November 25, 2013, 9:52pm UTC](https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731 "2013-11-25T21:52:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkalb](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mkalb/32/7430_2.png) [@mkalb](https://discuss.gradle.org/u/mkalb)\
**Post date:** [November 25, 2013, 9:52pm UTC](https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731/1 "2013-11-25T21:52:00Z")

</div>

Hello,

after updating gradle from 1.8 to 1.9 the “pmd” plugin shows a warning.

```gradle
:pmdMain
POM relocation to an other version number is not fully supported in Gradle : xml-apis#xml-apis;2.0.2 relocated to xml-apis#xml-apis;1.0.b2.
Please update your dependency to directly use the correct version 'xml-apis#xml-apis;1.0.b2'.
Resolution will only pick dependencies of the relocated element.
Artifacts and other metadata will be ignored.

```

```gradle
dependencies {
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5'
    compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.13'
      // These dependencies are only needed for running tests
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

```

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [November 26, 2013, 7:21am UTC](https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731/2 "2013-11-26T07:21:00Z")

</div>

I don’t think the problem is related to PMD. Does one of your dependencies pull in ‘xml-apis’? Perhaps this is just a new warning, though I think I’ve seen it before.

---

<div class="post-metadata">

**Author:** ![bmuschko](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bmuschko/32/5458_2.png) [@bmuschko](https://discuss.gradle.org/u/bmuschko)\
**Post date:** [November 27, 2013, 10:37pm UTC](https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731/3 "2013-11-27T22:37:00Z")

</div>

We made some internal changes to the POM parsing in 1.9. Before this warning message simply did come to the surface. [Artifact relocation](http://maven.apache.org/guides/mini/guide-relocation.html) defined in a POM only has limited support in Gradle. In this case the XML-APIs POM looks like this:

```gradle
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>2.0.2</version>
    <distributionManagement>
        <relocation>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.0.b2</version>
        </relocation>
    </distributionManagement>
</project>

```

If you want to avoid this message, you can upgrade to a later version of the PMD dependency. 5.0.5 for example does not depend on a relocated artifact anymore. You can reconfigure your PMD plugin as such:

```gradle
pmd {
    toolVersion = '5.0.5'
}

```

In the long run we should probably upgrade the PMD plugin to use PMD 5.x by default.

---

<div class="post-metadata">

**Author:** ![mkalb](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mkalb/32/7430_2.png) [@mkalb](https://discuss.gradle.org/u/mkalb)\
**Post date:** [November 28, 2013, 7:00am UTC](https://discuss.gradle.org/t/warning-after-gradle-update-1-9-with-pmd-plugin/1731/4 "2013-11-28T07:00:00Z")

</div>

Thank you for this helpful information.
