If you can wait for a week or so for 1.0-milestone-5, you can use the 
repositories.ivy() method to set up a local ivy cache which does not cache 
artifacts:

repositories {
    ivy {
        artifactPattern 
"$thirdpartyDir/[organisation]/[module]-[revision](-[classifier]).[ext]"
        artifactPattern 
"$thirdpartyDir/[organisation]/[revision]/[module]-[revision](-[classifier]).[ext]"
   
        artifactPattern ...
    }
}

It won't work with milestone-4 or earlier, due to 
http://issues.gradle.org/browse/GRADLE-1760


On 22/08/2011, at 11:05 AM, marcellodesales wrote:

> I could get this done removing the cache manually each time I compile... It
> does not work even with the "useOrigin = true"..
> 
> // Defining the thirdparty directory as a repository with the directory
> structure patterns used.
> def thirdpartyDir = new File("$projectDir/../thirdparty").getCanonicalPath()
> repositories {
>    add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
>        name = 'repo'
>        addArtifactPattern
> "$thirdpartyDir/[organisation]/[module]-[revision](-[classifier]).[ext]"
>        addArtifactPattern
> "$thirdpartyDir/[organisation]/[revision]/[module]-[revision](-[classifier]).[ext]"
>        addArtifactPattern
> "$thirdpartyDir/[organisation]/[revision]/[module](-[revision])(-[classifier]).[ext]"
>        descriptor = 'optional'
>        checkmodified = true
>        useOrigin = true
>    }
> }
> 
> compileJava(dependsOn: "clearLocalRepo") {
> ...
> ...
> }
> 
> task clearLocalRepo = {
>    def userHome = System.properties["user.home"]
>    def removeCache = "rm -rf $userHome/.gradle/cache/LOCAL_LIB1"
>    println "Executing $removeCache"
>    removeCache.execute()
> 
>    removeCache = "rm -rf $userHome/.gradle/cache/LOCAL_LIB2"
>    println "Executing $removeCache"
>    removeCache.execute()
> }
> 
> thanks
> Marcello
> 
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Jar-on-filesystem-repository-updated-but-Gradle-cache-not-updated-tp4717446p4721693.html
> Sent from the gradle-user mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to