I'm looking for a tool that given a maven pom.xml file tells me all the licenses that are used by the dependencies (and recursively their dependencies). Does such a thing exist?
Ideally it would tell me:
Removing Duplicate Dependencies Once we have identified our duplicate dependencies, the simplest way to remove them is to delete them from pom. xml and keep only those unique dependencies that are used by our project.
you can use mvn dependency:tree command to find duplicate dependencies into your project. Use the <exclusions> tag into <dependency> tag of the pom to exclude that duplicate dependencies from maven project. Save this answer.
artifactId is the name of the jar without version. If you created it, then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar, you have to take the name of the jar as it's distributed.
Analyze dependenciesFrom the main menu, select Code | Analyze Code | Dependencies. Alternatively, if you want to analyze a specific item, right-click it in the Project tool window and select Analyze | Analyze Dependencies. In the dialog that opens, specify the scope of files that you want to analyze.
mvn project-info-reports:dependencies
then in target/site/dependencies.html you should see a pretty nice list of all your dependencies.
This is really taken from @Carsten, but I felt it was worth a full answer.
Did you have a look at the maven-dependency-plugin?
In the report it does not only list all the (transitive) dependencies, but also groups them by licenses, as you can see in its own report.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With