-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathpom.xml
More file actions
425 lines (393 loc) · 18.8 KB
/
Copy pathpom.xml
File metadata and controls
425 lines (393 loc) · 18.8 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
pdf_oxide Java binding — Maven POM
===================================
groupId: fyi.oxide (matches the pdf.oxide.fyi brand;
reverse-DNS for Maven Central
namespace verification under oxide.fyi)
artifactId: pdf-oxide (the Maven artifact; matches the
package fyi.oxide.pdf)
version: 0.3.77 (lockstep with Cargo workspace /
js/package.json / .csproj /
pyproject.toml — release-preflight
from v0.3.51 #515 enforces parity)
JDK floor: 11 LTS (broadest enterprise reach; matches
the Polars/Lance/RocksDB precedent.
FFM API + Java 22+ is a future opt-in
variant artifact, not the default.)
Publishing: Central Portal (post-OSSRH, June 2025) via
central-publishing-maven-plugin 0.9.0 with
autoPublish=true — the release gate fires at PR-merge,
same as PyPI / npm / crates.io / RubyGems / NuGet.
Plan: docs/releases/plans/v0.3.53/ (gitignored workspace)
-->
<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>fyi.oxide</groupId>
<artifactId>pdf-oxide</artifactId>
<version>0.3.77</version>
<packaging>jar</packaging>
<name>pdf_oxide — Java binding</name>
<description>
The fastest PDF library for Java: text extraction, markdown
conversion, PAdES B-T/B-LT signing, destructive redaction,
PDF/A·X·UA compliance. Native JNI on the same Rust core
Python/Go/JS/C# users get — 0.8 ms mean per document on a
3,830-PDF corpus, 100% pass rate on valid PDFs. MIT licensed.
</description>
<url>https://pdf.oxide.fyi</url>
<licenses>
<license>
<name>MIT</name>
<url>https://github.com/yfedoseev/pdf_oxide/blob/main/LICENSE-MIT</url>
<distribution>repo</distribution>
</license>
<license>
<name>Apache-2.0</name>
<url>https://github.com/yfedoseev/pdf_oxide/blob/main/LICENSE-APACHE</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>yfedoseev</id>
<name>Yury Fedoseev</name>
<email>yfedoseev@gmail.com</email>
<url>https://github.com/yfedoseev</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/yfedoseev/pdf_oxide.git</connection>
<developerConnection>scm:git:git@github.com:yfedoseev/pdf_oxide.git</developerConnection>
<url>https://github.com/yfedoseev/pdf_oxide</url>
<tag>v0.3.77</tag>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/yfedoseev/pdf_oxide/issues</url>
</issueManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- JDK 11 floor — broadest enterprise reach. Records and
sealed classes (Java 14/17) are deferred until the floor
can move; value types ship as final classes with manual
equals/hashCode/toString (drop-in record replacement is
non-breaking when the floor moves). -->
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Native cdylib path the test JVM loads. Defaults to the
Linux `.so` produced by a workspace-root cargo build;
CI on macOS / Windows overrides via `-Dfyi.oxide.pdf.lib.path=...`
at the mvn command line. Declaring as a property here
lets the CLI `-D` actually override surefire's
<systemPropertyVariables> (which otherwise hardcodes
whatever value is written there). -->
<fyi.oxide.pdf.lib.path>${project.basedir}/../target/release/libpdf_oxide_jni.so</fyi.oxide.pdf.lib.path>
<!-- Plugin versions, pinned for reproducible builds. -->
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
<maven.javadoc.plugin.version>3.10.1</maven.javadoc.plugin.version>
<maven.surefire.plugin.version>3.5.1</maven.surefire.plugin.version>
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
<central.publishing.plugin.version>0.9.0</central.publishing.plugin.version>
<!-- Code-quality gates (parity with the other bindings:
rustfmt+clippy / gofmt+golangci / biome / dotnet-format /
ruff). Spotless = formatter (palantir-java-format),
SpotBugs = static bug analysis. -->
<spotless.plugin.version>2.43.0</spotless.plugin.version>
<palantir.java.format.version>2.50.0</palantir.java.format.version>
<spotbugs.plugin.version>4.8.6.4</spotbugs.plugin.version>
<rust.maven.plugin.version>1.4.0</rust.maven.plugin.version>
<!-- Dependency versions. -->
<jspecify.version>1.0.0</jspecify.version>
<slf4j.version>2.0.16</slf4j.version>
<junit.version>5.11.3</junit.version>
<assertj.version>3.26.3</assertj.version>
</properties>
<dependencies>
<!-- JSpecify nullable annotations. Compile-time only — does
not add to the runtime classpath. Matches the api-design.md
convention: @Nullable on optional fields, not Optional<>. -->
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
</dependency>
<!-- SLF4J API for diagnostic logging from NativeLoader and
optional warnings (e.g. OCR-models-not-found graceful
fallback). Users pick the binding (logback, log4j2, …);
no transitive binding bundled. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Minimal JSON parser for AutoExtractor.extractDocument /
extractPage typed AutoResult unmarshalling. Used internally
only; for users who want raw JSON the
extractDocumentJson() / extractPageJson() escape hatch lets
them parse with their preferred library. org.json:json is
~80KB, public-domain-equivalent, and widely available. -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20240303</version>
</dependency>
<!-- Test dependencies. -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<!-- Native libraries land here via the rust-maven-plugin
(build profile) or via CI artifact download (release
profile). Resource path is /fyi/oxide/pdf/native/{OS}/{ARCH}/
per the native-loader contract in
docs/releases/plans/v0.3.53/00-common-foundation.md §3. -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>fyi/oxide/pdf/native/**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<failOnWarning>false</failOnWarning>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<!-- Automatic-Module-Name for JPMS users
on JDK 9+ until we ship a full
module-info.java (deferred — floor is 11). -->
<Automatic-Module-Name>fyi.oxide.pdf</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<!-- Fork mode for native-heavy tests: a SIGSEGV
in one test class must not take down the whole
JUnit run. The Native loader's UUID extraction
is multi-classloader-safe per snappy-java
pattern, so reuseForks=false is safe. -->
<forkCount>2</forkCount>
<reuseForks>false</reuseForks>
<systemPropertyVariables>
<!-- Tests bypass JAR resource extraction and
load the locally-built cdylib directly.
Value comes from the
<fyi.oxide.pdf.lib.path> project property
above — CI overrides it per-OS via
`mvn ... -Dfyi.oxide.pdf.lib.path=...`. -->
<fyi.oxide.pdf.lib.path>${fyi.oxide.pdf.lib.path}</fyi.oxide.pdf.lib.path>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<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>
<configuration>
<source>11</source>
<!-- doclint loose during v0.3.53; tighten in
follow-up issues as Javadoc lands per
feature-NNN-java-binding.md T19. -->
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Formatting gate. `mvn spotless:check` verifies, `mvn
spotless:apply` fixes. palantir-java-format is a modern,
lambda-friendly 120-col formatter. NOTE: it uses javac
internals, so on JDK 16+ the Maven JVM needs the
add-exports flags in java/.mvn/jvm.config. -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat>
<version>${palantir.java.format.version}</version>
</palantirJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
<!-- Static bug analysis gate (null derefs, resource leaks,
etc.) — `mvn spotbugs:check`. Bytecode-based, so it runs
after compile and needs no native lib. -->
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<configuration>
<effort>Max</effort>
<threshold>Medium</threshold>
<includeTests>false</includeTests>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- Profile: dev
For local development on a single arch. Invokes Cargo
via questdb/rust-maven-plugin, builds the JNI cdylib in
release mode, copies it into src/main/resources/fyi/oxide/
pdf/native/{OS}/{ARCH}/ before package phase. -->
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.questdb</groupId>
<artifactId>rust-maven-plugin</artifactId>
<version>${rust.maven.plugin.version}</version>
<executions>
<execution>
<id>cargo-build</id>
<phase>process-resources</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<path>../pdf_oxide_jni</path>
<release>true</release>
<features>
<feature>full</feature>
</features>
<copyTo>${project.build.outputDirectory}/fyi/oxide/pdf/native</copyTo>
<copyWithPlatformDir>true</copyWithPlatformDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile: release
For CI / Maven Central publish. Assumes natives are
pre-built and staged into src/main/resources/fyi/oxide/
pdf/native/{OS}/{ARCH}/ by the GitHub Actions job
(per feature-NNN-java-binding.md T21). GPG-signs all
artifacts; uploads to Central Portal via the central-
publishing-maven-plugin with autoPublish=true (release
gate fires at PR-merge, in line with other registries). -->
<profile>
<id>release</id>
<build>
<plugins>
<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>
<!-- CI-friendly: read the passphrase
from the environment, no TTY. -->
<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>
<!-- Auto-promote to Maven Central without
UI step. The release gate already
happens at the PR-merge step, matching
the other 9 registries. -->
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>