In a Java library project of mine I have the following Gradle task defined
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
...
task createPom() {
pom {
project {
groupId nexusGroupId
artifactId nexusArtifactId
version libVersion
organization {
name 'Example'
url 'https://www.example.com'
}
withXml { asNode().appendNode('packaging', 'jar') }
}
}.writeTo("build/libs/pom.xml")
}
When I build the library the following is output to the console:
Configure project : Could not find match for name 'withXml'
I am using Gradle wrapper 4.10.3.
How can I resolve the warning?