Fork me on GitHub
#tools-deps
<
2021-09-08
>
Eugen07:09:46

can find-versions also work for non jar artifacts? I tried to find the versions for a published zip and I get no results. Checked the source code and it's not supported. Maven is an artifact repositoy and in essence you can store whatever artifacts there. Most of them are jars, but they don't need to be. Also: can it work for classifiers as well ? Don't use them right now, I'm asking for completion sake.

Alex Miller (Clojure team)12:09:52

It is jar only, although you are conceptually correct

Alex Miller (Clojure team)12:09:54

It might work for classifiers, which we do support, can’t actually say that I thought about it. Did you try it?

Eugen12:09:40

I did not try with classifier since I don't use it now - I can probably find a dependency online that has classifier and try with that

Alex Miller (Clojure team)12:09:13

The syntax is group/artifact$classifier

Eugen07:09:22

does tools-deps take into account encrypted server passwords from settings-security.xml ? Browsed the code and I did not see any references so I imagine it does not.

Alex Miller (Clojure team)12:09:08

We use the Maven apis to access those, so not sure if we are getting that support or not. Probably not would be my guess

Eugen09:09:04

Is there a way I can get the latest version of an artifact ? I tried this but it does not work ( I get the older version)

:deps {com.my.group.example-artifact/load-test-data {:mvn/version "LATEST" :extension "zip"}}}}
This is perhaps related to find-versions . This is perhaps related to repository metadata refresh. The dependencies are available locally so it does not refresh them from upstream. Any way to force a metadata refresh via resolve-deps ?

Alex Miller (Clojure team)12:09:03

LATEST or RELEASE should resolve metadata

Alex Miller (Clojure team)12:09:28

I think it is subject to the once-per-day update policy though

Alex Miller (Clojure team)12:09:54

No ways to force that other than deleting repo metadata files from m2

Alex Miller (Clojure team)12:09:12

But that :extension is not a thing

Alex Miller (Clojure team)12:09:06

Tools.deps is not a generic interface to Maven, it’s a tool for building classpaths

delaguardo12:09:43

If I remember correctly updatePolicy can be configured per maven repository in pom.xml

delaguardo12:09:14

So maybe tools.deps could have a way to configure that in deps.esn

delaguardo12:09:27

Somewhere in :mvn/repos

Alex Miller (Clojure team)12:09:34

Has been requested, and I even wrote the code at one point, but I’m going to resist that for now

Alex Miller (Clojure team)12:09:11

It adds a lot of complexity to other assumptions in the code

ghadi12:09:43

plus LATEST or RELEASE are refs not values, yuck

Eugen12:09:24

@ghadi: that is life 🙂

ghadi12:09:04

my life is based on values 🙂

👍 2
4
😄 2
Eugen12:09:41

if find-versions works with :extension I can avoid using LATEST/RELEASE

Eugen12:09:58

I can fetch latest version and use it

Alex Miller (Clojure team)12:09:01

If you want to get non-jars, you’re going to have to tap into a much lower point in the implementation

Alex Miller (Clojure team)12:09:17

This is not part of the public api