ARTIFACTORY: Artifact count mismatch in Xray's indexed resource repository and storage summary of that repository
This article talks about the count mismatch of the indexed resource repository in Xray and the storage summary of that repository in Artifactory. When enabling the indexing of the local repositories in Xray and looking over at the storage summary in Artfactory, there is a chance that the artifact count is more in storage summary and it shows fewer artifacts when the same repository is indexed in Xray.
This is expected behavior because Xray will index and scan only those files with extensions mentioned in the "archive_extensions.json" under <JFrog_Home>/xray/var/etc/server location.
For example, a Maven build was built and deployed the Maven packages in the libs-snapshot-local repository.
The below screenshot tells us that the libs-snapshot-local repository has 70 files in it, which indeed it has including XMLs, POMs, JARs, and WARs.
Indexed the libs-snapshot-local repository in Xray and could observe the count decreased to 34,
This is expected because Xray does not index and scan pom and XML files and just indexes and scans the war and jar files. We can confirm this by reviewing the "archive_extensions.json" under <JFrog_Home>/xray/var/etc/server location.
# cat archive_extensions.json
{
"ver":"1.0",
"archiveExtension": [
{
"name": "zip",
"namePattern": ".*[.](jar|war|ear|hpi|epk|cpa)$"
},
{
"name": "tar",
"namePattern": ".*[.](tar.gz|tar.xz|tgz)$"
},
{
"name": "7z",
"namePattern": ".*[.](7z)$"
}
]
}