After a long fight with this, there were two problems mainly. The first one was related to the urls specified in scm section of the pom.xml file. My schemas were https and github was prompting me for the user, but there were no output on the screen showing that prompt. So the first step was changing the url schemas to the following:
<scm>
<connection>scm:git:git@github.com:pentasoft/s3-static-uploader.git</connection>
<developerConnection>scm:git:git@github.com:pentasoft/s3-static-uploader.git</developerConnection>
<url>https://github.com/pentasoft/s3-static-uploader</url>
</scm>
where the https schemas have been replaced by the ssh schema.
After fixing this there was a second problem regarding to the ssh access to Github. When launching the build, Github was answering with the following:
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)?
As in the previous problem these prompt doesn't show and the feel is that the build is hanged again. In order to fix this, I issued the command ssh -T git@github.com (see this Github guide) and I answered yes to that question in order to avoid that prompt in the future.
After all this the build is not hanged anymore (following the instructions of @AWhitford in the previously referenced SO question).
May be all this would have been easier with a non Windows box...