Second on Peter's suggestion.
I did learn a LONG time ago that it's best to make project directories either read-only or write-only, regardless of the build system you're using. I normally build an exploded WAR and feed that directly to
Tomcat for debugging, then jar up the exploded WAR when I want to make a distribution module. In keeping with not having permanent files in an output directory, I copy them from a static file source directory (or directories) into the exploded WAR directory when I do a build, just as I compile to the exploded WAR's WEB-INF/classes directory.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.