This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-04
Channels
- # announcements (5)
- # babashka (2)
- # beginners (53)
- # biff (11)
- # calva (5)
- # cider (4)
- # clojure (32)
- # clojure-austin (2)
- # clojure-dev (5)
- # clojure-europe (17)
- # clojure-norway (22)
- # clojurescript (23)
- # core-logic (1)
- # cryogen (1)
- # datomic (1)
- # dev-tooling (7)
- # emacs (6)
- # fulcro (63)
- # guix (1)
- # hyperfiddle (14)
- # integrant (2)
- # lsp (6)
- # missionary (4)
- # nbb (42)
- # overtone (9)
- # reitit (8)
- # specter (3)
- # sql (2)
- # squint (7)
- # tools-build (9)
I have a local Java/maven project, which produces e.g. foobar-1.0-SNAPSHOT.jar
(= bunch of .class
files) and foobar-1.0-SNAPSHOT-sources.jar
(= the original .java
sources). Can I somehow import this library in a Leiningen project such that the original java sources are available for clojure-lsp
(= "If the java source(`.java`) is available on classpath, clojure-lsp just return that file location.")? EDIT: solved.
If I just include the library in project.clj
, then clojure-lsp
will decompile the .class
files instead of displaying the originals.
ah, adding e.g. [com.acme/foobar "1.0-SNAPSHOT" :classifier "sources"]
to project.clj
adds the -sources.jar
to the classpath 💡
I didn't know about that! Good to know, it's something I wondered before as well :)
I don't have a deps.edn project at hand, but looking at the https://clojure.org/reference/deps_and_cli#_dependencies I guess something like com.acme/foobar$sources
might do the trick