mainPmdAuxClasspathCopy configuration has been deprecated for dependency declaration

gradle version = 8.2.1

plugins {
     id 'pmd'
}

pmdMain {
    enabled = gradle.startParameter.taskNames.contains('pmdMain')
}

Inclusion of plugin ‘pmd’ throws the following warnings while running ./gradlew dependencyUpdates. How do we get rid of these deprecations

The mainPmdAuxClasspathCopy configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 9.0. Please use another configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
The mainPmdAuxClasspathCopy2 configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 9.0. Please use another configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations

  • Start by sharing your Gradle build file and version.

    – 

  • @aled addd as part of description, don’t have anything else

    – 

  • That’s the entire gradle.build file? The warnings are related to dependencies. Doesn’t your project has any? No pmd configurations either?

    – 




  • @aled added pmdMain

    – 

  • You mean there is no mainPmdAuxClasspathCopy or mainPmdAuxClasspathCopy2 anywhere in your gradle.build nor any other file?

    – 

Leave a Comment