简体   繁体   English

Clojure Leiningen离线安装

[英]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. 我在一个非常严格的环境中工作,我不能执行任何curl或wget脚本,如lein.sh/.bat,也不能“git”代码。 I have the leiningen-xxx-standalone.jar which does not make up a complete leiningen setup. 我有leiningen-xxx-standalone.jar,它不构成一个完整的leiningen设置。 How can I setup a complete leiningen, offline? 如何设置完整的leiningen,离线? is there something like a "complete" download? 有没有类似“完整”的下载? If not what are the essential parts? 如果没有什么是必不可少的部分? What is the required file system layout? 什么是所需的文件系统布局?

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. 在受保护的企业环境中使用maven的“正确”方法是设置一个repo镜像,用你需要的所有jar填充它,然后将它添加到〜/ .m2 / settings.xml文件中以镜像所有内容。

<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 复制一个工作的.m2目录也是一个非常值得尊敬的黑客

复制.m2目录和lein sh脚本应该可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM