Description
Describe the bug
When running the application on a test project located in codeanalyzer-java/src/test/resources/test-applications/plantsbywebsphere
, .class
files are not detected. This occurs because the file filtering logic excludes any paths containing test/resources/
, even when these directories contain valid project files.
Steps To Reproduce
- Place a Java project in
codeanalyzer-java/src/test/resources/test-applications/plantsbywebsphere
. - Run the application to analyze
.class
files. - Observe that no
.class
files are found in the log output.
Observed behavior
The application incorrectly filters out .class
files from the test project directory due to the absolute path containing test/resources/
. This results in zero application classes being detected and registered, even though the build is successful and .class
files are present.
Expected behavior
.class
files should only be excluded if they are located in test/resources/
directories within the specific project path, not if the project itself resides in a directory named test/resources/
.
Error Log
2025-02-07T21:58:40.366443234 [INFO] Finding *.class files in /home/rkrsn/workspace/codellm-devkit/codeanalyzer-java/src/test/resources/test-applications/plantsbywebsphere
2025-02-07T21:58:40.369674335 [DEBUG] Application class files: 0
2025-02-07T21:58:40.369726402 [INFO] Adding application classes to scope.
2025-02-07T21:58:42.055214269 [DONE] There were a total of 33844 classes of which 0 are application classes.
2025-02-07T21:58:42.070370877 [INFO] Registered 0 entrypoints.
Environment (please complete the following information):
- OS: Fedora Linux 41 (Workstation Edition)
- Version of Java: 21
- Version of Maven: N/A
- Version of Gradle: N/A
Additional context
The issue is likely due to applying filters based on absolute paths rather than paths relative to the provided project directory. This causes unintended exclusion of .class
files when the project resides under directories like test/resources/
.