Fork me on GitHub
#tools-deps
<
2019-11-28
>
souenzzo17:11:19

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")

dominicm17:11:00

https://maven.apache.org/pom.html#Dependencies type is documented here for others who have never heard of this šŸ™‚

dominicm18:11:25

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.

souenzzo18:11:04

Okay. So I will not be able to use this dep at this time?

seancorfield18:11:42

You'll need to manually specify all the deps that the POM specifies I think.

seancorfield18:11:14

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...

dominicm18:11:15

You definitely don't want it on the classpath, that's for sure šŸ™‚

šŸ‘ 4
souenzzo18:11:11

Nice to know

sogaiu22:11:53

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?

seancorfield22:11:22

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?

seancorfield22:11:39

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

seancorfield22:11:59

(! 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

seancorfield22:11:20

^ @sogaiu Maybe this is from your user-level deps.edn file?

sogaiu22:11:06

@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

seancorfield22:11:57

(! 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" ]

seancorfield22:11:20

(after updating your CLI, remember to delete .cpcache to make sure it regenerates it)

sogaiu23:11:21

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.

seancorfield23:11:12

Ah, interesting. With the latest CLI I see src/main in .cp but only for the tool repo itself, not for any transitive deps.

sogaiu23:11:43

fwiw, the branch i'm trying is native-image

seancorfield23:11:43

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

sogaiu23:11:59

right -- will work on that

seancorfield23:11:21

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.

sogaiu23:11:02

thanks for checking -- hopefully upgrading will fix it šŸ™‚

sogaiu23:11:10

@seancorfield upgrading seems to have fixed things -- thanks a lot for your help šŸ™‚