Build WAR from Dynamic Web Project in Eclipse

Hi, I am trying to build a WAR archive using an existing DynamicWebProject in Eclipse. I added “Gradle Nature” to the Project and created my gradle.build using “war” plugin and defining all the dependencies. I was able to build WAR archive however when I tried to deploy it on either WebLogic or Tomcat it failed. On WebLogic it complained about the directory structure. I opened my WAR archive and all my configuration files were moved from “WEB-INF/*.xml” to “WEB-INF/classes”. I suspect that’s the reason why I can’t deploy an application to the server.

Why did my configuration files were moved to “WEB-INF/classes” in the WAR archive when they are located in “WEB-INF” in my project?