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
随机推荐
- 记一次ios下h5页面图片显示问题
刚入职公司时做了一个移动端图片预览的组件,之前也有业务组用过,没发现什么问题,但是这次有两个很诡异的问题. 一个是老数据的图不显示,另一个是图片点击预览只显示一部分加载不全.之所以诡异是所有设备都没问 ...
- 编译x86_64 Linux内核并基于QEMU运行
编译并运行内核镜像 安装包准备 $ sudo apt install git $ sudo apt install build-essential kernel-package fakeroot li ...
- Java:Java控制台输出保存进文件
前言 实现在控制台输出.并且把输出保存进文件 实现 您要在两个流中写入数据,请尝试使用OutputStream中的TeeOutputStream对象. 一.在maven的pom文件中引入jar包. & ...
- 传统mvc platform与前后端分离项目smart 共用域名nginx配置
#server { # listen 80; # server_name 139.129.100.155 rjhaasz.cn; # rewrite ^(.*)$ https://$host$1 pe ...
- 如何用jmeter监控内存,CPU(1)
要jmeter的运行环境配置好就可以: 打开这个小工具的步骤很简单,如果你已经配置好了Jmeter运行的环境,那么你也就不用去做其他的配置,直接 点击:开始-->运行-->输入cmd--& ...
- tcp三次握手四次挥手----转
序列号seq:占4个字节,用来标记数据段的顺序,TCP把连接中发送的所有数据字节都编上一个序号,第一个字节的编号由本地随机产生:给字节编上序号后,就给每一个报文段指派一个序号:序列号seq就是这个报文 ...
- Python报错“UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)”的解决办法
最近在用Python处理中文字符串时,报出了如下错误: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ...
- HTTP 2.0标准针对HTTP 1.X的五点改进
HTTP 2.0兼容HTTP 1.X,同时大大提升了Web性能,进一步减少了网络延迟,减少了前端方面的工作.HTTP 1.X存在的缺点如下: 1)HTTP 1.0一次只允许在一个TCP连接上发起一个请 ...
- 二、从GitHub浏览Prism示例代码的方式入门WPF下的Prism之Modules的几种加载方式
这一篇梳理Prism中07示例Module的几种加载方式. 07示例分为了5个,有5种不同的Module加载方式. 我们开始学习加载Modules 观察07-Modules-Appconfig示例 分 ...
- C语言枚举类型
在实际编程中,有些数据的取值往往是有限的,只能是非常少量的整数,并且最好为每个值都取一个名字,以方便在后续代码中使用,比如一个星期只有七天,一年只有十二个月,一个班每周有六门课程等.以每周七天为例,我 ...