Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
600 lines (562 loc) · 24 KB
/
Copy pathpom.xml
File metadata and controls
600 lines (562 loc) · 24 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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<?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.indextables</groupId>
<artifactId>tantivy4java</artifactId>
<version>0.34.4</version>
<packaging>jar</packaging>
<name>Tantivy4Java Experimental</name>
<description>Java bindings for Tantivy and Quickwit with experimental L2 disk cache</description>
<url>https://github.com/indextables/tantivy4java</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>tantivy4java</id>
<name>Tantivy4Java Contributors</name>
<url>https://github.com/indextables/tantivy4java</url>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/indextables/tantivy4java.git</connection>
<developerConnection>scm:git:ssh://github.com:indextables/tantivy4java.git</developerConnection>
<url>https://github.com/indextables/tantivy4java/tree/main</url>
</scm>
<distributionManagement>
<repository>
<id>central</id>
<url>https://central.sonatype.com/api/v1/publisher</url>
</repository>
</distributionManagement>
<properties>
<!-- <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target> -->
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.12.2</junit.version>
<rust.target.dir>${project.build.directory}/rust</rust.target.dir>
<!-- Empty by default; the jdk17plus profile sets this for Java 17+ -->
<surefire.argLine></surefire.argLine>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.22.0</version>
</dependency>
<!-- AWS SDK for S3 testing -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.43.0</version>
<scope>test</scope>
</dependency>
<!-- Azure Storage Blob -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.33.3</version>
<scope>test</scope>
</dependency>
<!-- Azure Identity for OAuth token authentication -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.18.2</version>
<scope>test</scope>
</dependency>
<!-- Azure Core - explicit version to ensure compatibility -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.57.1</version>
<scope>test</scope>
</dependency>
<!-- Testcontainers for Azurite emulator -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>2.0.5</version>
<scope>test</scope>
</dependency>
<!-- GCP Cloud Storage -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.67.0</version>
<scope>test</scope>
</dependency>
<!-- GCP NIO for LocalStorageHelper (pure Java, no Docker) -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-nio</artifactId>
<version>0.131.0</version>
<scope>test</scope>
</dependency>
<!-- Mockito for mocking Azure and other services -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<!-- Apache Iceberg Java SDK for creating test tables in REST catalog -->
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-core</artifactId>
<version>1.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-api</artifactId>
<version>1.10.1</version>
<scope>test</scope>
</dependency>
<!-- Adobe S3Mock for S3 testing -->
<dependency>
<groupId>io.findify</groupId>
<artifactId>s3mock_2.13</artifactId>
<version>0.2.6</version>
<scope>test</scope>
</dependency>
<!-- Scala library (required by S3Mock) -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<source>11</source>
<target>11</target>
<!-- Enable debug symbols for Java compilation -->
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<configuration>
<!-- Ensure sequential test class execution to prevent S3Mock port conflicts -->
<parallel>none</parallel>
<perCoreThreadCount>false</perCoreThreadCount>
<threadCount>1</threadCount>
<!-- Fork a new JVM for each test suite (test class) for complete isolation -->
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
<!-- Set test execution order to be predictable -->
<runOrder>filesystem</runOrder>
<!-- Exclude cloud/Docker integration tests by default.
Run with: mvn test -Pintegration-tests -->
<excludes>
<exclude>**/Real*Test.java</exclude>
<exclude>**/AzureIntegrationTest.java</exclude>
<exclude>**/AzureOAuthTokenTest.java</exclude>
</excludes>
<!-- Enable native access for JNI operations (Java 17+ only; see jdk17plus profile) -->
<argLine>${surefire.argLine}</argLine>
</configuration>
</plugin>
<!-- Native library build plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
<executions>
<!-- Run Rust unit tests before building (skip doctests) -->
<!-- Build release binary -->
<execution>
<id>build-rust</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cargo</executable>
<arguments>
<argument>build</argument>
<argument>--release</argument>
<argument>--target-dir</argument>
<argument>${rust.target.dir}</argument>
</arguments>
<workingDirectory>${project.basedir}/native</workingDirectory>
<environmentVariables>
<RUST_BACKTRACE>1</RUST_BACKTRACE>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy native library to resources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>copy-native-lib</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/native</outputDirectory>
<resources>
<resource>
<directory>${rust.target.dir}/release</directory>
<includes>
<include>libtantivy4java.so</include>
<include>libtantivy4java.dylib</include>
<include>tantivy4java.dll</include>
<include>tantivy4java-merge</include>
<include>tantivy4java-merge.exe</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- JAR packaging - creates both main JAR and platform-specific JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
<executions>
<!-- Create platform-specific JAR with classifier -->
<execution>
<id>platform-jar</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>${platform.classifier}</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Build profiles -->
<profiles>
<!-- Platform detection profiles - auto-activate based on OS -->
<!-- macOS ARM64 (Apple Silicon) -->
<profile>
<id>platform-darwin-aarch64</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>!platform.classifier</name>
</property>
</activation>
<properties>
<platform.classifier>darwin-aarch64</platform.classifier>
<rust.target>aarch64-apple-darwin</rust.target>
</properties>
</profile>
<!-- macOS x86_64 (Intel) -->
<profile>
<id>platform-darwin-x86_64</id>
<activation>
<os>
<family>mac</family>
<arch>x86_64</arch>
</os>
<property>
<name>!platform.classifier</name>
</property>
</activation>
<properties>
<platform.classifier>darwin-x86_64</platform.classifier>
<rust.target>x86_64-apple-darwin</rust.target>
</properties>
</profile>
<!-- Linux x86_64 -->
<profile>
<id>platform-linux-x86_64</id>
<activation>
<os>
<family>unix</family>
<name>linux</name>
<arch>amd64</arch>
</os>
<property>
<name>!platform.classifier</name>
</property>
</activation>
<properties>
<platform.classifier>linux-x86_64</platform.classifier>
<rust.target>x86_64-unknown-linux-gnu</rust.target>
</properties>
</profile>
<!-- Linux ARM64 -->
<profile>
<id>platform-linux-aarch64</id>
<activation>
<os>
<family>unix</family>
<name>linux</name>
<arch>aarch64</arch>
</os>
<property>
<name>!platform.classifier</name>
</property>
</activation>
<properties>
<platform.classifier>linux-aarch64</platform.classifier>
<rust.target>aarch64-unknown-linux-gnu</rust.target>
</properties>
</profile>
<!-- Windows x86_64 -->
<profile>
<id>platform-windows-x86_64</id>
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
<property>
<name>!platform.classifier</name>
</property>
</activation>
<properties>
<platform.classifier>windows-x86_64</platform.classifier>
<rust.target>x86_64-pc-windows-msvc</rust.target>
</properties>
</profile>
<!-- Linux optimized build profile - automatically activates on Linux -->
<profile>
<id>linux-optimized</id>
<activation>
<os>
<family>unix</family>
<name>linux</name>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-rust</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cargo</executable>
<arguments>
<argument>build</argument>
<argument>--release</argument>
<argument>--target-dir</argument>
<argument>${rust.target.dir}</argument>
</arguments>
<workingDirectory>${project.basedir}/native</workingDirectory>
<environmentVariables>
<!-- Optimize for x86_64 Linux -->
<RUSTFLAGS>-C target-cpu=x86-64</RUSTFLAGS>
<RUST_BACKTRACE>1</RUST_BACKTRACE>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Debug build profile - activate with -Pdebug -->
<profile>
<id>debug</id>
<properties>
<rust.target.dir>target</rust.target.dir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-rust-debug</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cargo</executable>
<arguments>
<argument>build</argument>
<!-- Use debug build instead of release -->
<argument>--target-dir</argument>
<argument>${rust.target.dir}</argument>
</arguments>
<workingDirectory>${project.basedir}/native</workingDirectory>
<environmentVariables>
<!-- Enable maximum debug information for panic tracking -->
<RUST_BACKTRACE>full</RUST_BACKTRACE>
<TANTIVY4JAVA_DEBUG>1</TANTIVY4JAVA_DEBUG>
<!-- Maximum debug info, no optimization, debug assertions -->
<RUSTFLAGS>-C debuginfo=2 -C opt-level=0 -C debug-assertions=on -C overflow-checks=on -C panic=unwind</RUSTFLAGS>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Maven Central release profile - activate with -Prelease -->
<profile>
<id>release</id>
<build>
<plugins>
<!-- Generate source JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Generate Javadoc JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<source>11</source>
<detectJavaApiLink>false</detectJavaApiLink>
<doclint>none</doclint>
</configuration>
</plugin>
<!-- GPG signing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Central Publishing Plugin -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Integration tests profile - includes cloud/Docker tests excluded by default.
Activate with: mvn test -Pintegration-tests -->
<profile>
<id>integration-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes combine.self="override" />
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Enable native access flag only on Java 17+ (flag does not exist on Java 11) -->
<profile>
<id>jdk17plus-native-access</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<surefire.argLine>--enable-native-access=ALL-UNNAMED</surefire.argLine>
</properties>
</profile>
</profiles>
</project>