Fork me on GitHub
#tools-deps
<
2019-06-04
>
martinklepsch09:06:14

curl -O 
clj -Sdeps '{:deps {org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu #:local{:root "mxnet-full_2.11-linux-x86_64-cpu-1.4.1.jar"}}}'
Error building classpath. 1 problem was encountered while building the effective model for org.apache.mxnet:mxnet-core:[unknown-version]
[FATAL] Non-resolvable parent POM for org.apache.mxnet:mxnet-core:[unknown-version]: Could not find artifact org.apache.mxnet:mxnet-parent:pom:INTERNAL in central () @
Is this supported and a bug or am I doing something wrong here?

Alex Miller (Clojure team)11:06:27

You might need to add a maven repo if that parent pom isn’t in maven central

martinklepsch14:06:33

The weird thing is that this works:

clj -Sdeps '{:deps {org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu {:mvn/version "1.4.1"}}}'

Alex Miller (Clojure team)14:06:50

we do have a known issue that repos defined in the pom don't get used and that may be the issue here

martinklepsch14:06:26

but then the above should also not work, right?

Alex Miller (Clojure team)14:06:05

the last example there is a different path and relies on the maven repo to resolve artifacts (https://clojure.atlassian.net/projects/TDEPS/issues/TDEPS-46 is the issue I'm thinking of)

Alex Miller (Clojure team)14:06:20

when you load a jar dep, tools.deps is reading the model and resolving the deps

Alex Miller (Clojure team)14:06:48

I think it's in the tools.deps pom reader where more needs to be done

martinklepsch09:06:02

I'm not sure if TDEPS-46 s whats going on here. Just let me know if you want a separate JIRA to document this failure case

Alex Miller (Clojure team)12:06:47

you could leave a comment on that ticket so it can be checked and spun out if needed

martinklepsch16:06:05

It seems I can no longer comment: could you give permission to <mailto:[email protected]|[email protected]>

dm311:06:35

are repository mirrors supported?

Alex Miller (Clojure team)12:06:51

I don't think so? I think that's still a todo

Alex Miller (Clojure team)12:06:37

yeah, that's not supported atm and I don't actually see a ticket for it, although that would be fine if you wanted to file one https://clojure.atlassian.net/servicedesk/customer/portal/1

Alex Whitt15:06:16

@dm3 I've got repository mirroring working, if we're talking about the same thing. My deps.edn config includes:

:mvn/repos {"central" {:url ""}}
And my ~/.m2/settings.xml: https://gist.github.com/WhittlesJr/3422e3374c0393188c1321bbd7605bd5 We're using Nexus 3 for our maven server ("my-mirror"). Caches everything and works like a charm.

Alex Whitt15:06:11

(I had to use http because I couldn't add a self-signed certificate to the java trust store in my particular case)

Alex Whitt15:06:02

I suppose that having all that config in settings.xml breaks repeatability though, so a pure tools.deps solution would be very nice indeed.

Alex Whitt15:06:46

(Er, maybe it is repeatable after it's all cached? Perhaps you could drop the settings.xml after that point and it would still download what it needed from "my-mirror." I'm not sure.)

Alex Miller (Clojure team)15:06:44

well that's not mirroring, that's just replacing the repo

Alex Miller (Clojure team)15:06:17

maven actually has support for mirrors (or maybe the term is different, I can't remember)

Alex Miller (Clojure team)15:06:39

mirrors being duplicate repos that can serve the same content

Alex Whitt16:06:27

Yeah I think I've seen the word "mirror" used for both meanings so I'm not sure what term to use. It is at least called "mirrors" in settings.xml (the <mirrors> section). On first request, Nexus will download and cache the needed artifacts from maven central or clojars, and then the client downloads everything from Nexus. Is that different from what you're talking about?

Alex Whitt16:06:40

I think I've also heard it called "proxying"

Alex Whitt16:06:14

But that's also confusing because "proxying" usually refers to using an http proxy

Alex Whitt16:06:37

Maybe what I'm doing is just one species of mirroring: http://maven.apache.org/guides/mini/guide-mirror-settings.html (third bullet point)

dm319:06:16

yeah, you’re overriding the repo

dm319:06:32

mirror is another layer