From 7c605135c5328ae7c282b960dfd347aed81a02df Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sun, 13 Apr 2025 13:09:36 +0200 Subject: [PATCH] Some native image support but it still doesn't work because of JNR --- .../autoprotomap/integration-tests/pom.xml | 1 - dhfs-parent/objects/pom.xml | 1 - dhfs-parent/pom.xml | 20 +++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dhfs-parent/autoprotomap/integration-tests/pom.xml b/dhfs-parent/autoprotomap/integration-tests/pom.xml index dc15165c..620449c4 100644 --- a/dhfs-parent/autoprotomap/integration-tests/pom.xml +++ b/dhfs-parent/autoprotomap/integration-tests/pom.xml @@ -51,7 +51,6 @@ - build generate-code generate-code-tests diff --git a/dhfs-parent/objects/pom.xml b/dhfs-parent/objects/pom.xml index b11658fb..a5be9321 100644 --- a/dhfs-parent/objects/pom.xml +++ b/dhfs-parent/objects/pom.xml @@ -99,7 +99,6 @@ quarkus-plugin - build generate-code generate-code-tests diff --git a/dhfs-parent/pom.xml b/dhfs-parent/pom.xml index 880054d8..a5a31263 100644 --- a/dhfs-parent/pom.xml +++ b/dhfs-parent/pom.xml @@ -167,6 +167,26 @@ false true + + --add-exports java.base/sun.nio.ch=ALL-UNNAMED, + --add-exports java.base/jdk.internal.access=ALL-UNNAMED, + --add-opens=java.base/java.nio=ALL-UNNAMED, + --initialize-at-run-time=org.lmdbjava.ByteBufferProxy, + --initialize-at-run-time=jnr.ffi.util.ref.internal.Finalizer, + --initialize-at-run-time=jnr.ffi.util.ref.internal.Finalizer, + --initialize-at-run-time=com.kenai.jffi.internal.Cleaner, + --initialize-at-run-time=jnr.ffi.provider.jffi.TransientNativeMemory$Magazine, + --initialize-at-run-time=jnr.ffi.provider.jffi.TransientNativeMemory, + --initialize-at-run-time=jnr.ffi.util.ref.FinalizableReferenceQueue, + --initialize-at-run-time=jnr.ffi.provider.jffi.NativeFinalizer, + --initialize-at-run-time=jnr.ffi.provider.jffi.NativeFinalizer$SingletonHolder, + --initialize-at-run-time=com.usatiuk.dhfs.utils.RefcountedCloseable, + --initialize-at-run-time=com.usatiuk.dhfs.utils.DataLocker$Lock, + --initialize-at-run-time=com.usatiuk.objects.stores.LmdbObjectPersistentStore$LmdbKvIterator, + --initialize-at-run-time=com.usatiuk.objects.stores.LmdbObjectPersistentStore, + --initialize-at-run-time=com.usatiuk.dhfs.supportlib.UninitializedByteBuffer, + --initialize-at-run-time=com.google.protobuf.UnsafeUtil +