Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
315 lines (306 loc) · 11 KB
/
Copy pathpom.xml
File metadata and controls
315 lines (306 loc) · 11 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<?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">
<groupId>io.github.tigerbrokers</groupId>
<version>2.7.0</version>
<modelVersion>4.0.0</modelVersion>
<artifactId>openapi-java-sdk</artifactId>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<protobuf.version>3.22.3</protobuf.version>
<!-- surefire 与 failsafe 用同一版本,避免两套 provider 行为不一致 -->
<surefire.version>3.2.5</surefire.version>
</properties>
<name>openapi-java-sdk</name>
<description>tiger open-api sdk in java version</description>
<licenses>
<license>
<name>The Apache Software License,Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>lijiawen</name>
<email>lijiawen@tigerbrokers.com</email>
<organization>tiger brokers technologies inc.</organization>
<organizationUrl>www.itiger.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/tigerbrokers/openapi-java-sdk.git</connection>
<developerConnection>scm:git:git@github.com:tigerbrokers/openapi-java-sdk.git</developerConnection>
<url>https://github.com/tigerbrokers/openapi-java-sdk</url>
</scm>
<url>https://github.com/tigerbrokers/openapi-java-sdk</url>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.49.Final</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.14.2</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>2.0.34.Final</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>io.github.tigerbrokers</groupId>
<artifactId>openapi-optionlib</artifactId>
<version>0.8.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.7.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<!--
测试分层:surefire 只跑 L1 单测,failsafe 跑 L2/L3 集成测试。
分层说明见 src/test/java/.../TestLayers.java
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<!-- 集成测试交给 failsafe,mvn test 不碰 -->
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<configuration>
<excludes>
<!-- protoc 生成,不手写不测 -->
<exclude>com/tigerbrokers/stock/openapi/client/socket/data/pb/**</exclude>
<exclude>**/*OuterClass*</exclude>
<!-- socket / 异步执行 / watcher 依赖 TCP 连接或运行时组件,
单测环境无法覆盖(实测 0%),排除以免拉低有效覆盖率;由集成测试覆盖。 -->
<exclude>com/tigerbrokers/stock/openapi/client/socket/**</exclude>
<!-- util/builder 中的无状态工厂类(AccountParamBuilder / HeaderBuilder /
QuoteParamBuilder 等)包含业务逻辑,应被单测覆盖,不整包排除。
仅排除依赖运行时 Netty 组件的类(目前无此类,占位备用)。 -->
<!-- <exclude>com/tigerbrokers/stock/openapi/client/util/builder/**</exclude> -->
<exclude>com/tigerbrokers/stock/openapi/client/util/watch/**</exclude>
<!-- websocket 中依赖 live TCP 的类才排除;纯数据类 / 静态工具类应覆盖。
仅排除真正需要 Netty Channel 的 Handler 类。 -->
<exclude>com/tigerbrokers/stock/openapi/client/websocket/WebSocketClient*</exclude>
<exclude>com/tigerbrokers/stock/openapi/client/websocket/WebSocketHandshaker*</exclude>
<exclude>com/tigerbrokers/stock/openapi/client/websocket/WebSocketStompFrame*</exclude>
<!-- 常量类与参数 DTO(纯字段,无业务逻辑) -->
<exclude>com/tigerbrokers/stock/openapi/client/constant/**</exclude>
<exclude>com/tigerbrokers/stock/openapi/client/struct/param/**</exclude>
<!-- 依赖 live API / Netty pipeline / scheduled executor / 网络 / Thread.sleep
的类,纯单测无法覆盖(需运行时组件或真实 API),由集成测试覆盖。 -->
<exclude>**/OptionCalcUtils*</exclude>
<exclude>**/ApiCallbackDecoderUtils*</exclude>
<exclude>**/NetworkUtil*</exclude>
<exclude>**/PageTokenUtil*</exclude>
<exclude>**/TokenManager*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
</protocArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>ossrh</publishingServerId>
<!-- 自动发布:上传->校验->发布,无需网页确认 -->
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.2</version>
</extension>
</extensions>
</build>
<profiles>
<!-- 禁用注释检查 -->
<profile>
<id>disable-javadoc-doclint</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
<!-- <distributionManagement>-->
<!-- <snapshotRepository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
<!-- </snapshotRepository>-->
<!-- <repository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>-->
<!-- </repository>-->
<!-- <snapshotRepository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://central.sonatype.com/repository/maven-snapshots</url>-->
<!-- </snapshotRepository>-->
<!-- <repository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>-->
<!-- </repository>-->
<!-- </distributionManagement>-->
</project>