Seems I found some way to download poms based on the next:
We can add @pom or @jar to dependency declaration like  compile 'groupId:name:version@pom' if we want to resolve dependency with specified artifact type. I think I can use this and refactor the code.