Skip to content

Caching

How do I cache Maven dependencies?

Quick answer

Cache ~/.m2/repository keyed on a hash of every pom.xml.

The detail that matters

Use setup-java's built-in cache: maven option, which handles the key for you correctly.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.