Home  >  Article  >  Java  >  How to deploy and use the jacoco server in the springboot project

How to deploy and use the jacoco server in the springboot project

王林
王林forward
2023-05-14 16:55:141351browse

1. First, you must install the java environment and ant environment on the server (Baidu has them)

2. On the jacoco official website (I downloaded jacoco-0.8.8-20211214.101659-25.zip, After downloading, unzip it on the server. The unzipped folder looks like this:) Download

How to deploy and use the jacoco server in the springboot project

3. There are two jar packages in the lib folder that will be used below. , jacocoagent.jar and jacocoant.jar

How to deploy and use the jacoco server in the springboot project

4. Then the key point is to write a build.xml. Just create a new file yourself and put it on the server. I will put the path At the same level as ant

build.xml, many people on the Internet do not fully post their own

How to deploy and use the jacoco server in the springboot project

How to deploy and use the jacoco server in the springboot project

How to deploy and use the jacoco server in the springboot project

##5. You're done, then execute ant -f build.xml, and then receive the response build successful and the execution is successful

6. Go to the report address configured in your buid.xml to check your Report

How to deploy and use the jacoco server in the springboot project

#7. Download this file and open index.html. It is your report. Of course, you have to call your service to have data. Ha~

How to deploy and use the jacoco server in the springboot project

The above is the detailed content of How to deploy and use the jacoco server in the springboot project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete