[GRADLE-3234] invalid pom generated when dependency with null version is declared Created: 30/Jan/15  Updated: 19/Mar/15  Resolved: 19/Mar/15

Status: Resolved
Project: Gradle
Affects Version/s: 2.3-rc-1
Fix Version/s: 2.4-rc-1

Type: Bug
Reporter: René Gröschke (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0


If a build has declared a dependency with a null version value. the generated pom file is invalid. we should provide further information to support the user on fixing this.

If a build contains multiple dependencies of the same library like:


{ testCompile("junit:junit:4:12") testCompile("junit:junit") }

the generated pom is still invalid. if the build fails or not depends on how the generated pom file is structured. If the dependency without a version is written in the pom before the dependency with valid version number, the build succeeds, otherwise the build fails.

It turns out order of the dependencies in the generated pom file is not deterministic. While testing we noticed that the build succeeds with java8 but fails with java7 (as the dependency order in the pom is different). It might be a result of the changed hashmap implementation java8 (http://stackoverflow.com/questions/24673567/change-to-hashmap-hash-function-in-java-8)

Generated at Wed Jun 30 12:43:29 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.