This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-24
Channels
- # aleph (13)
- # announcements (3)
- # beginners (134)
- # calva (9)
- # clojure (33)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-norway (42)
- # clojure-uk (7)
- # clojurescript (43)
- # core-async (7)
- # core-typed (2)
- # cursive (32)
- # datomic (19)
- # fulcro (5)
- # gratitude (4)
- # hyperfiddle (26)
- # introduce-yourself (1)
- # jobs-discuss (15)
- # lsp (3)
- # malli (20)
- # off-topic (18)
- # overtone (3)
- # polylith (24)
- # squint (22)
- # xtdb (21)
For the life of me, I can’t figure out how to update IntelliJ’s maven version database — or for that matter, confirm that Clojars is being catalogued. I remember there being some screen where you could see all the maven repositories, and update them — but I don’t think I’ve been able to find it in the past 1.5 years! Can anyone tell me where this is, and how to refresh all the maven artifact versions? (All the versions it knows about are super old.) Here’s a screenshot of where I thought this all lived — but even if this is the screen, how do you download all the new versions? THANK YOU!!! 🙏
Hi @U6VPZS1EK, it’s actually under Settings | Build, Execution, Deployment | Build Tools | Maven | Repositories. There, you can select the repos you want to update and click “Update” on the right-hand side. It take a while for Maven central though! Although it will happen in the background.
Holy cow — I read that IntelliJ manual page 5-10 times, and I never navigated to the right place.
At first, I saw a blank page for repos, with only local .m2 directory. (See screenshot #1).
I finally figured out what all those maven pom.xml files are for — that’s apparently where all the repo information is stored per project, not a global setting in IntelliJ.
I made a new one using clj -Spom
, and then added it to the project, And now screenshot #2 shows all the repos from the pom.xml file.
Hooray! Thank you, @U0567Q30W!
Note for Google and other searchers (and future me) — this is how to get IntelliJ to know which maven artifact repositories to scan, which will help it suggest updated versions.
(Now I understand what all those pesky pom.xml
files are for, which @U04V70XH6’s clj-new program generates — I always wondered about that!)
Hang on, I’m confused - why are you generating pom files? Are you managing your project using deps?
For sure — using deps.edn for everything now. But I didn’t have any maven repos listed except ~/.m2.
That’s definitely your problem then, the deps support should add those repos without needing a pom file.
I use clj-new (which also generates a pom file, if I recall correctly). (The real answer, I suppose: I copy the project directory, and rename them 😂)
@U08BJGV6E that’s bad, then, you definitely should.
FWIW, I used to see maven and clojars — but it mysteriously disappeared sometime in last 1.5 years. I know because I used to get messages like “do you want to update your maven repos?” (Memorable, because I used to see them on airplane wifi, and anguish about not being able to do the update then. 🙂
@U6VPZS1EK Once you have the project generated via clj-new, how do you get it into IntelliJ? Something like this? https://cursive-ide.com/userguide/deps.html#quick-project-import
Ok, it looks like that might have broken recently, then. I know it must have been recently, since I’m updating my doc at the moment and those popups definitely appeared in recent versions.
Holy cow, @U0567Q30W — I’ve never used Quick Import before! I’ve always done this: https://cursive-ide.com/userguide/deps.html#import-an-existing-deps-project (Usually because I’ve gotten in habit of having one IntelliJ project with multiple deps.edn files, which show up as multiple modules…)
Yeah, if you have multiple deps.edn files, then the full import process is generally a better bet. Although, if you have a root project which transitively refers to the others (e.g. using :local/root) then they’ll all be pulled in automatically.
@U08BJGV6E Interesting, I’ll have to try that, I’ve not used it.
So indeed, I just created a new deps project, and those repos are not present. I’ll file a bug for that and get it fixed in the next build.
@U0567Q30W tools -> create command line launcher
There have been some changes in both the Clojure CLI and deps.clj recently, which might have caused that, or it might be a bug in Cursive itself (shocking, I know).
Is there any functionality for dep.edn projects to highlight older versions of dependencies, like this? https://www.jetbrains.com/guide/java/tutorials/managing-dependencies/update-dependencies/
So, not right now. Cursive did actually integrate with Package Search, but then JetBrains had some internal conflict over it, rewrote it entirely and broke it out from IntelliJ itself. I’ve got the details for the new version but haven’t got around to re-doing the support for it yet. But I definitely want to do it soon, it’s super nice when it works.
It’s now a plugin you have to install separately, which is a little annoying, it seems like something that would be nice to have there by default.
Ah, it’s another one of those “so, I’m not crazy and misremembering things” moments! I thought I had some vague recollection of being able to do this in lein or deps.edn — whew! 😂 (I may just make the pom.xml files and use IntelliJ functionality — gosh, it does make it so easy to do!) PS: was just thinking about emailing you one of these days, to ask for a tour of what it’s like working inside of IntelliJ — I saw a video of a JetBrains engineer who mentioned that there’s some parts of IntelliJ that’s over 20 years old. Over the years, I know you’ve mentioned many stories of things breaking internally — sounds… inconvenient at times. 🙂