Skip to content

Trying to cache clojure dependencies: .m2/repository: no matching files

Summary

I try to add cache in my clojure app, but when it try to create it. I'm getting the following warning:

WARNING: .m2/repository: no matching files

And the cache file is building empty.

Steps to reproduce

Build a clojure app using lein.

lein new luminus clojure-gitlab-runner

Add .gitlab-ci.yml add the following code:

image: clojure:latest

# Cache gems in between builds
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .m2/repository

stages:
  - deps
  - test

deps:
  stage: deps
  script:
    - lein deps

test:
  stage: test
  script:
    - lein test

Example Project

https://gitlab.com/earayo/clojure-gitlab-runner

What is the current bug behavior?

No create the dependencies on cache path.

What is the expected correct behavior?

It should create the cache with the all info in the .m2/repository directory.

Edited by 🤖 GitLab Bot 🤖