Ask Your Question

Revision history [back]

The reason for receiving an error message after switching from Gradle 3.5 to 5.0 relating to the application of withXml() to the produced POM could be due to the change in the way Gradle handles POM generation in version 5.0. Gradle 5.0 uses a new feature called Dependency Metadata Attributes (DMA) to handle POM generation, and the withXml() method is no longer supported when using DMA.

To solve this error, you can either remove the withXml() method, or use new methods available for POM customization in DMA such as the attribute() and exclusions() methods. Alternatively, you can switch back to using the Gradle 3.5 version or an earlier version where the withXml() method is still supported.