Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure Leiningen offline install

I'm working in a very restrictive environment, I cannot execute any curl or wget scripts like lein.sh/.bat, nor can I "git" the code. I have the leiningen-x.x.x-standalone.jar which does not make up a complete leiningen setup. How can I setup a complete leiningen, offline? is there something like a "complete" download? If not what are the essential parts? What is the required file system layout?

like image 720
eriq Avatar asked Feb 22 '12 16:02

eriq


People also ask

What is Clojure Leiningen?

Leiningen is a build automation and dependency management tool for the simple configuration of software projects written in the Clojure programming language.

How do I know if Leiningen is installed?

Check in your start menu whether there is a specific submenu/-item for starting a shell with Clojure in the path; if so, use that, otherwise just open a CMD, and enter lein repl to check if the REPL is loading correctly.


2 Answers

the "correct" approach for working with maven in a protected enterprise setting would be to setup a repo mirror, populate it with all the jars you need, and then add it to your ~/.m2/settings.xml file to mirror everything.

<settings>
  <mirrors>
    <mirror>
      <id>archiva.default</id>   
      <url>http://my.mirror.com:8080/archiva/repository/internal</url>
      <mirrorOf>*</mirrorOf>
    </mirror>
  </mirrors>
</settings>

this is a lot of work up front, though it can pay off in the long run because you can use the mirror internally for later projects (and to make downloads faster)

copying a working .m2 directory is a perfectly respectable hack as well

like image 181
Arthur Ulfeldt Avatar answered Nov 03 '22 09:11

Arthur Ulfeldt


Copying .m2 directory and the lein sh script should do the trick.

like image 3
Hamza Yerlikaya Avatar answered Nov 03 '22 11:11

Hamza Yerlikaya