The spec for publication 
(https://github.com/gradle/gradle/blob/master/design-docs/publication-model.md) 
treats a repository that is something that is used for both consumption and 
publication.

I want to explore this a little to make sure it's right. Something about it 
makes me uneasy, but I can't construct a really solid argument as to why. So 
I'm just going to walk through the concepts to see if we all agree it makes 
sense.

The proposed model has the following components:

1. Resolver - can be used to find/retrieve artifacts from somewhere
2. Publisher - can be used to transfer artifacts to somewhere
3. Repository - A description of “somewhere” and how to access it, can provide 
a Resolver and/or a Publisher

From a DSL/user POV, only Repository is exposed. Users configure Repository 
objects for the purpose of resolving *and* publication. Resolver and Publisher 
may be public one day, but this would be part of the extension API for plugging 
in new “somewhere” types.

There's an assumption in here that:

1. The exact same set of information that needs to be configured for resolving 
is the same that is needed for publication, or
2. Repository types expose certain configuration that is particular to 
resolving or publication

Some questions:

1. What would we do when you consume via http, but publish via sftp (to the 
same somewhere)? Are these two different Repository objects?
2. What if I consume over http, but publish over https (with everything else 
being the same)?
3. When would we ever reuse the same Repository object for consumption and 
publication?


It feels like we have something missing here. That is, I think Repository is 
the wrong commonality here. What is common is how to determine the address that 
some artifact should be found at (for consumption or publication), which is 
something like a Layout I think.

The only thing I see that converging on Repository gives us is DSL consistency 
in two different spaces, but I also see this as a risk in that we need to make 
this DSL coherent for both cases.


Also, who says we are publishing to a consumable repository? What if 
publication means calling a SOAP web service and we have no need of ever 
consuming from this guy for resolution? We'd have to have a Repository impl 
with the Resolver part empty.

This is not a pressing issue for 1.3. All of the API additions are internal or 
incubating so this doesn't need to be answered right now.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to