Support for Java 1.5 & some build env fixes

@stevesaliman

Can you please take a look. Actually, as Gradle supports 1.5, you plugin needs too.

Also made small fix related to maven configuration, now it's more portable.

Please, let me know if you need any additional information.

-vova