Gradle write new pom

I am trying to create new pom with gradle. When I put distributionManagement i always get

Cannot cast object ‘org.apache.maven.model.Repository@47a5ea25’ with class ‘org.apache.maven.model.Repository’ to class ‘org.apache.maven.model.DeploymentRepository’

exactly as in: http://forums.gradle.org/gradle/topics/failed-to-write-new-pom-with-distributionmanagement-repository

Could anyone help me with that?