Rename jar in bootWar?

The gradle spring boot plugin brings a bootWar task, that extends the war task, right?
So the “rename” methods should still work, I think.

I generated a gradle Spring Boot project using the Spring Initializr (including “Web” component) and added this to the build.gradle:

bootWar {
    rename { name ->
        println "***** " + name

How comes “./gradlew bootWar” does not execute the rename closure at all?

Is there another way to rename files that go into the final war?