Howto define a version to a snapshot revision of a plugin


(detlef.brendle) #1

Hi,

I building a plugin that is used from my gradle script. The gradle script uses versions that are greater than 1.4. ************ buildscript {

repositories {

mavenRepo url: “http://server.com/nexus/content/repositories/releases/

mavenRepo url: “http://server.com/nexus/content/repositories/snapshots/

}

dependencies {

classpath group: ‘my.group’, name: ‘myPlugin’, version: ‘1.4.+’, ext: ‘jar’

} }

This resolves the version of the plugin that can be found in the ‘releases’ repo. That is all fine.

My Question: On my Buildserver I want to use the latest snapshot of my plugin. How would I define my version then ? I have done changed my script in a way, so I can pass the version from outside, but Im struggling with the value that needs to be passsed. …

dependencies {

classpath group: ‘my.group’, name: ‘myPlugin’, version: System.getProperty(‘plugin.version’) ?: ‘1.4.+’, ext: ‘jar’

} …

The requirement is, that it always resolves the snapshot with the greatest revision

So assume I have two snapshots ‘1.4.1-SNAPSHOT’ and ‘1.4.2-SNAPSHOT’ I want to use the 1.4.2-SNAPSHOT.

Is that possible ?