is there a way to get clj
working on a machine without access to internet? specifically I'd want clj + project dependencies on a machine behind a very restrictive firewall. I'm able to transfer files to it, and when building I use uperdeps.
I know that with leiningen I could download a jar-file and a bat-file, then it didn't need access to internet. is it possible to do something like that with clj
?
@saikyun the installer just downloads a couple jar files and puts them on the filesystem, then puts a script in /bin/ to run that jar.
The void linux install script is the simplest version I know of, but others might have good examples too π https://github.com/SevereOverfl0w/void-packages/blob/master/srcpkgs/clojure/template#L15-L23
One idea might be to run the installer into a directory with the -p flag.
the target computer is on windows btw :x
@saikyun Alternative if you end up running into issues: with deps.clj it's just a matter of downloading the executable and placing the tools jar in ~/.deps.clj
(as documented here: https://github.com/borkdude/deps.clj/issues/20)
@borkdude thanks, something like that is what I wanted π what is the analogue to ~
on windows?
%USERPROFILE%
thanks
@saikyun Here is one user working around firewalls copying his .m2 deps with bb: https://twitter.com/MrGung1/status/1305906562746253315
cool, thanks
where do you get deps.exe
from?
Github releases: https://github.com/borkdude/deps.clj/releases
or install via scoop etc, but since you're having firewall issues, Github releases is probably the easiest
yeah, thanks a lot.
and it's enough for deps.exe
to be on PATH, right?
yes
also works from cmd.exe, no PS needed
okay, cool π
I'm getting this error now:
Error building classpath. Failed to read artifact descriptor for org.clojure:clojure:jar:1.10.1
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:ja
r:1.10.1
this is what prompted me to try to install tools.deps in an alternative way in the first place
I wonder if there's some old stuff lying around, trying to find tools.deps in the directory specified when I ran the .ps1 installation script...
probably there's something wrong with your .m2 stuffs?
oh, right, I guess I need to put clojure in the .m2 folder? (e.g. by using -p
...?)
tools.deps is going to the internets when the dep is not yet in .m2
okay, that makes sense
thanks for the example π
when running clj -P
, where do the dependencies end up? I'm looking in ~/.m2
but can't find clojure :S
I have clojure as an explicit dependency in deps.edn
as well
nvm, it was in .m2/org/clojure..
, not .m2/clojure...
got it all working by removing my local, existing .m2
, then ran clj -P
, then I copied my new local .m2
to the firewalled machine and now it works π
thanks a lot for the help
I think the .m2/repository is also configurable in deps.edn (can't remember it from the top of my head)
ahh, thanks for the tip! great to know π
Iβm setting up a dev environment on a pretty locked down production machine, so these things are invaluable
One issue I had while developing on a train is that I forgot to download deps for certain aliases
ah, good point. will keep that in mind
Yes, with :mvn/local-repo
which probably also works with -Sdeps? then that could be used for populating an ad hoc repo @saikyun
Yep
I use this for testing "clean cache" cases all the time
(without having to muck with my actual ~/.m2/repository)
Hi all! Does clojure take MAVEN_OPTS from environment variables? I canβt use keystore with clojure, but itβs work with mvn (directly)
@just.sultanov I just grepped the source of brew-install, homebrew-tools, and tools.deps.alpha and didn't see that var in any files so I would say "no".
It does handle ~/.m2/settings.xml
for Maven stuff tho' so maybe you could put credentials in there?
I need to use keystore.jks with self-signed corp certificates. I donβt have problems with credentials. Maven by default pick up settings from .mavenrc and MAVEN_OPTS, but I didnβt see any usages in sources of tools.deps
doesn't use it right now
you can log the request at https://ask.clojure.org