I am looking for a way to automatically collect all the third-party library licences that my project is using. Currently I am collecting by hand the licences on github.
So far , I don't have a clear idea how to get a 3rd party library licence automatically. What is the most reliable way to get the 3rd party licence ?
Small ideas :
Most Github projects contain a licence text. ex : https://github.com/square/dagger . But can you map a dependency 'com.squareup.dagger:dagger:1.2.2' with its github url ?
most JVM artifacts are found on mvnrepository . I don't know if mvnrepository.com list the licence.
the .jar files may contain licence text . How to extract it ?
Related : What is the best practice for arranging third-party library licenses "paperwork"?