-
Notifications
You must be signed in to change notification settings - Fork 28
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
ArtifactNotFoundException for a pom artifact, when attempting to create uberjar #19
Comments
Looks like a missing maven repository |
And I believe it is duplicate of #15 |
Ah whoops I didn't realise this is a known issue! Thanks for the tip - I solved by placing the following in my
I needed clojars in addition, otherwise I didn't think I even had a "system" |
I have an issue like that. |
I just encountered the same problem as @maxp. In this case it doesn’t seem to be related to the system I was able to work around this by forcing all Jackson artifacts to 2.9.8 by adding them to the root com.fasterxml.jackson.core/jackson-core {:mvn/version "2.9.8"}
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor {:mvn/version "2.9.8"}
com.fasterxml.jackson.dataformat/jackson-dataformat-smile {:mvn/version "2.9.8"} (YMMV) |
If anyone has any idea whether this issue with Jackson 2.9.6 is rooted in Cheshire, Jackson, or tools.deps, I’d be happy to report it to the most likely candidate. I myself just have no idea. |
@maxp @aviflax the problem is in the way how cambada reads deps.edn. It doesn't know the location of system-level deps.edn so it can read only project-level file. Solution is to include all deps.edn{:deps {metosin/spec-tools {:mvn/version "0.9.1"}}
:aliases {:cambada
{:extra-deps
{luchiniatwork/cambada
{:mvn/version "1.0.0"}}}}
:mvn/repos {"central" {:url "http://central.maven.org/maven2/"}
"clojars" {:url "https://repo.clojars.org/"}}
:paths ["src"]} main namespace(ns min.core
(:require [spec-tools.swagger.core :as swagger]
[clojure.spec.alpha :as s])
(:gen-class))
(s/def ::id string?)
(s/def ::name string?)
(s/def ::street string?)
(s/def ::city #{:tre :hki})
(s/def ::address (s/keys :req-un [::street ::city]))
(s/def ::user (s/keys :req-un [::id ::name ::address]))
(defn -main [& args]
(println
(swagger/swagger-spec
{:swagger "2.0"
:info {:version "1.0.0"
:title "Sausages"
:description "Sausage description"
:termsOfService "http://helloreverb.com/terms/"
:contact {:name "My API Team"
:email "[email protected]"
:url "http://www.metosin.fi"}
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}}
:tags [{:name "user"
:description "User stuff"}]
:paths {"/api/ping" {:get {:responses {:default {:description ""}}}}
"/user/:id" {:post {:summary "User Api"
:description "User Api description"
:tags ["user"]
::swagger/parameters {:path (s/keys :req [::id])
:body ::user}
::swagger/responses {200 {:schema ::user
:description "Found it!"}
404 {:description "Ohnoes."}}}}}}))) Outputpersonal/min [master●] » clj -R:cambada -m cambada.uberjar
Cleaning target
Creating target/classes
Compiling min.core
Creating target/min-1.0.0-SNAPSHOT.jar
Updating pom.xml
Creating target/min-1.0.0-SNAPSHOT-standalone.jar
Including min-1.0.0-SNAPSHOT.jar
Including spec-tools-0.9.1.jar
Including clojure-1.9.0.jar
Including spec.alpha-0.2.176.jar
Including jackson-databind-2.9.8.jar
Including core.specs.alpha-0.1.24.jar
Including jackson-annotations-2.9.0.jar
Including jackson-core-2.9.8.jar
Done!
personal/min [master●] » java -cp target/min-1.0.0-SNAPSHOT-standalone.jar min.core
{:swagger 2.0, :info {:version 1.0.0, :title Sausages, :description Sausage description, :termsOfService http://helloreverb.com/terms/, :contact {:name My API Team, :email [email protected], :url http://www.metosin.fi}, :license {:name Eclipse Public License, :url http://www.eclipse.org/legal/epl-v10.html}}, :tags [{:name user, :description User stuff}], :paths {/api/ping {:get {:responses {:default {:description }}}}, /user/:id {:post {:summary User Api, :description User Api description, :tags [user], :parameters [{:in path, :name min.core/id, :description , :type string, :required true} {:in body, :name min.core/user, :description , :required true, :schema {:type object, :properties {id {:type string}, name {:type string}, address {:type object, :properties {street {:type string}, city {:enum [:tre :hki], :type string}}, :required [street city], :title min.core/address}}, :required [id name address], :title min.core/user}}], :responses {200 {:schema {:type object, :properties {id {:type string}, name {:type string}, address {:type object, :properties {street {:type string}, city {:enum [:tre :hki], :type string}}, :required [street city], :title min.core/address}}, :required [id name address], :title min.core/user}, :description Found it!}, 404 {:description Ohnoes.}}}}}} |
@DeLaGuardo thank you! Very helpful! 🤔 I wonder if we should/could modify Cambada such that it checks whether |
@aviflax I wonder if this is the behavior that the clojure script has under the hood because, even though cambada depends on |
For me the error was:
Adding |
Hi there,
I'm trying to make an uberjar for a project that depends on
metosin/spec-tools
version0.8.0
, and I am getting the following error:Why is it unable to find this pom artifact? I can see
com.fasterxml.jackson:jackson-base:pom:2.9.7
in my~/.m2
directory.My
deps.edn
:The dependency tree:
The text was updated successfully, but these errors were encountered: