Changed gradle build files to use maven plugin for archive upload

This prevents generated pom file to set all dependencies as runtime scope.