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.

  1. 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;

  2. 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"))

  3. Run script: java -cp './*:.' clojure.main get-sonar-data.clj

最新文章

  1. adobe premiere pro cc2015.0已停止工作 解决办法
  2. Open Xml 读取Excel中的图片
  3. unity3d 射弹基础案例代码分析
  4. iOS键盘监听的通知
  5. MySQL_杭州北仓 12.3-12.7需求活动期间累计下单达到3天及以上的客户_20161212
  6. 无线客户端框架设计(2):项目结构的设计(iOS篇)
  7. ffmpeg视频格式转换(Java)
  8. php 去除数组中重复元素
  9. HNU13377:Book Club 二分图
  10. 解码美国传奇网络券商:TradeStation
  11. 修饰器模式(day04)
  12. Qt学习--部件深入--烤猪蹄
  13. 用curl自动登录HTTPS站点
  14. ubuntu PHP相关操作
  15. div和span标签
  16. Javascript面向对象编程:非构造函数的继承
  17. C# 简单的 Job 作业~
  18. 第1节 常用DOS(磁盘操作系统)命令
  19. 跟我学SharePoint 2013视频培训课程——什么是SharePoint 2013(1)
  20. Jquery函数大全 - 案例说明

热门文章

  1. Python小白的数学建模课-B5. 新冠疫情 SEIR模型
  2. SonarQube 概述与安装
  3. MVC 与 三层架构
  4. buu 简单注册器
  5. Android单元测试问题解决
  6. C语言:缓冲区
  7. 求数组的子数组之和的最大值III(循环数组)
  8. Redux-基本概念
  9. windows 查看端口号,关闭端口进程
  10. 7.27考试总结(NOIP模拟25)[random·string·queue]