Hello, Someone using jfrog on a ClojureScript project? Some place I can find some examples on how to setup it? Thanks
They have at least 8 different products. What exactly do you mean?
I mean pull maven dependencies from Jfrog
In this case, how is it relevant to CLJS? I don't know anything about jfrog, but isn't it just a Maven repo that needs credentials to be accessed?
According to their docs, you just configure stuff in ~/.m2/settings.xml. And tools.deps, assuming that's what you're using, respects those settings.
yes, correct, I trying to setup the :repositories key on shadow-cljs.edn
Oof, don't do that.
Use :deps true in shadow-cljs.edn and rely on providing the deps via deps.edn. The only downside, as far as I'm aware, is that adding a new dependency would require restarting your CLJS build, that's it.
Note also that the :deps key can also mention specific aliases.
hum, need to move the dependencies from shadow-cljs.edn to deps.edn ?
That's what I always do myself, yes.
I will try, thanks for now!
In this case, I still can use?
npx shadow-cljs compile app
I configured my deps.edn like
{:paths ["src" "test"]
:deps {reagent/reagent {:mvn/version "1.1.1"}
re-frame/re-frame {:mvn/version "1.4.2"}
day8.re-frame/http-fx {:mvn/version "0.2.4"}
metosin/reitit {:mvn/version "0.7.2"}
binaryage/devtools {:mvn/version "1.0.6"}
arttuka/reagent-material-ui {:mvn/version "5.11.12-0"}
day8.re-frame/test {:mvn/version "0.1.5"}}
:aliases
{:cljs
{:extra-deps {thheller/shadow-cljs {:mvn/version "2.25.6"}}}}
}And try to run:
npx shadow-cljs compile app
but see:
> Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
> Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.
> In this case, I still can use? [...]
Yes.
> Could not locate shadow/cljs/devtools/cli__init.class [...]
As per https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn:
> You must add the thheller/shadow-cljs artifact to your deps.edn manually.
Kind works, I setup my deps like:
{:paths ["src" "test" "resources"]
:deps {reagent/reagent {:mvn/version "1.1.1"}
re-frame/re-frame {:mvn/version "1.4.2"}
day8.re-frame/http-fx {:mvn/version "0.2.4"}
metosin/reitit {:mvn/version "0.7.2"}
binaryage/devtools {:mvn/version "1.0.6"}
arttuka/reagent-material-ui {:mvn/version "5.11.12-0"}
thheller/shadow-cljs {:mvn/version "2.28.20"}
day8.re-frame/test {:mvn/version "0.1.5"}}
:mvn/repos
{"jfrog" {:url "artifactory maven url"}}
:aliases
{:cljs
{:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.20"}}}}
}
and also the ~/.m2/settings.xml
But still see the dependencies downloaded from central and clojars
Maybe I missing something else?Ah, so you want for everything to be downloaded from jfrog?
I don't think that's supported - there's a somewhat similar "ask": https://ask.clojure.org/index.php/14198/ensure-private-coordinate-cannot-shadowed-public-repository?show=14198#q14198
But after a brief look at the impl, maybe you can add "central" and "clojars" keys to :mvn/repos with nil values?
Yep, everything, but dont looks possible.
Did setting "central" to nil not work?
actually it works, but some packages cannot be find via jfrog, maybe is possible to configure the source per dependency?
Not that I'm aware of.
If you're fine with configuring the settings via .m2/settings.xml, there you can set a specific order of repositories.
yep, like this it works.
thanks for the help! Any idea why such settings is no present via deps.end ?
Apart from what's written in that "ask" - no clue. If you can describe your use-case in that or a different "ask", that would definitely be helpful.