purl-spec icon indicating copy to clipboard operation
purl-spec copied to clipboard

Default maven repository

Open prabhu opened this issue 1 year ago • 2 comments
trafficstars

The default maven repository got changed as per this issue.

While working on a PR, noticed that the Remote Repository reported by maven was https://repo1.maven.org/maven2/.

Am I correct in assuming that this repository MUST get added to the purl as repository_url as per the current specification?

Some examples:

pkg:maven/com.github.javaparser/[email protected]?type=jar&repository_url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F"

pkg:maven/org.codehaus.groovy/[email protected]?type=jar&repository_url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F"

pkg:maven/org.codehaus.groovy/[email protected]?type=jar&repository_url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F"

prabhu avatar May 02 '24 23:05 prabhu

A similar thing happened with Python in #250. It makes a mess because these repository URLs are supposed to be equivalent, but how are you supposed to know when building or comparing PURLs?

matt-phylum avatar May 03 '24 13:05 matt-phylum

The consumer of purls could maintain a database of aliases and perform the matching. I think the spec could have less opinion. For example, purl doesn't have to assume any default repository and allow tools to always form the full values including the repository url.

prabhu avatar May 03 '24 21:05 prabhu