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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4