Clearing Grails Dependency Cache

11,719

As far as I know, Grails uses Ivy under the hood (and not maven). Could you check ~/.grails/ivy-cache?

Share:
11,719

Related videos on Youtube

raoulsson
Author by

raoulsson

Before: CTO Contovista AG, Zurich, Co-founder Zorp Technologies Inc., SF, Manager and Chief System Architect at Leonteq, and many more... Experienced software engineer and teamlead looking to build/enable useful, delightful, and meaningful products. Passionate, hard-worker interested in contributing to team-oriented, strong engineering cultures. Proven track record of hiring and running successful teams.

Updated on April 16, 2022

Comments

  • raoulsson
    raoulsson about 2 years

    I run into some problems when trying to solve a problem I had with SNAPSHOT maven dependencies (see here).

    When running grails dependency-report, cached dependencies get listed, more or less like this:

    acme-adapter-api by com.acme
    108 kB (0 kB downloaded, 108 kB in cache)

    As this answer suggests, you can run into trouble when updating dependencies without increasing the release number, cause the cache is not emptied and SNAPSHOT dependencies don't get refetched, as one would expect.

    I looked all over the place, also in the %HOME%\.grails directory and under the bed ;-) but could not find anything looking like a cache.

    Where is it, so I can delete it manually? Or even better, how can I get grails compile to clean it forcefully?

    Thanks!
    Raoul

    P.S: I'm using Grails 1.2M4

  • raoulsson
    raoulsson over 14 years
    And there it is! Thanks! Still wondering though why it doesn't clean reload when referring to maven SNAPSHOTS. And yes, Grails doesn't use maven, but accesses its repos...
  • Devanshu Mevada
    Devanshu Mevada over 14 years
    SNAPSHOTS should clearly be downloaded if a newer version is available in the remote repository. This is the expected behavior (at least in the maven world) and what you are describing sounds like a bug. But I don't really know Ivy (except that it uses maven dependency management system and repositories) so I'm not 100% sure.
  • Esko
    Esko over 14 years
    raoulsson: It's the Ivy that accesses Maven repos for increased compatability with managed dependencies - if you only use Maven for dependencies, consider at least testing Ivy out :)