-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
412 lines (400 loc) · 13.6 KB
/
Copy pathpom.xml
File metadata and controls
412 lines (400 loc) · 13.6 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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<?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>io.github.dfa1.zstd</groupId>
<artifactId>zstd-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>zstd-parent</name>
<description>Java FFM (Foreign Function & Memory) bindings for zstd</description>
<url>https://github.com/dfa1/zstd-java</url>
<licenses>
<license>
<name>BSD 3-Clause License</name>
<url>https://opensource.org/license/bsd-3-clause</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>dfa1</id>
<name>Davide Angelocola</name>
<url>https://github.com/dfa1</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/dfa1/zstd-java.git</connection>
<developerConnection>scm:git:git@github.com:dfa1/zstd-java.git</developerConnection>
<url>https://github.com/dfa1/zstd-java</url>
<tag>HEAD</tag>
</scm>
<modules>
<module>native/osx-aarch64</module>
<module>native/osx-x86_64</module>
<module>native/linux-x86_64</module>
<module>native/linux-aarch64</module>
<module>native/windows-x86_64</module>
<module>native/windows-aarch64</module>
<module>zstd</module>
<module>zstd-platform</module>
<module>bom</module>
<module>integration-tests</module>
<module>benchmark</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>25</maven.compiler.release>
<central-publishing-plugin.version>0.11.0</central-publishing-plugin.version>
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
<!-- SonarCloud analysis (.github/workflows/sonar.yml). -->
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>dfa11</sonar.organization>
<sonar.projectKey>dfa1_zstd-java</sonar.projectKey>
<!-- The benchmark module is a JMH harness, not shipped runtime: its
@Setup/@TearDown lifecycle trips false "resource not closed" reports and
it has no tests by design. Exclude from analysis entirely (which also
keeps it out of the coverage ratio). -->
<sonar.exclusions>
**/benchmark/**
</sonar.exclusions>
<sonar.coverage.exclusions>
**/benchmark/**
</sonar.coverage.exclusions>
<!-- Coverage sources Sonar ingests:
1. per-module surefire (unit tests) — target/site/jacoco/jacoco.xml
2. integration-tests aggregate — report-aggregate there reads the IT
jacoco.exec and reports hits on the zstd classes it exercises, so the
library's integration coverage lands on Sonar too. -->
<sonar.coverage.jacoco.xmlReportPaths>
${project.build.directory}/site/jacoco/jacoco.xml,
${maven.multiModuleProjectDirectory}/integration-tests/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<!-- Default for the @{argLine} placeholder in the surefire config below.
JaCoCo's prepare-agent overwrites this property with the agent args when
the coverage profile is active; the empty default keeps surefire from
receiving a literal @{argLine} token when it is not. -->
<argLine />
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-platform</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-osx-aarch64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-linux-x86_64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-linux-aarch64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-osx-x86_64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-windows-x86_64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.dfa1.zstd</groupId>
<artifactId>zstd-native-windows-aarch64</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.7</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<release>25</release>
<failOnWarning>true</failOnWarning>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<release>25</release>
<failOnError>true</failOnError>
<failOnWarnings>true</failOnWarnings>
<quiet>true</quiet>
<!-- Don't cross-link to sibling reactor modules: the native/bom
modules have no Java sources, so link detection just creates
fake apidocs dirs and logs "Error fetching link". -->
<detectOfflineLinks>false</detectOfflineLinks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<configuration>
<!-- @{argLine} carries JaCoCo's agent when the coverage profile is
active (empty otherwise); the native-access flag is always on. -->
<argLine>@{argLine} --enable-native-access=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<configLocation>${maven.multiModuleProjectDirectory}/checkstyle.xml</configLocation>
<failsOnError>true</failsOnError>
<consoleOutput>true</consoleOutput>
<sourceDirectories>
<sourceDirectory>src/main/java</sourceDirectory>
<sourceDirectory>src/test/java</sourceDirectory>
</sourceDirectories>
<excludes>**/module-info.java</excludes>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>13.6.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<executions>
<!-- Resource-only native modules carry no Java sources. Attach
empty javadoc/sources jars (from non-existent dirs) so Maven
Central's "javadoc + sources required" validation passes. -->
<execution>
<id>empty-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<classesDirectory>${project.build.directory}/empty-javadoc</classesDirectory>
<forceCreation>true</forceCreation>
</configuration>
</execution>
<execution>
<id>empty-sources-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sources</classifier>
<classesDirectory>${project.build.directory}/empty-sources</classesDirectory>
<forceCreation>true</forceCreation>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>javadoc-no-warnings</id>
<phase>verify</phase>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Activated in CI for Sonar: ./mvnw verify -P coverage
Attaches the JaCoCo agent to surefire (via the @{argLine} placeholder)
and writes one target/site/jacoco/jacoco.xml per module. -->
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Cut a release with maven-release-plugin (configured in build above):
./mvnw release:prepare
drops -SNAPSHOT, commits, tags v<version> (pushChanges=false), then
bumps to the next snapshot. Push the commits and the tag; the v* tag
triggers .github/workflows/publish.yml, which runs
./mvnw deploy -Prelease
to sign and upload to Maven Central.
Prerequisites:
1. Register namespace io.github.dfa1 at central.sonatype.com.
2. A Central user token (Account / User Tokens); in CI it comes from
the CENTRAL_USERNAME / CENTRAL_PASSWORD secrets.
3. A published GPG key (GPG_PRIVATE_KEY / GPG_PASSPHRASE secrets). -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<excludeArtifacts>
<!-- Internal modules: not published to Maven Central.
Each entry is a groupId:artifactId string. -->
<artifact>io.github.dfa1.zstd:zstd-integration-tests</artifact>
<artifact>io.github.dfa1.zstd:zstd-benchmark</artifact>
</excludeArtifacts>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>