How to publish Spring Boot war file using Gradle 6.2+

After bashing my keyboard a bit more I discovered that I may have been declaring my publications incorrectly. This Spring Boot documentation recommends something like this:

publishing {
    publications {
        webApp(MavenPublication){
            artifact bootWar
        }
    }
}

Whereas before I had:

publishing {
    publications {
        webApp(MavenPublication){
            from components.web
        }
    }
}

Having made this change the publishing now works. No further changes are requried despite what is mentioned in the Gradle 6.2 release notes.