maven2gradle: Please evaluate the "RELEASE" version keyword at least once

The maven2gradle task should evaluate the version keywords such as “RELEASE”, which are provided by maven. E.g. if gradle reads RELEASE, it should look up the current version number and paste it into the generated gradle build script.

Why do you think that Gradle should resolve ‘RELEASE’ to a concrete version at the time of conversion? Also, isn’t ‘RELEASE’ a deprecated and discouraged Maven feature?

As far as i know, it isn’t deprecated for dependencies (indeed for plugin versions). It might be discouraged in the forums and on stackoverflow, but i think it’s useful for prototyping and checking, what release remains compatible.

Therefore it is a usable feature but somewhat controversial feature, that has it’s use cases (e.g. prototyping).

Why should Gradle resolve it to a concrete version then, rather than leaving it at ‘RELEASE’?

Because “RELEASE” in a gradle build file results in a build failure.

Proof is that manually replacing it with a valid version solved this.

Where exactly does it fail? ‘project.version’ in itself can have any value.

In my build.gradle i have a dependency declaration similar to this:

compile group: ‘org.hibernate’, name: ‘hibernate-core’, version: ‘RELEASE’

I get the error “could not find dependency …”

Replacing ‘RELEASE’ with eg ‘3.6.7.Final’ will work as desired.

Waking up this thread to figure out a solution,

Sonatype Nexus, Resolves LATEST and RELEASE:

And this is failing for me too, What i am Trying to do is, Find the latest version of Snashot and Release of a dependency, Cannot use dynamic version, Because i create a metadata file, Which latest can be used by python script, To get artifacts to create a sandbox. So cannot use + etc. From what i know, Nexus API does not support that.

Is there a way, I can just get the version numbers in Gradle for SNAPSHOT and Release and dump that to a file ?