On Tue, Aug 11, 2020 at 3:01 PM 'bed...@yahoo.com' via Clojure <
clojure@googlegroups.com> wrote:

> Here's some maven-specific discussion:
> https://stackoverflow.com/questions/793054/maven-classpath-order-issue.
> They have a defined order since 2.0.9. and declaration order is considered
> for transitive dependencies conflict.
>

Unfortunately, neither that 11 year old SO answer nor the referenced jiras
actually document, explain, or refer to any documentation about the
ordering, or afaict commit to anything specific other than reproducibility.
I'm not saying this is your fault or anything, just does not seem well
defined to me other than as an artifact of implementation.

For libs, Maven (and I presume lein which relies on Maven libs for this)
uses the ordering of deps in the pom wrt the ordering in the classpath. clj
intentionally does not include this ordering - the libs are in an unordered
map, the version selection algorithm is completely different, etc. If this
matters, then one of your deps is broken and should be fixed.


> Intellij's Dependencies tab in Module settings: You can re-order the
> dependencies and they reflect in the classpath.
>

Not sure that has anything to do with Maven or lein, seems orthogonal to
the question here.


>
> lein classpath -> local paths added first, JARs afterwards
>
> Please consider returning to a :paths first, then :deps in a stable order.
>

I will consider some options.


>
> I know it is not pretty and it is not desirable for code to be dependent
> on that, but resource-loading uses the CLASSPATH and that makes the order
> of dependencies intrinsically linked to locating resources.
>

> I'd also rather fighweel-main behave differently, but it relies on
> (io/resource "public/index.html")
>

I think that is perfectly ok - the problem here is whether a jar includes
that resource, which is likely to conflict. I'd be very interested to know
whether this is actually a jar or an issue with the ordering of your local
paths. To check where it's finding index.html:

clj -e "((requiring-resolve 'clojure.java.io/resource)
\"public/index.html\")"

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAOdgdgz88M5jfbSOb2yTkehh3b32uQ6rh0bqa44T7J7hnP7LBQ%40mail.gmail.com.

Reply via email to