cd /alidata1/admin/za-themis

pkill -9 -f za-themis

#CATALINA_HOME=/root/za-tomcat
#CATALINA_BASE=/root/za-tomcat export JAVA_OPTS="-server -Xms2g -Xmx2g -XX:NewSize=1g -XX:MaxNewSize=1g
-XX:PermSize=512m -XX:MaxPermSize=512m
-XX:+UseConcMarkSweepGC
-XX:CMSFullGCsBeforeCompaction=5
-XX:+UseCMSCompactAtFullCollection
-XX:+CMSParallelRemarkEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-XX:+DisableExplicitGC
-XX:+UseCompressedOops
-XX:+DoEscapeAnalysis
-XX:MaxTenuringThreshold=10
-Dhsf.http.enable=true
-Dhsf.server.ip=10.253.104.74
-Dpandora.qos.port=8081
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=7092
-Djava.rmi.server.hostname=10.253.104.74
-javaagent:./jacoco-0.8.0/lib/jacocoagent.jar=includes=*,output=tcpserver,port=17297,address=10.253.104.74
-Dhsf.server.port=8082 -Dhsf.http.port=8083
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8184
-Dproject.name=za-themis
" ./bin/startup.sh tail ./logs/catalina.out

ant build.xml文件:

<?xml version="1.0"?>

-<project default="jacoco" xmlns:jacoco="antlib:org.jacoco.ant" name="PPAUTO">

<!--Jacoco的安装路径-->

<property name="jacocoantPath" value="./jacoco-0.8.0/lib/jacocoant.jar"/>

<!--最终生成.exec文件的路径,Jacoco就是根据这个文件生成最终的报告的-->

<property name="jacocoexecPath" value="./jacoco.exec"/>

<!--生成覆盖率报告的路径-->

<property name="reportfolderPath" value="./report/"/>

<!--远程tomcat服务的ip地址-->

<property name="server_ip" value="10.253.104.74"/>

<!--前面配置的远程tomcat服务打开的端口,要跟上面配置的一样-->

<property name="server_port" value="17297"/>

<!--za-themis.源代码路径-->

<property name="za-themispath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis/"/>

<property name="za-themisbizpath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-biz/"/>

<property name="za-themiscommonpath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-common/"/>

<property name="za-themisenginepath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-engine/"/>

<property name="za-themisdaopath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-dao/"/>

<!--za-themis.class文件路径-->

<property name="za-themisClasspath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis/target/classes/com/zhongan/themis"/>

<property name="za-themisbizClasspath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-biz/target/classes/com/zhongan/themis"/>

<property name="za-themiscommonClasspath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-common/target/classes/com/zhongan/themis"/>

<property name="za-themisdaoClasspath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-dao/target/classes/com/zhongan/themis"/>

<property name="za-themisengineClasspath" value="/root/.jenkins/workspace/za-qa-jacocoThemis/za-themis-engine/target/classes/com/zhongan/themis"/>

<!--让ant知道去哪儿找Jacoco-->

-<taskdef resource="org/jacoco/ant/antlib.xml" uri="antlib:org.jacoco.ant">

<classpath path="${jacocoantPath}"/>

</taskdef>

<!--dump任务: 根据前面配置的ip地址,和端口号, 访问目标tomcat服务,并生成.exec文件。-->

-<target name="dump">

<jacoco:dump append="true" port="${server_port}" destfile="${jacocoexecPath}" reset="false" address="${server_ip}"/>

</target>

<!--jacoco任务: 根据前面配置的源代码路径和.class文件路径, 根据dump后,生成的.exec文件,生成最终的html覆盖率报告。-->

-<target name="report">

<delete dir="${reportfolderPath}"/>

<mkdir dir="${reportfolderPath}"/>

-<jacoco:report>

-<executiondata>

<file file="${jacocoexecPath}"/>

</executiondata>

-<structure name="JaCoCo Report">

-<group name="za-themis">

-<classfiles>

<fileset dir="${za-themisClasspath}"/>

</classfiles>

-<sourcefiles encoding="utf-8">

<fileset dir="${za-themispath}"/>

</sourcefiles>

</group>

-<group name="za-themis-biz">

-<classfiles>

<fileset dir="${za-themisbizClasspath}"/>

</classfiles>

-<sourcefiles encoding="utf-8">

<fileset dir="${za-themisbizpath}"/>

</sourcefiles>

</group>

-<group name="za-themis-common">

-<classfiles>

<fileset dir="${za-themiscommonClasspath}"/>

</classfiles>

-<sourcefiles encoding="utf-8">

<fileset dir="${za-themiscommonpath}"/>

</sourcefiles>

</group>

-<group name="za-themis-engine">

-<classfiles>

<fileset dir="${za-themisengineClasspath}"/>

</classfiles>

-<sourcefiles encoding="utf-8">

<fileset dir="${za-themisenginepath}"/>

</sourcefiles>

</group>

-<group name="za-themis-dao">

-<classfiles>

<fileset dir="${za-themisdaoClasspath}"/>

</classfiles>

-<sourcefiles encoding="utf-8">

<fileset dir="${za-themisdaopath}"/>

</sourcefiles>

</group>

</structure>

<html encoding="utf-8" destdir="${reportfolderPath}"/>

</jacoco:report>

</target>

</project>

最新文章

  1. [LeetCode] Jump Game II 跳跃游戏之二
  2. struts2获取web元素(request、session、application)
  3. tshark (wireshark)笔记
  4. Tomcat Connector三种运行模式
  5. C#中自定义消息,与MFc对比
  6. SVN管理规范
  7. HDU 5879 Cure
  8. 20 Valid Parentheses(匹配括号)
  9. 【设计模式:单例模式】使用单例模式加载properties文件
  10. Spring源代码解析 ---- 循环依赖
  11. CodeForces 617A Elephant
  12. Spring框架---IOC装配Bean
  13. js的DOM操作
  14. 2T以上的盘怎么分区, 利用parted创建 linuxTB硬盘GPT分区
  15. [LeetCode] To Lower Case 转为小写
  16. jar 包启动脚本
  17. Linux git 在自己的服务器上建立 git 仓库(repository)
  18. 串口USB单一映射及重命名
  19. SpringBoot中关于@Enable***的注解详解
  20. DC-DC Controllers Use Average-Current-Mode Control for Infotainment Applications-3939

热门文章

  1. [BZOJ5287][HNOI2018]毒瘤(虚树DP)
  2. 保存全局Crash报告
  3. Codeforces Round #352 (Div. 2) B. Different is Good 水题
  4. 关于List Map Set的线程安全的问题
  5. High Voltage Boost Supply
  6. 订阅Linux内核邮件列表
  7. mysql 源代码编绎
  8. P2P通信原理与实现(C++)
  9. C++回调函数(callback)的使用
  10. jQuery 二级菜单,一次显示一个小类 鼠标点击显示小类