You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by John Casey <jd...@commonjava.org> on 2003/05/06 23:20:36 UTC

[PROPOSAL] maven dependency registries & repositories

I've been thinking of how to solve the centralized dependency server
problem, and I think I've come up with a solution which balances the
goals of minimal complexity, minimal retrofit effort, and maximal
flexibility.  Please feel free to let me have it if this makes no sense,
or if I've missed the boat.

Basically, I envision adding a <domainId> element to the dependency
definition, with a default domainId of 'legacy' implied.  This allows
for a namespacing of sorts for different spheres of influence with
respect to project naming, maintenance, etc.  

Once this is complete, we would create a series of registries of maven
dependency repositories.  Each registry would contain two files:
repositories.properties and affiliates.properties.  The
repositories.properties file will essentially just provide a list of
pointers of the format

<domainId>=http://<hosting-server-URL-for-maven-repository>

For instance, in my case it would look something like this:

org.commonjava=http://www.commonjava.org/maven-repo

This would be a single entry in the repositories.properties file. The
affiliates.properties file would list a series of entries of the format

<referral-priority>=<other-registry-URL>

For instance, if my registry was affiliated with a sourceforge registry:

1=http://www.sf.net/projects/maven-registry

Again, this is a single entry into the affiliates.properties file.


When a user downloaded a maven release, the default settings would
contain default-repositories.properties and
default-affiliates.properties files, which would point to the new maven
dependency registry (in affiliates.properties) and the legacy repository
(in repositories.properties).  Additional registry entries could be
supported by specifying their URL in a list much the way
'maven.repo.remote' is specified today.  At runtime, a copy of the
repositories.properties and affiliates.properties files would be cached
in the ${maven.home.local}/registries directory for registry fault
tolerance.

Finally, a property called 'maven.registry.referral.maxdepth' could be
set to specify that only a maximum of N affiliate referrals can be
traversed in search of dependencies.

This method of registering a domain for project development allows
registry maintainers to control their "endorsed" list of projects.  In
addition, the central maintenance issue is resolved since the maven
registry is only a pointer to a set of project sites, which are
controlled by the project administrators themselves.

On top of this infrastructure, it would be trivial to implement a plugin
which would traverse the configured registries and repositories they
point to, and compile a comprehensive list of cascaded dependencies for
a given project, using the POM for each dependency.  It would also be
easy to allow a 'dynamic mode' where maven performs this
resolution/download at runtime.

Let me know what you all think of this...


-- 
John Casey <jd...@commonjava.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org