Gradle war manifest file

I am using the gradle war plugin. Instead of generating the MANIFEST.MF under /META-INF, need to write it to /WEB-INF/classes. I have tried writing to manifest to a particular location -

war {
    baseName = "config-services"
    manifest {
        attributes('Version': rootProject.version)
   }
}
war.manifest.writeTo("classes")

That does not seem to work. I have tried fully qualified path (/WEB-INF/classes). Is there a way to do this or am i missing something else ?

Any pointers are appreciated,
Ravi

Tried this one too

war {
     baseName = "config-services"
      manifest {
           attributes('Version': rootProject.version)
           writeTo("classes")
     }
}

Try putting it relative to the build directory
war.manifest.writeTo("${buildDir}/classes/mymanifest.mf")

Reference: https://docs.gradle.org/3.3/userguide/java_plugin.html