diff --git a/.gitlab/ci/configure_fedora39_java.cmake b/.gitlab/ci/configure_fedora39_java.cmake
index 396e019ee4417ac1808743db56b9dd4f61f8e030..cd05df2133d451e3bb9566351f3fd2d07c9ad638 100644
--- a/.gitlab/ci/configure_fedora39_java.cmake
+++ b/.gitlab/ci/configure_fedora39_java.cmake
@@ -13,3 +13,18 @@ set(VTK_MODULE_ENABLE_VTK_IOFides NO CACHE STRING "")
 
 set(JOGL_GLUE "$ENV{HOME}/.m2/repository/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar" CACHE FILEPATH "")
 set(JOGL_LIB  "$ENV{HOME}/.m2/repository/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar" CACHE FILEPATH "")
+
+# We need to set MAVEN_NATIVE_ARTIFACTS since this configuration is also used
+# by the java upload job.
+
+# Naming is <arch-platform-build_type> we avoid adding numbers in the arch
+# such as 64/86 since some maven versions fail to properly parse it.
+set(native_artifacts
+  darwin-amd-${cmake_build_type}
+  darwin-arm-${cmake_build_type}
+  linux-amd-${cmake_build_type}
+  windows-amd-${cmake_build_type}
+)
+set(MAVEN_NATIVE_ARTIFACTS "${native_artifacts}" CACHE STRING "" FORCE)
+unset(native_artifacts)
+unset(cmake_build_type)
diff --git a/.gitlab/ci/configure_options.cmake b/.gitlab/ci/configure_options.cmake
index b708b7e6233b1a8c481c411b0656020a1aa083aa..e22b63f60e0eff28f4128207400455e614a07435 100644
--- a/.gitlab/ci/configure_options.cmake
+++ b/.gitlab/ci/configure_options.cmake
@@ -49,20 +49,9 @@ configuration_flag(VTK_JAVA_INSTALL "java")
 if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "java")
   set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
   set(JOGL_VERSION "2.3.2" CACHE STRING "")
-
-  # Naming is <arch-platform-build_type> we avoid adding numbers in the arch
-  # such as 64/86 since some maven versions fail to properly parse it.
-  string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type)
-  set(native_artifacts
-    darwin-amd-${build_type}
-    darwin-arm-${build_type}
-    linux-amd-${build_type}
-    windows-amd-${build_type}
-  )
-  set(MAVEN_NATIVE_ARTIFACTS "${native_artifacts}" CACHE STRING "" FORCE)
-  unset(build_type)
-  unset(native_artifacts)
-
+  # Naming is <arch-platform> since some maven versions fail to properly parse
+  # the artifact name when numbers are trailing in the classifer name.
+  set(MAVEN_NATIVE_ARTIFACTS "darwin-amd;darwin-arm;linux-amd;windows-amd" CACHE STRING "" FORCE)
   set(MAVEN_VTK_ARTIFACT_SUFFIX "-java${VTK_JAVA_TARGET_VERSION}" CACHE STRING "")
   # Disable snapshots for tag releases and also when the env variable
   # VTK_JAVA_FORCE_RELEASE is defined through the Gitlab schedule pipeline UI.