I'm nearly at the end of phase 2 of a project and my client is asking me to send him my source code (and WAR file). Is it a really bad idea to do that before he's paid?
He paid for phase 1 ok (though it was via Elance so the funds for that part were held by a third party). But for phase 2 he's paying directly and also wants the source code, so may possibly throw up excuses / extra demands not to pay?...
Not been freelancing that long and haven't been in this situation before, so hoping someone may have some advice?
Have you ever tried to decompile some code? If you don't have any super-secret algorithms in your application I wouldn't mind about decompilation. You could also use an obfuscator (like ProGuard) to ... well... obfuscate your code. It would be still possible to decompile your code but in either cases it's not that you will get a compilable project from a decompiler.
Also, as a consultant, you own the business. And you, as the owner need to develop your business.
If you can't trust your clients to pay, then you need to change you business model to get better clients or give them incentive to pay. Doing legal stuff to get them to pay would work, but ultimately, it might hurt your reputation (and your ability to get repeat / new business), if you are heavy handed in this regard.