The Archive Entry Search <https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-ArchiveEntrySearch%28ClassSearch%29> REST API can be used for searching for license files inside archives. Artifactory indexes by default the content various types of archives. The types of indexed archive files can be found in /<ARTIFACTORY_HOME>/etc/mimetypes.xml/. For example the following request will look for all files starting with LICENSE within indexed archives:
curl -uadmin:password http://localhost:8081/artifactory/api/search/archive?name=LICENSE* An example result for this query would be: {{ "entry" : "./LICENSE.txt", "archiveUris" : [ "http://localhost:8081/artifactory/api/storage/jcenter-cache/junit/junit/4.7/junit-4.7.jar" ] }} Based on the result you can download the license file content and analyze it, for example: http://localhost:8081/artifactory/jcenter-cache/junit/junit/4.7/junit-4.7.jar!LICENSE.txt As a side note, I can say that this is an interesting use case and we are thinking about ways to support it in our future roadmap. -- View this message in context: http://forums.jfrog.org/Best-practice-for-extracting-license-text-from-artifacts-tp7580680p7580681.html Sent from the Artifactory - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Artifactory-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/artifactory-users
