leiningen

wombawomba 2023-01-05T13:45:07.861539Z

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?

jumar 2023-01-05T13:53:17.177649Z

Try to read this: https://github.com/carlossg/docker-maven/issues/78

wombawomba 2023-01-05T13:54:58.151529Z

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

jumar 2023-01-05T13:56:47.261089Z

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

wombawomba 2023-01-05T13:57:26.032979Z

classic Java 😉