Hello, I have a project deployed with wildfly21. I upgraded classgraph from 4.8.129 to 4.8.149 and put a test jar in the same directory as ant-1.10.11.jar in WEB-INF/lib.
It is found that classgraph will no longer display the jars under WEB-INF/lib, leaving only the jar packages under standalone/tmp/vfs/deployment, which is not an expected result.
for (Entry<String, ResourceList> dup :
new ClassGraph().verbose().scan()
.getAllResources()
.classFilesOnly()
.findDuplicatePaths()) {
System.out.println(dup.getKey());
for (Resource res : dup.getValue()) {
System.out.println(" -> " + res.getURI());
}
}
Here is the output under version 4.8.129, which has jars in both WEB-INF/lib and standalone/tmp/vfs/deployment directories.(The standalone/tmp/vfs/deployment directory will be generated when wildfly starts, and the duplicate classes in this directory are not what I need. I will remove it manually in later code.)
2022-08-11 15:55:30,651 INFO [stdout] (default task-1) org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:55:30,651 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/deployments/project.ear/project.war/WEB-INF/lib/ant-test.jar!/org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:55:30,651 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/deployments/project.ear/project.war/WEB-INF/lib/ant-1.10.11.jar!/org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:55:30,651 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/tmp/vfs/deployment/deployment3c10fbd71b13340a/ant-1.10.11.jar-3a7bfe1548c3a3e/ant-1.10.11.jar!/org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:55:30,652 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/tmp/vfs/deployment/deployment3c10fbd71b13340a/ant-test.jar-55a4bb8fdf420ca2/ant-test.jar!/org/apache/tools/ant/AntClassLoader.class
This is the output under version 4.8.149, it only has the jars under standalone/tmp/vfs/deployment.
2022-08-11 15:40:48,028 INFO [stdout] (default task-1) org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:40:48,028 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/tmp/vfs/deployment/deployment190ae1711ba8c466/ant-1.10.11.jar-edacd854758a48eb/ant-1.10.11.jar!/org/apache/tools/ant/AntClassLoader.class
2022-08-11 15:40:48,028 INFO [stdout] (default task-1) -> jar:file:/E:/wildfly-21.0.2.Final/standalone/tmp/vfs/deployment/deployment190ae1711ba8c466/ant-test.jar-be18d95f67ae544c/ant-test.jar!/org/apache/tools/ant/AntClassLoader.class
My project needs to display duplicate classes in jar under WEB-INF/lib.
Is this an issue? If not, is there any way to display the duplicate classes in the WEB-INF/lib directory?
P.S. I called ClassGraph#verbose(), but the project outputs 20,000 classgraph logs, so if there is a need, tell me the part you need, and I will intercept it and upload it.
Hello, I have a project deployed with wildfly21. I upgraded classgraph from 4.8.129 to 4.8.149 and put a test jar in the same directory as ant-1.10.11.jar in WEB-INF/lib.
It is found that classgraph will no longer display the jars under WEB-INF/lib, leaving only the jar packages under standalone/tmp/vfs/deployment, which is not an expected result.
Here is the output under version 4.8.129, which has jars in both WEB-INF/lib and standalone/tmp/vfs/deployment directories.(The standalone/tmp/vfs/deployment directory will be generated when wildfly starts, and the duplicate classes in this directory are not what I need. I will remove it manually in later code.)
This is the output under version 4.8.149, it only has the jars under standalone/tmp/vfs/deployment.
My project needs to display duplicate classes in jar under WEB-INF/lib.
Is this an issue? If not, is there any way to display the duplicate classes in the WEB-INF/lib directory?
P.S. I called
ClassGraph#verbose(), but the project outputs 20,000 classgraph logs, so if there is a need, tell me the part you need, and I will intercept it and upload it.