On Tue, Jul 19, 2011 at 12:41 PM, John Casey <[email protected]> wrote:
> This has been a long time coming, and I apologize for the delay. I've been
> trying to clear enough time to work on some last touches to the
> implementation before writing this, to make sure the description agrees with
> the code.
>
> The code for this discussion is in the mirror-group-routing branch of
> maven3:
>
> https://svn.apache.org/repos/asf/maven/maven-3/branches/mirror-group-routing
>
> The goal of this branch is to create a mechanism by which the Maven
> repository can be fragmented, allowing artifact resolution to be routed to
> appropriate repository URLs based on groupId and canonical repository URL.
>
> The cornerstone of this mapping is the routes file, which will have a
> default copy hosted on Maven project infrastructure. The file format (for
> now) is JSON. Users will be free to create their own routes file and point
> Maven to that instead if they prefer. Alternatively, the routes file can be
> generated by a repository manager or really any application capable of
> hosting or generating the required JSON file.
>
> So, what's in this routes file? It has two sections: groupId ->
> canonical-URL mappings, and canonical-URL -> mirror-URL mappings. These
> sections are separate to allow generators to pass-through one set of
> mappings while augmenting or replacing the other...for example, a generator
> may not want to alter the groupId -> canonical-URL mappings, but will
> probably want to generate a custom canonical-URL -> mirror-URL* map.
>
> To begin with, each groupId can have a canonical repository URL attached to
> it in the routing table. This is meant to be the main Maven repository that
> hosts artifacts for that groupId. Many open-source projects will probably
> list something like:
>
> http://oss.sonatype.org/content/groups/public
>
> as the canonical URL for their groupId, since many open-source projects use
> Sonatype OSS to deploy their artifacts.
>
> Given a canonical repository URL for an artifact groupId, the routing table
> then matches this canonical URL up to one or more mirror URLs. In the
> example above, the default routing table JSON would probably specify
> something like (using very rough pseudo-JSON):
>
> "http://oss.sonatype.org/content/groups/public": [
>    { "id": "central", "url": "http://repo1.maven.org/maven2/"},
>    { "id": "ibiblio", "url":
> "http://mirrors.ibiblio.org/pub/mirrors/maven2/"; }
> ]

Can you explain a bit more about the canonical to mirror mapping?
Is the below correct?

e.g. lets pick two hypothetical projects: A and B.
routes:
"org.a" : "http://oss.sonatype.org/content/groups/public";
"org.b" : "http://oss.sonatype.org/content/groups/public";

How do I have a mirror that only hosts org.a content?

Maybe pictures would better explain what's going on, any chance you
can draw some scenarios up and put it on the wiki?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to