hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Russell <pauljamesruss...@gmail.com>
Subject Automatic depedency resolution
Date Fri, 11 Mar 2005 15:46:21 GMT
Hi guys,

Is anyone else interested in adding the ability to automatically
resolve non-existent module dependencies? If not, then the rest of
this e-mail probably doesn't apply! Be interested to hear your
thoughts though.

I mainly want to use this inside development tooling and environments
to resolve missing modules without the user having to explicitly
specify them all in the build path.

I wouldn't want HiveMind to know /how/ to get the dependancies, just
to provide the hooks for implementations that do. The sensible place
to put this hook would appear to be inside
RegistryInfrastructureConstructor.constructRegistryInfrastructure.

I did consider implementing this as a decorator around
'ModuleDescriptorProvider' that passes the call on to the original
provider, but then interrogates the ModuleDescriptors returned, and
augments the existing list with all the dependencies. However, since
you can have more than one ModuleDescriptorProvider, it would be a
little messy to attempt to resolve dependancies at this level.

As the interface for the hook, I would expect something like:

public interface DependencyResolver
{
    public ModuleDescriptor resolveDependency(String moduleID, String version);
}

People could then provide implementations of this interface to
'aquire' modules from whatever sources they feel are appropriate (a
corporate module database, maven repository, file store, whatever).

Either way, I would expect the RegistryBuilder to have a new
addDependencyResolver method to actually /enable/ automatic dependency
resolution.

Does this sound like something that the community at large is
interested in, or is it a bad idea? I already have a substantial chunk
of the code written, and am more than happy to contribute it as a
patch if you're interested (I already have a CLA etc, so there are no
problems there).

Cheers all: you/hivemind have made my life /way/ easier,


Paul

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


Mime
View raw message