Can't create simple jar

Why doesn’t this do anything? All I want is to create a jar (actually a war file) from the directory tree in “build/to-war”. It just silently does nothing.

task warToDeploy {
    jar {
        destinationDirectory = file("build")
        archiveFileName = "app1.war"
        from "build/to-war"
    }
}

hmm… why don’t you try task warToDeloy(type : War)

Because I’m also using the Kotlin multiplatform plugin, and it does not work with the war plugin and task. I’ve posted elsewhere about that and got no answers. I could post again about that issue, but that’s a separate question/topic I guess.