RFE: Make sure versions adhere to Maven requirements

(Jörn Huxhorn) #1

I just received a rather strange error message that left me baffled for a moment:

Processing of [~]/.gradle/caches/modules-2/files-2.1/com.acme/bar/1.2.0-SNAPSHOT/ef458d28cae6dc151d5e6f64b8f18faf9e7ba6cd/bar-1.2.0-SNAPSHOT.pom failed:
    'dependencies.dependency.version' for com.acme:foo:jar must not contain any of these characters \/:"<>|?* but found : in com.acme:bar:1.2.0-SNAPSHOT

The reason was that the version of foo was indeed 1.0.0-SNAPSHOT:, i.e. contained a trailing : by mistake. The artifact in question was produced by Gradle, though, so I would suggest that Gradle - or at least the Maven plugin - should make sure that the version is indeed valid.

I would have expected Gradle to fail earlier and at foo instead while resolving the bar dependencies that is referencing foo.