Run Clojure Script with External Dependencies without leiningen
The normal way of deploy clojure files is using leiningen. But if we have no leiningen, or the script is small and unnecessary to pack as a leiningen project, we can build a "bare" clojure script in the following way.
Get the dependency jar files, 2 options:
i. download the jar file directly;
i. if the dependency project provide the dependency as leiningen dependency items in porject.clj (for example, "[org.clojure/data.json "0.2.3"]" in data.json), you can build the leiningen project following Parse Sonarqube Data via Web API in Clojure , then copy the denpendency jar files from the ~/.m2/repository folder;
Build srcipt: get-sonar-data.clj
(require '[clojure.data.json :as json])
(def url "http://10.0.2.74:9000/api/resources?resource=ESB:com.boco.esb.analysismgr.service.impl&metrics=classes")
(def data (json/read-str (slurp url)))
(println ((first data) "name"))
(println ((first ((first data) "msr")) "val"))
Run script: java -cp './*:.' clojure.main get-sonar-data.clj
Run Clojure Script with External Dependencies without leiningen的更多相关文章
- VC中Source Files, Header Files, Resource Files,External Dependencies的区别
VC中Source Files, Header Files, Resource Files,External Dependencies的区别 区别: Source Files 放源文件(.c..cpp ...
- npm link & run npm script
npm link & run npm script https://blog.csdn.net/juhaotian/article/details/78672390 npm link命令可以将 ...
- Run bash script as daemon
linux - Run bash script as daemon - Stack Overflow https://stackoverflow.com/questions/19233529/run- ...
- The fileSyncDll.ps1 is not digitally signed. You cannot run this script on the current system.
https://www.opentechguides.com/how-to/article/powershell/105/powershel-security-error.html Unblockin ...
- C语言&C++ 中External dependencies
参考:https://blog.csdn.net/yyyzlf/article/details/4419593 External Dependencies是说你没有把这个文件加入到这个工程中,但是 ...
- 建立Clojure开发环境-使用IDEA和Leiningen
OS: Mac OS X 10.10 IDEA 14.0.2 Community Edition 安装Leiningen 按照http://leiningen.org/的指南安装lein 阅读Lein ...
- csharp:SMO run sql script
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Clojure 开发环境 light table 和 Leiningen 安装指引
1 首先下载 Light table 然后 解压到到一文件夹.目录中千万不能有空格 下载地址 http://www.lighttable.com/ 2下载构建工具 下载地址 http://leinin ...
- Run QTP script wiht host in HPQC
随机推荐
- css 小细节
1.div 设置background-image 图片,显示不全问题:background-size:100% 100%;
- POJ 2002 二分 计算几何
根据正方形对角的两顶点求另外两个顶点公式: x2 = (x1+x3-y3+y1)/2; y2 = (x3-x1+y1+y3)/2; x4= (x1+x3+y3-y1)/2; y4 = (-x3+x1+ ...
- AcWing 342. 道路与航线
#include<bits/stdc++.h> using namespace std; const int N=2e5+5; int h[N],cnt,to[N],nxt[N],vis[ ...
- 为什么socket是三次握手挥手却是四次
为知笔记地址: https://794e611d.wiz03.com/wapp/pages/view/share/s/1VjC4t215AfJ2knVCX1yXcay1HkR1O0_L4CF2w2CR ...
- Python 脚本退出
return:在定义函数时从函数中返回一个函数的返回值,终止函数的执行. os._exit(),sys.exit(),exit(),quit()都能够退出当前执行脚本,差别在于os._exit()直接 ...
- ESP32-简单OTA升级
基于ESP-IDF4.1 1 #include "freertos/FreeRTOS.h" 2 #include "freertos/task.h" 3 #in ...
- gitlab部署及汉化
目录 Git 简介 部署 1. 配置yum源(推荐) 2. 安装 配置GitLab 1.加载配置 2.修改git默认访问端口 gitlab.rb unicorn.rb gitlab-http.conf ...
- Oracle_RAC共享存储
<<ASM.sh>> 第2-3步可以使用"附件ASM.sh"脚本执行 此操作说明,此操作在2个节点都执行(可以复制) 编辑/etc/scsi_id.conf ...
- homestead
前言 之前写过一篇文章(https://www.jianshu.com/p/5f30280a3c18),说不需要这玩意儿一样可以开发.是的,但是对于团队来说,使用统一的环境.开发工具.编码规范等,对于 ...
- ACM金牌选手算法讲解《线性表》
哈喽,大家好,我是编程熊,双非逆袭选手,字节跳动.旷视科技前员工,ACM亚洲区域赛金牌,保研985研究生,分享算法与数据结构.计算机学习经验,帮助大家进大厂~ 公众号:『编程熊』 文章首发于: ACM ...