Open
Description
Use a project like chen to populate the coursier cache
https://github.com/AppThreat/chen
Install scala and sbt using sdkman.
cd chen
sbt clean stage
It neatly stores per registry, which can be used to populate repository_url
in the purl.
~/.cache/coursier/v1/https/
drwxrwxr-x 3 prabhu prabhu 4096 Jul 10 2021 maven.atlassian.com
drwxrwxr-x 3 prabhu prabhu 4096 Aug 25 2022 nexus.bedatadriven.com
drwxrwxr-x 3 prabhu prabhu 4096 Aug 25 2022 oss.sonatype.org
drwxrwxr-x 3 prabhu prabhu 4096 Jul 19 13:20 packages.atlassian.com
drwxrwxr-x 3 prabhu prabhu 4096 Jul 5 2021 repo1.maven.org
drwxrwxr-x 3 prabhu prabhu 4096 Aug 25 2022 repo.gradle.org
drwxrwxr-x 3 prabhu prabhu 4096 Jul 5 2021 repo.scala-sbt.org
drwxrwxr-x 3 prabhu prabhu 4096 Aug 25 2022 repository.apache.org
drwxrwxr-x 3 prabhu prabhu 4096 Jul 5 2021 repo.typesafe.com
drwxrwxr-x 3 prabhu prabhu 4096 Jul 5 2021 shiftleft.jfrog.io
The rest of the logic is similar to collecting the jars with createJarBom
https://github.com/CycloneDX/cdxgen/blob/master/index.js#L5107