Java maven build completes successfully but .m2 local repository is not getting cached

Hi @native-api,

Thank you very much for your help. It worked after removing the exit command from the script. And as you suggested I have updated the common-build-problems.md documentation and here is the PR1.

Please review and merge.

Thanks
~Kasun