I’m trying to add a dependency that lives in a GitHub Packages Maven repository. In my deps.edn, I have:
:mvn/repos {"github" {:url ""}
And in ~/.m2/settings.xml:
<server>
<id>github</id>
<username>me</username>
<password>ghp_redacted</password>
</server>
Locally, everything works fine. But in a GitHub Actions run, I get:
Error building classpath. The following artifacts could not be resolved: foobar:foobar:jar:4.5.131 (absent): Could not find artifact foobar:foobar:jar:4.5.131 in central ( )
In my GitHub Actions workflow, I have ~/.m2/settings.xml set up the same way as locally.
I can’t figure out why the artifact doesn’t resolve in GitHub Actions. It’s as if clojure is not seeing the :mvn/repos entry at all.
Is there a way to have clojure emit some sort of debug logs about how it’s trying to resolve the artifact?Not really. I think it's probably more likely that your actions aren't seeing your settings.xml than the deps.edn - are you configuring that with java-setup action or some other way?
https://github.com/marketplace/actions/setup-java-jdk#maven is what I would recommend using to set up settings.xml
@alexmiller would either -Sverbose or -Strace help here?
Doubt it
I’m using mise-en-place (https://mise.jdx.dev) and its GitHub Action (precisely to avoid CI-related issues, somewhat ironically, I suppose).
If my actions weren’t seeing my settings.xml, I’d expect:
Caused by: org.apache.http.client.HttpResponseException: status code: 401, reason phrase: Unauthorized (401)
Which is what I get if I make my local settings.xml invalid.https://clojurians.slack.com/archives/C6QH853H8/p1794056450334519?thread_ts=1794043040.142449&cid=C6QH853H8 Thanks, I’ll check that out! 👍
The maven resolver will just cycle through all the repos and only return the first error, so that could be happening