I had the same problem and even when I shut down all the possibles JAVA process from the server I couldn't change the "building" state. I had to remove the project and added again. If there's is other way I would like to know.
Also I had to erase the project writing the URL for it because the delete button is disable (because of the "building" state). My project got stuck in testing (it was my fault that it got stuck) and I clicked build accidentally when it wasn't ready
