This is an automated email from the ASF dual-hosted git repository.

mawiesne pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/main by this push:
     new c58b4da61 GH-1499: Update ClassGraph to 5.0.0 (#1500)
c58b4da61 is described below

commit c58b4da615d815c39d929c5eb262e6c85555c9eb
Author: Richard Zowalla <[email protected]>
AuthorDate: Sun Oct 18 17:04:56 2026 +0200

    GH-1499: Update ClassGraph to 5.0.0 (#1500)
---
 .github/dependabot.yml                                              | 6 ++++++
 .../java/opennlp/tools/models/classgraph/ClassgraphModelFinder.java | 3 ++-
 pom.xml                                                             | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index c5b15611f..108ce5a15 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -28,6 +28,9 @@ updates:
         update-types: [ "version-update:semver-minor", 
"version-update:semver-patch" ]
       - dependency-name: "io.github.classgraph:*"
         update-types: [ "version-update:semver-minor" ]
+      # ClassGraph 6 requires Java 25.
+      - dependency-name: "io.github.classgraph:*"
+        versions: [ ">= 6" ]
 
   - package-ecosystem: "github-actions"
     directory: "/"
@@ -49,6 +52,9 @@ updates:
         update-types: [ "version-update:semver-minor", 
"version-update:semver-patch" ]
       - dependency-name: "io.github.classgraph:*"
         update-types: [ "version-update:semver-minor" ]
+      # ClassGraph 6 requires Java 25.
+      - dependency-name: "io.github.classgraph:*"
+        versions: [ ">= 6" ]
 
   - package-ecosystem: "github-actions"
     directory: "/"
diff --git 
a/opennlp-core/opennlp-model-resolver/src/main/java/opennlp/tools/models/classgraph/ClassgraphModelFinder.java
 
b/opennlp-core/opennlp-model-resolver/src/main/java/opennlp/tools/models/classgraph/ClassgraphModelFinder.java
index 7d9ca8695..6b14a5973 100644
--- 
a/opennlp-core/opennlp-model-resolver/src/main/java/opennlp/tools/models/classgraph/ClassgraphModelFinder.java
+++ 
b/opennlp-core/opennlp-model-resolver/src/main/java/opennlp/tools/models/classgraph/ClassgraphModelFinder.java
@@ -70,7 +70,8 @@ public class ClassgraphModelFinder extends 
AbstractClassPathModelFinder implemen
    */
   @Override
   protected Object getContext() {
-    return new 
ClassGraph().acceptJars(getJarModelPrefix()).disableDirScanning().scan();
+    return new ClassGraph().enableClasspath().acceptJars(getJarModelPrefix())
+        .disableDirScanning().scan();
   }
 
   /**
diff --git a/pom.xml b/pom.xml
index d2691ca98..e92a03fd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -267,7 +267,7 @@
                <slf4j.version>2.0.20</slf4j.version>
                <log4j2.version>2.26.1</log4j2.version>
                <logcaptor.version>2.12.7</logcaptor.version>
-               <classgraph.version>4.8.197</classgraph.version>
+               <classgraph.version>5.0.0</classgraph.version>
                <zlibsvm.version>3.0.0</zlibsvm.version>
                <jmh.version>1.37</jmh.version>
 

Reply via email to