diff --git a/builder/pom.xml b/builder/pom.xml
index d529718..9342c8a 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -32,7 +32,7 @@
2.21.0
3.11.0
0.6.0
- 3.1.15
+ 4.1.2
3.0.0
${project.version}
@@ -66,9 +66,9 @@
${conditional.version}
- io.github.lukehutch
- fast-classpath-scanner
- ${fast-classpath-scanner.version}
+ io.github.classgraph
+ classgraph
+ ${classgraph.version}
org.mockito
diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java
index f193f1b..232b08e 100644
--- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java
+++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java
@@ -21,7 +21,7 @@
package net.kemitix.checkstyle.ruleset.builder;
-import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
+import io.github.classgraph.ClassGraph;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -38,9 +38,11 @@ public class DefaultPackageScanner implements PackageScanner {
@Override
public final List apply(final RuleSource ruleSource) {
final String basePackage = ruleSource.getBasePackage();
- return new FastClasspathScanner(basePackage)
+ return new ClassGraph()
+ .whitelistPackages(basePackage)
.scan()
- .getNamesOfAllStandardClasses()
+ .getAllStandardClasses()
+ .getNames()
.stream()
.filter(packageName -> packageName.startsWith(basePackage))
.collect(Collectors.toList());