-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
116 lines (107 loc) · 4.87 KB
/
pom.xml
File metadata and controls
116 lines (107 loc) · 4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.tsfile</groupId>
<artifactId>java-tsfile-api-test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- tsfile依赖 -->
<dependency>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<version>2.2.1-SNAPSHOT</version>
</dependency>
<!-- testng依赖 -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.7.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 可以生成一个HTML格式的测试报告,显示测试结果的详细信息 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- Maven 编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
</plugin>
<!-- Build Helper 插件,用于向 Maven 项目添加额外的源码目录 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<!-- 这里我们将 code/src 目录添加为额外的源码目录,使其中的代码也能被编译和处理 -->
<sources>
<source>code/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- JaCoCo 代码覆盖率插件,用于生成代码覆盖率报告 -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<configuration>
<!-- 指定 jacoco.exec 数据文件的位置 -->
<dataFile>target/jacoco.exec</dataFile>
<!-- 指定生成报告的输出目录 -->
<outputDirectory>target/jacoco-report</outputDirectory>
</configuration>
<executions>
<!-- prepare-agent 目标会在测试阶段初始化 JaCoCo agent -->
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- report 目标会在测试完成后生成覆盖率报告 -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- 指定数据文件位置 -->
<dataFile>target/jacoco.exec</dataFile>
<!-- 指定报告输出目录 -->
<outputDirectory>target/jacoco-report</outputDirectory>
<!-- 指定要包含在报告中的类,这里只包含 org/apache/tsfile 包下的所有类 -->
<includes>
<include>org/apache/tsfile/**/*</include>
</includes>
<!-- 排除 src/main/java 目录编译出的类文件 -->
<excludes>
<exclude>examples/**</exclude>
<exclude>utils/**</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>