Feedback seems to have slowed, so I will merge this. I would like some further testing - but since I will do an alpha-1 for Groovy 6, I suspect we'll have time to do minor tweaks as needed.
Currently, the default repo directory when using Maven is ~/.groovy/grapesM2 to match Ivy's ~/.groovy/grapes. They aren't compatible but you could point to "grapes" if you like that name using a "grape.prefix" system property so long as you don't want to swap back to Ivy without cleaning the directory manually. If you are feeling brave, you can also set the "grape.root" system property to "~/.m2" and "grape.prefix" to "repository" and you can share grapes with your Maven builds. This should be fine but I think needs more testing before I'd do that in a production environment. Cheers, Paul. On Tue, Mar 17, 2026 at 9:15 AM Paul King <[email protected]> wrote: > > You can add changing as an annotation attribute or embedded in the > short-form version: > > E.g. in the Groovy codebase, ExtensionModuleTest: > @Grab(value='module-test:module-test:1.4', changing='true') > E.g. STCExtensionMethodsTest: > @Grab('module-test:module-test:1.4;changing=true') > > On Tue, Mar 17, 2026 at 7:37 AM Per Nyfelt <[email protected]> wrote: > > > > I have tried to create a reproducible example but did not succeed, hence no > > JIRA tocket. The reason is that -SNAPSHOT often works but far from always. > > Maybe it's a time thing (short duration between published snapshots), maybe > > its something else but I find it unreliable and the only reliable way i > > found is to clear the cache after publishing the snapshot. That being said, > > i have not tried changing=true. Where do i add that? To @GrabConfig or in > > the @Grab statement itself? > > > > > > On 3/15/26 16:18, Milles, Eric (TR Technology) via dev wrote: > > > > > GrapeIvy does not detect new snapshot versions well so you end up having > > > to clear the cache after each publish for GrapeIvy to find the new one > > > > Is there a JIRA ticket for this issue? Ivy should be seeing > > "abc-1.0.0SNAPSHOT.jar" as a snapshot not release and so it checks the > > repository for new artifacts. However, if you are pushing a new > > "abc-1.0.0.jar" to your repo, that is not automatically checked if cached. > > You can add "changing=true" attribute to your dependency or there are other > > config options to make this happen. Gradle behaves this same way unless > > you use "--refresh-dependencies" command-line argument.
