Fork me on GitHub

I see strings like this in some data about projects/artifacts available from "scm:git:<git://>" This looks like a URI to me, but at least in the official IANA list of "schemes" that appear before the first colon character I found here: it lists "git" as a scheme, but not "scm". Is "scm" some new/unofficial URI scheme, or something else?


Wiki says that the URI format is scheme:[//authority]path[?query][#fragment], where scheme is "a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus (+), period (.), or hyphen (-)". If so, the thing with scm:git:git://... is not a URI.


Unless git:git://... is the path component, hmm.


Yeah, there is one example on the URI Wikipedia page showing a path with colons in it. That wasn't clear to me from the text on the Wikipedia page that was supposed to be allowed, but I don't necessarily take the Wikipedia page as the authoritative source for this, either.


Just out of curiosity - can you give a link to a Clojars page that uses such (maybe)URIs?


It is this auto-generated data file: described on the next page I link, among others available:


I am pretty sure I have seen the scm:... thing in some internal git config files before, too.


Ah, I grep'd and found occurrences in several pom.xml files on my system.


So perhaps that syntax is some Maven-specific thing, rather than a standard of any kind.


Found some Maven docs describing them here:


Wiki is just easier to parse sometimes. :) The RFC that defines the URI format also has some examples, including urn:example:animal:ferret:nose, where the part after the first : is indeed the path component. Ah, nice. Seems like it's pretty normal to use unregistered schemas:


Not sure whether that is considered a URI with an unregistered schema, or just some Maven-internal detail that prepends strings to a URI


FWIW, they themselves call it a URL: And it doesn't contradict the format, so why not.


Why doesn't it contradict the format? i.e. which part is the scheme, which part the path, etc.?


For example, if the syntax diagram on the Wikipedia page for URIs is correct/complete (I have no idea if it is), then it has '//' in exactly one place, which would imply that in the string "scm:git:<git://>" the scheme is "scm:git:git", which would make parsing very ambiguous for schemes if they can contain colon characters.