Dependency not updated from nexus


(detlef.brendle) #1

Hi there. I have a gradle script that takes a dependency from a nexus repository the gradle script looks like: buildscript {

repositories {

mavenRepo url: “http:///nexus/content/repositories/public”

}

dependencies {

classpath group: ‘com.csg’, name: ‘gcidPlugin’,

version: ‘1.4.+’, ext: ‘jar’

} }

Retrieving the latest version from my nexus works fine if my local cache is empty. If not then Im not sure what version it really takes.

My Nexus has got some versions of the ‘gcidPlugin’ in 1.4.1 1.4.2 1.4.3 1.4.4

So asume I upload a new version into my nexus, the next time my buildscript should lookup the ‘latest matching version’. In this case it should download 1.4.4, but it does not and keeps the previous local version. The last updated timestamp within the metadata file is the one from my latest uploaded version (1.4.6). This is a UTC timestamp - maybe this is confusing gradle ?20120725113910 == Wed Jul 25 2012 13:39:10 GMT+0200

<metadata>
<groupId>com.csg</groupId>
<artifactId>gcidPlugin</artifactId>
<version>1.0.0</version>
<versioning>
<versions>
<version>1.4.1</version>
<version>1.4.2</version>
<version>1.4.3</version>
<version>1.4.4</version>
<version>1.4.5</version>
<version>1.4.6</version>
</versions>
<lastUpdated>20120725113910</lastUpdated>
</versioning>
</metadata>

Q: Is there a property that prevents Gradle to check for the latest available version ?

Thank you for pointing me to the right direction.

Cheers, detlef


(Peter Niederwieser) #2

See Fine-tuned control over dependency caching in the Gradle User Guide. You can always force a check with ‘–refresh-dependencies’.