Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArtifactDescriptorException: Failed to read artifact descriptor when running uberjar #15

Open
krukow opened this issue Oct 2, 2018 · 4 comments

Comments

@krukow
Copy link

krukow commented Oct 2, 2018

I'm experiencing an exception

Exception in thread "main" org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.httpcomponents:httpcore:jar:4.4.9
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:323)
...
	at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:215)
	at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:197)
	at cambada.uberjar$get_dep_jars.invokeStatic(uberjar.clj:109)
	at cambada.uberjar$get_dep_jars.invoke(uberjar.clj:107)
...

when running clj -A:uberjar -Srepro -Sforce on OS X High Sierra.

I've attached the simplest repro I could make for this.

This reproduces from a clean install:

  1. empty ~/.m2 and ~/.clojure,
  2. brew install clojure
  3. run:
clj -Sdeps '{:deps
              {seancorfield/clj-new
                {:git/url "https://github.com/seancorfield/clj-new"
                 :sha "21ca1b27f46dc324be084ba839beca555aeda387"}}}' \
  -m clj-new.create \
  app \
  krukow/artifact-exception
  1. Add to deps.edn
{:paths ["resources" "src"]
 :deps {org.clojure/clojure {:mvn/version "1.9.0"}
        clj-http {:mvn/version "3.8.0"}}
 :aliases
 {:uberjar
  {:extra-deps
   {luchiniatwork/cambada {:mvn/version "1.0.0"}}
   :main-opts ["-m" "cambada.uberjar"
               "-m" "krukow.artifact-exception"]}}
 }

However, if I add

:mvn/repos {"central" {:url "http://central.maven.org/maven2/"}
             "clojars" {:url "https://repo.clojars.org/"}}

things work as expected (I'm not interested in this since it's using http).

simple-repro.zip

@krukow
Copy link
Author

krukow commented Oct 2, 2018

As discussed in Clojure Slack #tools-deps: "Cambada doesn't consider the system deps.edn file."

@krukow
Copy link
Author

krukow commented Oct 2, 2018

@xfthhxk
Copy link
Contributor

xfthhxk commented Oct 2, 2018

Hi @krukow Ran into the same thing a few days ago and saw your comments in #tools-deps. This issue should be addressed by #14 if it gets accepted.

@krukow
Copy link
Author

krukow commented Oct 3, 2018

Awesome. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants