I have this J2EE Web Application, which is Gradle based. Recently, I ran into a problem where Gradle was not compiling the java files, but was not adding these files into the war file, or the exploded folder.
A similar type of problem would be, where Gradle is making an incomplete war file or an incomplete exploded folder.
This, turned out to be a rather strange issue, where only thing I had to do, was to delete the .gradle folder found in the project folder.
.gradle folder holds settings, cache files and other information for building the project. If you delete it, gradle will recreate it on next build.
Fairly easy, it was!