This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-28
Channels
- # announcements (1)
- # babashka (9)
- # beginners (82)
- # calva (6)
- # cider (3)
- # clj-kondo (69)
- # cljdoc (4)
- # cljs-dev (10)
- # cljsrn (2)
- # clojure (74)
- # clojure-europe (11)
- # clojure-italy (9)
- # clojure-nl (15)
- # clojure-spec (18)
- # clojure-uk (89)
- # code-reviews (8)
- # core-async (42)
- # cursive (22)
- # datomic (26)
- # fulcro (13)
- # graalvm (31)
- # graphql (1)
- # leiningen (20)
- # malli (19)
- # music (1)
- # off-topic (4)
- # pathom (56)
- # re-frame (3)
- # reitit (26)
- # shadow-cljs (40)
- # spacemacs (5)
- # tools-deps (25)
How do I import https://mvnrepository.com/artifact/org.apache.cxf/cxf/3.3.4 in deps.edn?
I'm trying org.apache.cxf/cxf {:mvn/version "3.3.4" :extension "pom"}
It add a .pom
to my classpath, but I can't import anything
(filter
#(string/includes? % "cxf")
(string/split(System/getProperty "java.class.path") #":"))
=> ("/home/souenzzo/.m2/repository/org/apache/cxf/cxf/3.3.4/cxf-3.3.4.pom")
https://maven.apache.org/pom.html#Dependencies type is documented here for others who have never heard of this š
okay, https://maven.apache.org/ref/3.6.3/maven-core/artifact-handlers.html is way more interesting. tools.deps maybe doesn't support pom extensions because they're not added to the classpath.
You'll need to manually specify all the deps that the POM specifies I think.
I thought there was a way for t.d.a. to pull in things via a pom dep but I can't think what it is right now...
i am seeing what looks like extra strings "/main" and "/java" being tacked on to a couple of the non-jar items of a classpath stored in some files in .cpcache. specifically, for: https://github.com/FundingCircle/fc4-framework/tree/master/tool#running-the-tests , running clj leads to .cp and .libs files containing: ⢠.gitlibs/libs/clj-chrome-devtools/clj-chrome-devtools/a1b1b0903ae5ba56eaada8496ed3785a53d8cc06/src/main ⢠.gitlibs/libs/clj-chrome-devtools/clj-chrome-devtools/a1b1b0903ae5ba56eaada8496ed3785a53d8cc06/src/java looking at the repository for the library in question (https://github.com/tatut/clj-chrome-devtools), i see a src directory but no subdirectories named "main" nor "java". there is a deps.edn file, but it has no :paths key is this expected behavior?
The :paths
in fc4-framework/tool/deps.edn
has src/main
so that will propagate I believe. Not sure where src/java
is coming from. What's in your ~/.clojure/deps.edn
file?
Hmm, perhaps not. I just cloned the repo and ran clj -A:dev:test
in the tool
folder and when I look in .cp
I do not see src/main
or src/java
(! 858)-> cat .cpcache/1648314215.cp | tr ':' '\n'|fgrep gitlib
/Users/sean/.gitlibs/libs/expound/expound/297e0812eb77ae3aa8f30e823f8bdbbb4650fa28/src
/Users/sean/.gitlibs/libs/clj-chrome-devtools/clj-chrome-devtools/a1b1b0903ae5ba56eaada8496ed3785a53d8cc06/src
^ @sogaiu Maybe this is from your user-level deps.edn
file?
@seancorfield thanks for checking
my ~/.clojure/deps.edn file is basically a slightly modified version of your public one š grepping for java
in it doesn't turn up any culprits (just the javafx deps for rebl)
i see my clojure-tools is 1.10.1.447 though, may be i should update that and see if it makes any difference
(! 861)-> clj -Sdescribe
{:version "1.10.1.492"
:config-files ["/usr/local/Cellar/clojure/1.10.1.492/deps.edn" "/Users/sean/.clojure/deps.edn" "deps.edn" ]
(after updating your CLI, remember to delete .cpcache
to make sure it regenerates it)
thanks -- what you said about propagating seems to be happening. i failed to mention i was not on the master branch. the branch i'm on has "src/java" as one of its paths.
Ah, interesting. With the latest CLI I see src/main
in .cp
but only for the tool
repo itself, not for any transitive deps.
So if you update and re-generate and no longer see src/main
/`src/java` then it sounds like a bug that got fixed since .447
I switched to that branch, deleted .cpcache
, and re-ran clj -A:dev:test
and now I see src/java
in .cp
but only for the tool
repo and it does not propagate into the git deps.
@seancorfield upgrading seems to have fixed things -- thanks a lot for your help š