GRADLE-3030: Classifier missing in generated pom.xml based on project dependencies

In GRADLE-3030 I reported that the published maven artifacts are lacking the classifier (if set) when derived from project dependencies. With the stricter/correct maven pom intrepretation introduced in Gradle 1.9 it caused us quite a bit of hassle. I have tracked down the issue and implemented a fix.