You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add explicit isDirectory flag to buildinfo.xml schema for robust artifact detection
Replaces path-based heuristics with an explicit boolean flag to determine
if a cached artifact is a directory (e.g., target/classes) or regular file.
Changes:
- build-cache-build.mdo: Added isDirectory field to Artifact class
- CacheControllerImpl.java:
* artifactDto(): Set isDirectory=true for directory artifacts
* restoreArtifactToDisk(): Use artifact.isIsDirectory() instead of path heuristics
Benefits:
- More robust: Works with any custom packaging type or path structure
- More maintainable: Single source of truth instead of maintaining heuristic rules
- Backward compatible: Missing flag defaults to false (regular file)
- Cleaner code: Replaced 10 lines of path-checking logic with 1-line boolean check
Example buildinfo.xml output:
<artifact>
...
<filePath>target/classes</filePath>
<isDirectory>true</isDirectory>
</artifact>
All tests passing: 74 unit tests + 26 integration tests
0 commit comments