Am Mittwoch, 11. April 2007 schrieb Chris Miner:
[...]
> I suppose one has to agree that doesn't work with a vanilla magnolia.
> However, if you are developing a module anyway, then it isn't really
> cumbersome to register your namespace in the registerRepositories method of
> your Module subclass.
It should be obvious that this "hacks" are not meant for production but
for "practicing" (like Will wrote) with namespaces and custom node types,
isn't it?
> > > I guess I could "practice" with a plain java tool and a Jackrabbit
> > > repository. If I get things to work there... I might see why it's not
> > > working for me in Magnolia.
> >
> > You can of course open Magnolia's repository with a small program to add
> > namespaces and custom node types. I did this in the beginning of working
> > with custom node types and the program has only a few lines of code.
>
> Yeah, but that complicates the installation of your module. Assuming again
> that you have a module, it is straightforward to add the required code to
> your registerRepositories(ModuleDefinition) method.
Maybe, but why not declare this stuff in you module definition and let
Magnolia handle it?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module SYSTEM "module.dtd">
<module>
<name>products</name>
<displayName>Products</displayName>
<description>Example Products Manager</description>
<class>com.example.magnolia.module.products.ProductsModule</class>
<version>0.1</version>
<dependencies>
<dependency>
<name>adminInterface</name>
<version>3.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<name>magnolia</name>
<workspaces>
<workspace>
<name>products</name>
</workspace>
</workspaces>
<namespaces>
<namespace>
<prefix>expro</prefix>
<uri>http://example.com/jcr/ns/products</uri>
</namespace>
</namespaces>
<nodeTypeFile>/mgnl-nodetypes/example-product.cnd</nodeTypeFile>
</repository>
</repositories>
</module>
O.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------