The Maven Project Info Reports Plugin can be used to generate a Project Dependencies report that lists all dependencies and also groups them by licenses.
The project-info-reports:dependencies goal can be used to generate an individual report but it should be used as a Maven report and is actually provided by default (see Configuring Reports) when generating the site for the project in the test
scope.
For an example, have a look at the Licenses of the Project Dependencies of the Maven Site Plugin.