Creating Junit report for multi-module java project

I have one bitbucket project of java and it had multiple modules and having one master pom.
I want to create/publish junit report using junit plugin for each of module under post section of declartive pipeline.

Please suggest me how to use loop concept or any method to get the output.

Thanks in advance.

I believe the Warning ng plugin is the way to go, you can find several examples in its documentation that are doing exactly what you are looking for, for instance warnings-ng-plugin/Documentation.md at 2435812c0af53b49279329ffb9771aa1a03abdd9 · jenkinsci/warnings-ng-plugin · GitHub