incubator-depot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus M. May" <>
Subject Re: News from the Avalon front?
Date Thu, 18 Mar 2004 15:37:21 GMT
so you are storing a .meta file for each component and in this file you 
basically describe the dependencies and some other stuff like the used 
factory and the criterias used to initialize the factory?

Right now we are just storing the dependencies for each project 
(component?) in an xml-file. Is the Meta-file just a .properties file or 
could it be a .xml-file as well?

Like I said, we are storing the dependencies in an .xml-file and also we 
are using a kind of directory structure for the definition of the 
domain, etc. Basically right now we are supporting two kinds of 
1) Maven-like repos (
2) Flat file structure (local, ...)

Here is the question, if Apache Repository decides on a different 
structure. It is clear that we need probably more meta-data and that we 
should use therefor another .meta file. This is not decided yet, but we 
are pretty open on this one. Right now, nearly no information from the 
project/component (like dependencies) are stored on the server. This 
information is only stored in the project specific file basically on the 
client (like maven does).

I definitly like the idea of Avalon Repository concerning the Factory 
loading as well as the classloading stuff.



J Aaron Farr wrote:
> Hello Nicola.
> Stephen may have some other points to add, but I wanted to chime in. :)
> Quoting Nicola Ken Barozzi <>:
>>>       - automated factory and criteria management (maybe)
>>please expand on this
> The Avalon-Repository project provides an API for not only loading repository
> artifacts and creating a classloader, but also a Factory API for easily building
> an object/application from the loaded resources.  I'm not sure how familiar you
> are with the details, but it's actually pretty simple:
> avalon-repository specifies a ".meta" file that sits along side a regular
> artifact (jar file).  The meta-file specifies a few things, perhaps most
> importantly is the list of other resources required for building the
> classloader.  An example is at:
> Notice this line:
> avalon.artifact.factory = org.apache.avalon.logging.logkit.DefaultLoggingFactory
> This DefaultLoggingFactory implements a Factory interface defined by the
> avalon-repository API, and allows a user to load the Logging resource by doing
> something like:
>    File cache = new File( "local-repository" );
>    InitialContext context = new DefaultInitialContext( cache );
>    String spec =
>      "artifact:avalon-logging/avalon-logkit?version=1.0-SNAPSHOT"
>    Artifact artifact =
>      Artifact.createArtifact( spec );
>    Builder builder = m_context.newBuilder( artifact );
>    Factory factory = builder.getFactory();
>    Map criteria = factory.createDefaultCriteria();
>    String key = "avalon.logging.configuration";
>    File file = new File( "logging.xml" );
>    criteria.put( key, file );
>    LoggingManager manager = 
>      (LoggingManager) factory.create( criteria );
> The criteria is just a java.util.Map that allows repository clients to pass
> parameters to the factory.
> So avalon-repository not only loads the artifacts, but it also allows for object
> initialization using the Factory pattern.  I don't know if you knew all of this
> already, but perhaps it gives the rest of the depot/repository crew a better
> understanding of our project.
>>>>I think it's time to merge efforts :-)
> +1
> ---
>   jaaron      <>

View raw message