NPE when publishing with Maven's dependencyManagement on 2.3 RC2

This is similar issue to GRADLE-3233. In my case the version is left unspecified, but resolution strategy is configured to set desired version and pom.xml file is modified to add section.

I have prepared small example project to help reproduce this problem: https://github.com/hban/gradle-publish-npe. Build breaks with NPE when running publishToMavenLocal task. The same build will pass on Gradle 2.2.1.

Example project is a bit contrived - I’ve actually encounter this issue when using Spring’s dependency management plugin which performs similar steps to manage dependencies.

thanks for letting us know. I’ll have a look

I can confirm the issue and just have pushed a fix for it.

Thanks for reporting this issue: it’s been fixed and we’ve created a new release candidate for Gradle 2.3. If you can try it out to confirm that it fixes your build, that would really help.

The issue report: https://issues.gradle.org/browse/GRADLE-3233
The new release candidate: http://gradle.org/release-candidate

I tried the RC-3 and can confirm that this issue is now fixed. Thanks!