This could be a resurfacing of what was reported in NEXUS-20167, but it appears the changes cited in that jira were never actually merged.
1. Use UI upload to up a single jar with group id of com.example, artifact id example1 to maven-releases repo. Choose the option to automatically create a pom. This will result in 1 component, with 10 assets.
2. Again, use UI upload to up a single jar to maven-releases repo with group id of com.example, artifact id example2. Choose the option to automatically create a pom. This will result in 2 components total, with 10 assets each.
3. Create a cleanup policy with the following criteria:
Format Maven, Asset name matcher ".example2."
Confirm using preview this matches one component.
4. Assign your new cleanup policy to maven-releases.
5. Explicitly run the "Cleanup service" task.
6. Review the cleanup policy task log. It includes the following INFO log messages:
These statements are wrong. In actual fact only one maven component was cleaned up, which consisted of 10 individual assets.
The log messages in the cleanup service task log which report how many components are deleted are accurate, per format. In the example case it should have only indicated it cleaned up 1 component, not 10.
AC- Message should be specific about number of components and assets
ie There are 2 components with 6 and 4 assets respectively. The message should be that there are 10 assets deleted and 2 components deleted