buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ittay Dror <>
Subject Re: namespaces: sub namespace and parent namespaces
Date Thu, 07 Aug 2008 08:18:33 GMT

Ittay Dror wrote:
> Hi,
> I'm trying to work with a sub namespace in a parent namespace:
> artifact_ns(:java) do |ns|
>    ns.ns :commons, :pool => 'commons-pool:commons-pool:jar:1.0.1'
> end
> ....
> # the reason i'm setting parent explicitely, is because i have 
> projects of different kinds, each with different set of artifacts and 
> i want the names to be kept simple
> define 'someproj' do
>   artifact_ns.parent = artifact_ns(:java)
>   compile.with :commons_pool
> end
I'm trying this instead:
  compile.with artifact_ns.ns(:commons).pool

But artifact_ns(:commons).pool returns nil. this seems because the 
registry of the sub namespace is empty. i don't know why, and can't 
follow the code.

Thank you for your help,
> this doesn't work. trying to analyze 'fetch', i see that the code for 
> manipulating "sub names" is done in ArtifactNamespace#get. If it can't 
> find the artifact locally (as in the case above) it delegates the call 
> to the registry ('unless artifact'). But the class Registry doesn't 
> have the mechanism for handling subnames, so this fails.
> Ittay

Ittay Dror <>

View raw message