Fork me on GitHub
#leiningen
<
2023-01-05
>
wombawomba13:01:07

How does leiningen figure out where the maven repo goes? I'm running in a container with an arbitrary uid/gid, and for some reason leiningen is trying to create the maven repo at $(pwd)/?/.m2/. How can I get it to put it at $HOME/.m2 instead?

wombawomba13:01:58

thanks! _JAVA_OPTIONS=-Duser.home=$HOME works

jumar13:01:47

If I remember, Java uses getpwuid library function instead of HOME so that's probably the underlying reason. https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/5f01925b80ed851b133ee26fbcb07026ac04149e/src/java.base/unix/native/libjava/java_props_md.c#L533

wombawomba13:01:26

classic Java 😉