Replies: 4 comments 2 replies
-
ClassGraph goes out of its way to try to find every scannable class in every classloader. I don't know what a deployment is in WildFly, but if it doesn't make any sense that classes in other deployments should be scannable, then we should change this behavior. Please look at the following classes, find the one that is matching your exact classloader, and try modifying it to find only your deployment. |
Beta Was this translation helpful? Give feedback.
-
If this is a genuine bug, I try to push bug fixes out within 24 hours. Please try modifying the class to fix the issue, and submit a pull request. Please make the minimal change you can to fix the issue, since a lot of people rely on ClassGraph in JBoss, and I don't want to break things for people. Are you confident that nobody else would ever want to scan classes in other deployments, either? |
Beta Was this translation helpful? Give feedback.
-
You can compile and install a local copy of ClassGraph by doing |
Beta Was this translation helpful? Give feedback.
-
Well I don't even k ow what a deployment is in JBoss, or how to replicate your issue. Please submit a complete minimal replication test case, and explain what you observe and what you expect. Then I can take a look. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I prepared WAR archive and I deployed it on Wildfly 21.
I want to find all classes annotated with
javax.ws.rs.ApplicationPath
annotation.It finds two classes, one from my deployment and one from other deployment. I undeployed other deployment to make sure that one class is taken from it and I am sure, if only one deployment is deployed on Wildfly then it return only one class.
I do not understand why ClassGraph finds classes from other deployment. How to configure ClassGraph to scan only deployment which ClassGraph itself belongs? I guess that I have to configure class loader, but I do not know how to do it correctly.
Beta Was this translation helpful? Give feedback.
All reactions