-
-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
Hi,
I am using WildFly 35 with Jakarta EE 10 and have defined a global module in standalone.xml like this:
<subsystem xmlns="urn:jboss:domain:ee:6.0">
<global-modules>
<module name="at.luxbau.lumin.configuration"/>
</global-modules>
</subsystem>
The module itself is this directory D:\AppServer\wildfly-35.0.1.Final\modules\at\luxbau\lumin\configuration\main with this module.xml:
<?xml version='1.0' encoding='UTF-8'?>
<module xmlns="urn:jboss:module:1.1" name="at.luxbau.lumin.configuration">
<resources>
<resource-root path="."/>
</resources>
</module>
The main directory contains a subfolder named properties where I have a file named my.properties which is read by my web application.
But using Classgraph like this does not list my properties file:
try (ScanResult scanResult = new ClassGraph().verbose().scan()) {
final var resources = scanResult.getAllResources();
System.out.println("resources.size=" + resources.size());
final var list = resources.stream()
.map(Resource::getPathRelativeToClasspathElement)
.filter(s -> s.contains(".properties"))
.collect(toList());
System.out.println("list.size=" + list.size());
list.forEach(this::print);
}
What's the correct way to use Classgraph to read my properties file?
It also does not work with WildFly 26 and Java EE 8.
Using library net.oneandone.reflections8 it wokrs, but the library is not maintained anymore and does not work with WildFly 35 for scanning classes.
Any hints welcome!
Regards, Rainer
Metadata
Metadata
Assignees
Labels
No labels