Welcome! Please see the About page for a little more info on how this works.

0 votes
in Other by

clj command fails to build classpath on new installation!!!

Running a new installation of POP os, which is a late ubuntu derivative. I've run into this issue on my m1 mac as well. However, after removing the .m2 homedir the problem was solved. But on linux the issue persists.

using adopt temurin 17 jdk + jre

clj version: 1.11.1

all install steps followed from the docs were successful without issues. until you run clj or clojure from cli. The following trace is produced:

Error building classpath. Failed to read artifact descriptor for org.clojure:clojure:jar:1.11.1
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:jar:1.11.1
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:263)
	at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:115)
	at clojure.tools.deps.extensions.maven$fn__1155.invokeStatic(maven.clj:143)
	at clojure.tools.deps.extensions.maven$fn__1155.invoke(maven.clj:143)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps$expand_deps$children_task__773$fn__775$fn__776.invoke(deps.clj:405)
	at clojure.tools.deps.util.concurrent$submit_task$task__481.invoke(concurrent.clj:35)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

the lead error causing the above trace is the following:

Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:443 [repo1.maven.org/] failed: Connect timed out

Running clj -Sforce after removing the .m2 dependencies yields the same result. Checking with other tools it seems that https://repo1.maven.org/maven2 is not reachable. I can't confirm if it is unreachable for others outside of my location. However the fact that removing and force-reinstalling deps on my mac worked tells me that something can be done to reoslve the issue. just not sure what.

Any help appreciated.

1 Answer

0 votes

Not really sure what to suggest ... seems like a networking issue on your machine?