Fork me on GitHub
#cursive
<
2023-11-24
>
Sean Swezey12:11:44

I can’t seem to get CLJ_JVM_OPTS or JAVA_OPTS to take affect for Deps resolution. I’m trying to set a local Maven settings file to use a per project mirror for internal code, but it doesn’t seem to work. The options are working with clojure from the command line, it’s just within Cursive that it can’t detect. I’ve tried both project-specific env vars and deps.clj env vars with: CLJ_JVM_OPTS=-Dorg.apache.maven.user-settings=.local/maven-settings.xml JAVA_OPTS=-Dorg.apache.maven.user-settings=.local/maven-settings.xml , but it still tries to query central. I’ve also tried setting the mirror with the private repo setting to the url, but that doesnt work either. I also have :mvn/local-repo set to .local/repository in the deps.edn. In the Maven settings, I’ve set the Mavens users setting file to .local/maven-settings.xml and the repository to .local/repository as well, but it still can’t get the settings. I’ve downloaded the file via clojure CLI, and upon refreshing, Cursive recognizes the dependencies, it just can’t download them if they aren’t in central it seems

cfleming20:11:06

Let me check this, there is a problem at the moment propagating the env vars to deps itself (they get to deps.clj just fine).

👍 1
Sean Swezey10:11:27

I just tried with EAP9 and it’s still an issue. I can see via Little Snitch that its reach out to maven instead of the mirror configured via the settings file and environment variables. Is there something else I can provide to help with the investigation?

Tobias Gerdin17:11:39

Remote debug REPL:s still does not seem to mentioned in the user guide but I found some discussion on the mailing lists that they should work providing you first start a "Remote JVM Debug" (with the appropriate flags copied to your remote JVM) and then start a remote REPL. I have done this but I still cannot seem to get breakpoints to trigger. I guess you cannot have a local debug REPL running an the same time, or that would make Cursive confused?

cfleming20:11:13

This should work, yes. It can be a bit flakey - what I find helps is to reload the namespace after placing breakpoints. Somehow the recompilation and generation of new classes seems to poke it to realise the breakpoint is in the right place.

Tobias Gerdin08:12:47

OK will try this

Tobias Gerdin17:11:57

Btw, was helped today by the custom macro form symbol resolution – awesome!

Tobias Gerdin17:11:25

(for next.jdbc/with-transaction)