diff --git a/java/.gitignore b/java/.gitignore
index 2e98aff7ba..6f4eb283a3 100644
--- a/java/.gitignore
+++ b/java/.gitignore
@@ -1,5 +1,6 @@
*.iml
hs_err*.log
+cufile.log
target/
jextract-22/
openjdk-22-jextract*
diff --git a/java/cuvs-java/pom.xml b/java/cuvs-java/pom.xml
index d4d7708a80..b8e969d07b 100644
--- a/java/cuvs-java/pom.xml
+++ b/java/cuvs-java/pom.xml
@@ -183,6 +183,9 @@ SPDX-License-Identifier: Apache-2.0
1
--enable-native-access=com.nvidia.cuvs
+
+ ${project.build.directory}/cufile.log
+
diff --git a/java/cuvs-lucene/pom.xml b/java/cuvs-lucene/pom.xml
index 48dc6d7889..cf7628137e 100644
--- a/java/cuvs-lucene/pom.xml
+++ b/java/cuvs-lucene/pom.xml
@@ -194,6 +194,9 @@ SPDX-License-Identifier: Apache-2.0
${project.basedir}/src/main/resources/logging.properties
+
+ ${project.build.directory}/cufile.log
+