changing registry package need rewrite a bit registry modello plugin

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-components/trunk@1325248 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modello-plugin-redback-registry/modello-plugin-redback-registry.iml b/modello-plugin-redback-registry/modello-plugin-redback-registry.iml
new file mode 100644
index 0000000..7eb9a1b
--- /dev/null
+++ b/modello-plugin-redback-registry/modello-plugin-redback-registry.iml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.codehaus.modello:modello-plugin-store:1.0-alpha-21" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-velocity:1.1.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-collections:commons-collections:3.1" level="project" />
+    <orderEntry type="library" name="Maven: velocity:velocity:1.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: velocity:velocity-dep:1.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.plexus:plexus-container-default:1.0-alpha-33" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-utils:1.5.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.plexus:plexus-classworlds:1.2-alpha-10" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.modello:modello-core:1.0-alpha-21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.modello:modello-test:1.0-alpha-21" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven:maven-settings:2.0.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven:maven-model:2.0.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven:maven-artifact:2.0.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven.wagon:wagon-provider-api:1.0-beta-2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven:maven-artifact-manager:2.0.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apache.maven:maven-repository-metadata:2.0.7" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.plexus:plexus-compiler-javac:1.5.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: classworlds:classworlds:1.1-alpha-2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.codehaus.plexus:plexus-compiler-api:1.8.6" level="project" />
+    <orderEntry type="module" module-name="spring-registry-api" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:jsr250-api:1.0" level="project" />
+    <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-asm:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:3.1.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-test:3.1.1.RELEASE" level="project" />
+    <orderEntry type="module" module-name="spring-registry-commons" />
+    <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-interpolation:1.14" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-configuration:commons-configuration:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-lang:commons-lang:2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-digester:commons-digester:1.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.7.0" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.codehaus.plexus:plexus-component-api:1.0-alpha-33" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-logging:commons-logging-api:1.0.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-beanutils:commons-beanutils-core:1.7.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-codec:commons-codec:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: commons-jxpath:commons-jxpath:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: xerces:xerces:1.2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: javax.servlet:servlet-api:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: ant:ant-optional:1.5.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jdom:jdom:b9" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: xerces:xercesImpl:2.9.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: xalan:xalan:2.7.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-simple:1.6.4" level="project" />
+  </component>
+</module>
+
diff --git a/modello-plugin-redback-registry/pom.xml b/modello-plugin-redback-registry/pom.xml
new file mode 100644
index 0000000..f935e35
--- /dev/null
+++ b/modello-plugin-redback-registry/pom.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.archiva.redback.components.registry</groupId>
+    <artifactId>spring-registry</artifactId>
+    <version>2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>modello-plugin-redback-registry</artifactId>
+  <name>Plexus Registry Reader/Writer</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.modello</groupId>
+      <artifactId>modello-plugin-store</artifactId>
+      <version>1.0-alpha-21</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-component-api</artifactId>
+        </exclusion>
+      </exclusions>      
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.modello</groupId>
+      <artifactId>modello-test</artifactId>
+      <version>1.0-alpha-21</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.archiva.redback.components.registry</groupId>
+      <artifactId>spring-registry-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.archiva.redback.components.registry</groupId>
+      <artifactId>spring-registry-commons</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-component-api</artifactId>
+      <version>1.0-alpha-33</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-33</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-compiler-api</artifactId>
+      <version>1.8.6</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!-- dependencies needed by AbstractRegistryGeneratorTestCase -->
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-configuration</groupId>
+      <artifactId>commons-configuration</artifactId>
+      <version>1.3</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+      <version>2.9.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemPropertyVariables>
+            <registryVersion>${project.version}</registryVersion>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.java b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.java
new file mode 100644
index 0000000..782654c
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.java
@@ -0,0 +1,62 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.apache.velocity.context.Context;
+import org.codehaus.modello.ModelloException;
+import org.codehaus.modello.model.Model;
+import org.codehaus.modello.plugin.store.AbstractVelocityModelloGenerator;
+
+import java.util.Properties;
+
+public abstract class AbstractRegistryGenerator
+    extends AbstractVelocityModelloGenerator
+{
+    protected void generate( Model model, Properties parameters, String outputType )
+        throws ModelloException
+    {
+        initialize( model, parameters );
+
+        // Initialize the Velocity context
+
+        String packageName;
+        if ( isPackageWithVersion() )
+        {
+            packageName = model.getDefaultPackageName( true, getGeneratedVersion() );
+        }
+        else
+        {
+            packageName = model.getDefaultPackageName( false, null );
+        }
+
+        packageName += ".io.registry";
+
+        Context context = makeStubVelocityContext( model, getGeneratedVersion(), packageName );
+
+        // Generate the reader
+        String className = model.getName() + outputType;
+
+        writeClass( "org/codehaus/modello/plugin/registry/" + outputType + ".java.vm", getOutputDirectory(),
+                    packageName, className, context );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.java b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.java
new file mode 100644
index 0000000..8cb1642
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.java
@@ -0,0 +1,42 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.codehaus.modello.ModelloException;
+import org.codehaus.modello.model.Model;
+
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryReaderGenerator
+    extends AbstractRegistryGenerator
+{
+    public void generate( Model model, Properties parameters )
+        throws ModelloException
+    {
+        generate( model, parameters, "RegistryReader" );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.java b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.java
new file mode 100644
index 0000000..7ffc564
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/java/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.java
@@ -0,0 +1,42 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.codehaus.modello.ModelloException;
+import org.codehaus.modello.model.Model;
+
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryWriterGenerator
+    extends AbstractRegistryGenerator
+{
+    public void generate( Model model, Properties parameters )
+        throws ModelloException
+    {
+        generate( model, parameters, "RegistryWriter" );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml b/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 0000000..c995f7d
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,46 @@
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.modello.plugin.ModelloGenerator</role>
+      <role-hint>registry-reader</role-hint>
+      <implementation>org.codehaus.modello.plugin.registry.RegistryReaderGenerator</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.modello.plugin.ModelloGenerator</role>
+      <role-hint>registry-writer</role-hint>
+      <implementation>org.codehaus.modello.plugin.registry.RegistryWriterGenerator</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
diff --git a/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryReader.java.vm b/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
new file mode 100644
index 0000000..afe8508
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
@@ -0,0 +1,106 @@
+package ${package};
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+#foreach ( $class in $classes )
+#if ( ${class.packageName} != ${package} )
+import ${class.packageName}.${class.name};
+#end
+#end
+
+## TODO! make it possible to change property name via metadata
+## TODO! handle other types
+
+#macro ( handlePrimitive $localVar $registryVar $name $type $getter )
+#if ( $type == "boolean" )
+        $type $localVar = ${registryVar}.getBoolean( prefix + "${name}", $getter );
+#elseif ( $type == "char" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "double" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "float" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "int" )
+        $type $localVar = ${registryVar}.getInt( prefix + "${name}", $getter );
+#elseif ( $type == "long" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "short" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "String" )
+        $type $localVar = ${registryVar}.getString( prefix + "${name}", $getter );
+#elseif ( $type == "Boolean" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "Date" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "DOM" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#else
+    $javaTool.fail( "Unknown type: $type" )
+#end
+#end
+
+#macro ( fillCollection $uncapFieldName $to )
+#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
+#if ( $model.hasClass( $to, $version ) )
+## TODO! make it possible to have unwrapped lists via metadata
+        List ${uncapFieldName}Subsets = registry.getSubsetList( prefix + "${uncapFieldName}.${singularFieldName}" );
+        for ( Iterator i = ${uncapFieldName}Subsets.iterator(); i.hasNext(); )
+        {
+            $to v = read${to}( "", (Registry) i.next() );
+            ${uncapFieldName}.add( v );
+        }
+#else
+        ${uncapFieldName}.addAll( registry.getList( prefix + "${uncapFieldName}.${singularFieldName}" ) );
+#end
+#end
+
+/**
+ * Generate Plexus Registry input mechanism for model '${model.name}'.
+ */
+public class ${model.name}RegistryReader
+{
+    public ${model.name} read( Registry registry )
+    {
+#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
+        return read${root.name}( "", registry );
+    }
+
+#foreach ( $class in $classes )
+    private ${class.name} read${class.name}( String prefix, Registry registry )
+    {
+        ${class.name} value = new ${class.name}();
+
+#foreach ( $field in $class.getAllFields( $version, true ) )
+## TODO: handle aliases
+## TODO: handle required (and optional for those that cry when the registry item is not found)
+#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
+#if ( $field.primitive )
+#handlePrimitive( $uncapFieldName "registry" $field.name $field.type "value.${javaTool.makeGetter( $field )}()" )
+#else
+#set ( $assoc = $field )
+#if ( $assoc.multiplicity == "1" )
+        $assoc.to $uncapFieldName = read${assoc.to}( prefix + "${uncapFieldName}.", registry );
+#else
+#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
+        $assoc.type $uncapFieldName = $assoc.defaultValue;
+#fillCollection( $uncapFieldName $assoc.to )
+#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
+## TODO! make it possible to have exploded maps in xml via metadata
+        $assoc.type $uncapFieldName = registry.getProperties( prefix + "${uncapFieldName}" );
+#else
+    $javaTool.fail( "Unknown collection type: $assoc.type" )
+#end
+#end
+#end
+        value.${javaTool.makeSetter( $field )}( $uncapFieldName );
+#end
+
+        return value;
+    }
+    
+#end
+}
diff --git a/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm b/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
new file mode 100644
index 0000000..e8256fe
--- /dev/null
+++ b/modello-plugin-redback-registry/src/main/resources/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
@@ -0,0 +1,137 @@
+package ${package};
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+#foreach ( $class in $classes )
+#if ( ${class.packageName} != ${package} )
+import ${class.packageName}.${class.name};
+#end
+#end
+
+## TODO! make it possible to change property name via metadata
+## TODO! handle other types
+
+#macro ( writePrimitive $type $value $name )
+#if ( $type == "boolean" )
+                registry.setBoolean( prefix + $name, $value );
+#elseif ( $type == "char" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "double" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "float" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "int" )
+                registry.setInt( prefix + $name, $value );
+#elseif ( $type == "long" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "short" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "String" )
+                registry.setString( prefix + $name, $value );
+#elseif ( $type == "Boolean" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "Date" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "DOM" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#else
+    $javaTool.fail( "Unknown type: $type" )
+#end
+#end
+
+#macro ( writeValueChecker $type $value $field )
+#if ( $type == "boolean" || $type == "double" || $type == "float" || $type == "int" || $type == "long" || $type == "short" )
+$value != $field.defaultValue
+#elseif ( $type == "char" )
+$value != '$field.defaultValue'
+#elseif ( $type == "java.util.List" || $type == "java.util.Set" || $type == "java.util.Map" || $type == "java.util.Properties" )
+$value != null && ${value}.size() > 0
+#elseif ( $type == "String" && $field.defaultValue )
+$value != null && !${value}.equals( "$field.defaultValue" )
+#elseif ( $type == "Date" && $field.defaultValue )
+$value != null && !${value}.equals( "$field.defaultValue" )
+#else
+$value != null
+#end
+#end
+
+/**
+ * Generate Plexus Registry output mechanism for model '${model.name}'.
+ */
+public class ${model.name}RegistryWriter
+{
+    public void write( ${model.name} model, Registry registry )
+    {
+#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
+        write${root.name}( "", model, registry );
+    }
+
+#foreach ( $class in $classes )
+    private void write${class.name}( String prefix, ${class.name} value, Registry registry )
+    {
+        if ( value != null )
+        {
+#foreach ( $field in $class.getAllFields( $version, true ) )
+#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
+#set ( $value = "value.${javaTool.makeGetter( $field )}()" )
+#if ( $field.primitive )
+            if ( #writeValueChecker( $field.type $value $field ) )
+            {
+                String name = "$uncapFieldName";
+#writePrimitive( $field.type $value "name" )
+            }
+#else
+#set ( $assoc = $field )
+#if ( $assoc.multiplicity == "1" )
+            if ( #writeValueChecker( $field.type $value $field ) )
+            {
+                write${assoc.to}( prefix + "${uncapFieldName}.", $value, registry );
+            }
+#else
+            if ( #writeValueChecker( $assoc.type $value $field ) )
+            {
+#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
+## TODO! make it possible to have unwrapped lists via metadata
+                registry.removeSubset( prefix + "${uncapFieldName}" );
+
+                int count = 0;
+                for ( Iterator iter = ${value}.iterator(); iter.hasNext(); count++ )
+                {
+#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
+                    String name = "${uncapFieldName}.${singularFieldName}(" + count + ")";
+#if ( $model.hasClass( $assoc.to, $version ) )
+                    $assoc.to o = ( $assoc.to ) iter.next();
+                    write${assoc.to}( prefix + name + ".", o, registry );
+#else
+                    $assoc.to $singularFieldName = ( $assoc.to ) iter.next();
+    #writePrimitive( $assoc.to $singularFieldName "name" )
+#end
+                }
+#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
+## TODO! make it possible to have exploded maps in xml via metadata
+## TODO! make it possible to have unwrapped lists via metadata
+                registry.removeSubset( prefix + "${uncapFieldName}" );
+                
+                for ( Iterator iter = ${value}.keySet().iterator(); iter.hasNext(); )
+                {
+                    String key = (String) iter.next();
+                    String v = (String) ${value}.get( key );
+
+                    registry.setString( prefix + "${uncapFieldName}." + key, v );
+                }
+#else
+    $javaTool.fail( "Unknown collection type: $assoc.type" )
+#end
+            }
+#end
+#end
+#end
+        }
+    }
+    
+#end    
+}
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/src/site/site.xml b/modello-plugin-redback-registry/src/site/site.xml
new file mode 100644
index 0000000..f5276c1
--- /dev/null
+++ b/modello-plugin-redback-registry/src/site/site.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+
+<project>
+  <bannerLeft>
+    <name>Modello</name>
+  </bannerLeft>
+
+  <body>
+
+    <menu ref="parent" />
+
+  </body>
+
+</project>
diff --git a/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.java b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.java
new file mode 100644
index 0000000..5c4f858
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.java
@@ -0,0 +1,97 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.codehaus.modello.AbstractModelloGeneratorTest;
+import org.codehaus.modello.ModelloException;
+import org.codehaus.modello.ModelloParameterConstants;
+import org.codehaus.modello.core.ModelloCore;
+import org.codehaus.modello.model.Model;
+import org.codehaus.modello.model.ModelValidationException;
+import org.codehaus.plexus.compiler.CompilerException;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.ReaderFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+public abstract class AbstractRegistryGeneratorTestCase
+    extends AbstractModelloGeneratorTest
+{
+    public AbstractRegistryGeneratorTestCase( String name )
+    {
+        super( name );
+    }
+
+    protected void prepareTest( String outputType )
+        throws ComponentLookupException, ModelloException, ModelValidationException, IOException, CompilerException
+    {
+        ModelloCore modello = (ModelloCore) container.lookup( ModelloCore.ROLE );
+
+        Model model = modello.loadModel( ReaderFactory.newXmlReader( getTestFile( "src/test/resources/model.mdo" ) ) );
+
+        File generatedSources = getTestFile( "target/" + outputType + "/sources" );
+
+        File classes = getTestFile( "target/" + outputType + "/classes" );
+
+        FileUtils.deleteDirectory( generatedSources );
+
+        FileUtils.deleteDirectory( classes );
+
+        generatedSources.mkdirs();
+
+        classes.mkdirs();
+
+        Properties parameters = new Properties();
+
+        parameters.setProperty( ModelloParameterConstants.OUTPUT_DIRECTORY, generatedSources.getAbsolutePath() );
+
+        parameters.setProperty( ModelloParameterConstants.VERSION, "1.0.0" );
+
+        parameters.setProperty( ModelloParameterConstants.PACKAGE_WITH_VERSION, Boolean.toString( false ) );
+
+        modello.generate( model, "java", parameters );
+
+        modello.generate( model, outputType, parameters );
+
+        String registryVersion = System.getProperty( "registryVersion" );
+
+        addDependency( "org.codehaus.modello", "modello-core", getModelloVersion() );
+        addDependency( "org.codehaus.plexus.registry", "plexus-registry-api", "1.0-alpha-2" );
+        addDependency( "org.codehaus.plexus.registry", "plexus-registry-commons", "1.0-alpha-2" );
+        addDependency( "org.codehaus.plexus", "plexus-container-default", "1.0-alpha-30" );
+        addDependency( "commons-collections", "commons-collections", "3.1" );
+        addDependency( "commons-configuration", "commons-configuration", "1.3" );
+        addDependency( "commons-lang", "commons-lang", "2.1" );
+        addDependency( "commons-logging", "commons-logging-api", "1.0.4" );
+        if ( "1.5".compareTo( System.getProperty( "java.specification.version" ) ) <= 0 )
+        {
+            // causes a conflict with JDK 1.4 => add this dependency only with JDK 1.5+
+            addDependency( "xerces", "xercesImpl", "2.9.1" );
+        }
+
+        compile( generatedSources, classes );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.java b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.java
new file mode 100644
index 0000000..ddc45f5
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.java
@@ -0,0 +1,44 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryReaderGeneratorTest
+    extends AbstractRegistryGeneratorTestCase
+{
+    public RegistryReaderGeneratorTest()
+    {
+        super( "registry-reader" );
+    }
+
+    public void testRegistryReader()
+        throws Throwable
+    {
+        prepareTest( "registry-reader" );
+        
+        verify( "org.codehaus.modello.plugin.registry.RegistryReaderVerifier", "registry-reader" );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.java b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.java
new file mode 100644
index 0000000..09aa4df
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/java/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.java
@@ -0,0 +1,44 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryWriterGeneratorTest
+    extends AbstractRegistryGeneratorTestCase
+{
+    public RegistryWriterGeneratorTest()
+    {
+        super( "registry-writer" );
+    }
+
+    public void testRegistryWriter()
+        throws Throwable
+    {
+        prepareTest( "registry-writer" );
+
+        verify( "org.codehaus.modello.plugin.registry.RegistryWriterVerifier", "registry-writer" );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/test/resources/model.mdo b/modello-plugin-redback-registry/src/test/resources/model.mdo
new file mode 100644
index 0000000..f38e816
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/resources/model.mdo
@@ -0,0 +1,152 @@
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<model>
+  <id>model</id>
+  <name>Model</name>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.codehaus.modello.test.model</value>
+    </default>
+  </defaults>
+  <classes>
+    <class rootElement="true">
+      <name>Model</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>repository</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>numeric</name>
+          <version>1.0.0+</version>
+          <type>int</type>
+        </field>
+        <field>
+          <name>defString</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+          <defaultValue>def</defaultValue>
+        </field>
+        <field>
+          <name>defNumeric</name>
+          <version>1.0.0+</version>
+          <type>int</type>
+          <defaultValue>8080</defaultValue>
+        </field>
+        <field>
+          <name>defBoolean</name>
+          <version>1.0.0+</version>
+          <type>boolean</type>
+          <defaultValue>true</defaultValue>
+        </field>
+        <field>
+          <name>reference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+          </association>
+        </field>
+        <field>
+          <name>missingReference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+          </association>
+        </field>
+        <field>
+          <name>emptyReference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>EmptyReference</type>
+          </association>
+        </field>
+        <field>
+          <name>listReferences</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>setReferences</name>
+          <version>1.0.0+</version>
+          <type>Set</type>
+          <association>
+            <type>Reference</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>stringReferences</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>map</name>
+          <version>1.0.0+</version>
+          <type>Map</type>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>properties</name>
+          <version>1.0.0+</version>
+          <type>Properties</type>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Reference</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>EmptyReference</name>
+      <version>1.0.0+</version>
+    </class>
+  </classes>
+</model>
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java
new file mode 100644
index 0000000..6930b4c
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/RegistryReaderVerifier.java
@@ -0,0 +1,97 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.codehaus.modello.test.model.Model;
+import org.codehaus.modello.test.model.Reference;
+import org.codehaus.modello.test.model.io.registry.ModelRegistryReader;
+import org.codehaus.modello.verifier.Verifier;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.console.ConsoleLogger;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry;
+import org.codehaus.plexus.registry.Registry;
+
+import junit.framework.Assert;
+
+import java.io.File;
+import java.util.*;
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryReaderVerifier
+    extends Verifier
+{
+    public void verify()
+        throws Exception
+    {
+        Registry registry = new CommonsConfigurationRegistry();
+        ( (CommonsConfigurationRegistry) registry ).enableLogging( new ConsoleLogger( Logger.LEVEL_DISABLED, "" ) );
+        ( (Initializable) registry ).initialize();
+        registry.addConfigurationFromFile( new File( "src/test/verifiers/registry-reader/test.properties" ) );
+        registry.addConfigurationFromFile( new File( "src/test/verifiers/registry-reader/test.xml" ) );
+
+        ModelRegistryReader modelReader = new ModelRegistryReader();
+
+        Model model = modelReader.read( registry );
+
+        Assert.assertEquals( "Name", model.getName() );
+        Assert.assertEquals( System.getProperty( "user.home" ) + "/.m2/repository", model.getRepository() );
+        Assert.assertEquals( 1, model.getNumeric() );
+        Assert.assertEquals( "RefName", model.getReference().getName() );
+        Assert.assertNull( model.getMissingReference().getName() );
+        Assert.assertNotNull( model.getEmptyReference() );
+        Assert.assertEquals( "ListName1", ((Reference)model.getListReferences().get( 0 )).getName() );
+        Assert.assertEquals( "ListName2", ((Reference)model.getListReferences().get( 1 )).getName() );
+        Assert.assertEquals( "ListName3", ((Reference)model.getListReferences().get( 2 )).getName() );
+        Set set = model.getSetReferences();
+        List names = new ArrayList( set.size() );
+        for ( Iterator i = set.iterator(); i.hasNext(); )
+        {
+            Reference ref = (Reference) i.next();
+            names.add( ((Reference)ref).getName() );
+        }
+        Collections.sort( names );
+        Assert.assertEquals( Arrays.asList( new String[] { "SetName1", "SetName2" } ), names );
+        Assert.assertEquals( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ), model.getStringReferences() );
+
+        Map map = model.getMap();
+        Assert.assertEquals( 3, map.size() );
+        Assert.assertEquals( "value1", map.get( "property" ) );
+        Assert.assertEquals( "value2", map.get( "property2" ) );
+        Assert.assertEquals( "value3", map.get( "something.else" ) );
+
+        Properties properties = model.getProperties();
+        Assert.assertEquals( 3, properties.size() );
+        Assert.assertEquals( "value1", properties.getProperty( "property" ) );
+        Assert.assertEquals( "value2", properties.getProperty( "property2" ) );
+        Assert.assertEquals( "value3", properties.getProperty( "something.else" ) );
+
+        // test defaults
+        Assert.assertEquals( "def", model.getDefString() );
+        Assert.assertEquals( 8080, model.getDefNumeric() );
+        Assert.assertEquals( true, model.isDefBoolean() );
+    }
+}
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties
new file mode 100644
index 0000000..1ec6c8f
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.properties
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2007, Codehaus.org
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+# of the Software, and to permit persons to whom the Software is furnished to do
+# so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+name=Name
+repository=${user.home}/.m2/repository
+numeric=1
+reference.name=RefName
+stringReferences.stringReference=S1, S2, S3, S4, S5
+map.property=value1
+map.property2=value2
+map.something.else=value3
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml
new file mode 100644
index 0000000..706806d
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/verifiers/registry-reader/test.xml
@@ -0,0 +1,50 @@
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<configuration>
+  <listReferences>
+    <listReference>
+      <name>ListName1</name>
+    </listReference>
+    <listReference>
+      <name>ListName2</name>
+    </listReference>
+    <listReference>
+      <name>ListName3</name>
+    </listReference>
+  </listReferences>
+  <setReferences>
+    <setReference>
+      <name>SetName1</name>
+    </setReference>
+    <setReference>
+      <name>SetName2</name>
+    </setReference>
+  </setReferences>
+  <properties>
+    <property>value1</property>
+    <property2>value2</property2>
+    <something>
+      <else>value3</else>
+    </something>
+  </properties>
+</configuration>
diff --git a/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java b/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
new file mode 100644
index 0000000..b74102c
--- /dev/null
+++ b/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
@@ -0,0 +1,163 @@
+package org.codehaus.modello.plugin.registry;
+
+/*
+ * Copyright (c) 2007, Codehaus.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import org.codehaus.modello.test.model.Model;
+import org.codehaus.modello.test.model.Reference;
+import org.codehaus.modello.test.model.EmptyReference;
+import org.codehaus.modello.test.model.io.registry.ModelRegistryWriter;
+import org.codehaus.modello.verifier.Verifier;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.console.ConsoleLogger;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry;
+import org.codehaus.plexus.registry.Registry;
+
+import junit.framework.Assert;
+
+import java.io.File;
+import java.util.*;
+
+/**
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RegistryWriterVerifier
+    extends Verifier
+{
+    private static Reference createReference( String name )
+    {
+        Reference reference = new Reference();
+        reference.setName( name );
+        return reference;
+    }
+
+    public void verify()
+        throws Exception
+    {
+        Registry registry = new CommonsConfigurationRegistry();
+        ( (CommonsConfigurationRegistry) registry ).enableLogging( new ConsoleLogger( Logger.LEVEL_DISABLED, "" ) );
+        ( (Initializable) registry ).initialize();
+
+        Model model = new Model();
+        model.setName( "name" );
+        model.setNumeric( 9 );
+        model.setReference( createReference( "ref-name" ) );
+        model.setEmptyReference( new EmptyReference() );
+        model.setListReferences( new ArrayList( Arrays.asList( new Reference[] {
+            createReference( "list-name1" ),
+            createReference( "list-name2" ),
+            createReference( "list-name3" )
+        })));
+        model.setSetReferences( new HashSet( Arrays.asList( new Reference[] {
+            createReference( "set-name1" ),
+            createReference( "set-name2" ),
+        })));
+        model.setStringReferences( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ) );
+
+        Map map = new HashMap();
+        map.put( "property", "value1" );
+        map.put( "property2", "value2" );
+        map.put( "something.else", "value3" );
+        model.setMap( map );
+
+        Properties properties = new Properties();
+        properties.setProperty( "property", "value1" );
+        properties.setProperty( "property2", "value2" );
+        properties.setProperty( "something.else", "value3" );
+        model.setProperties( properties );
+
+        ModelRegistryWriter modelWriter = new ModelRegistryWriter();
+
+        modelWriter.write( model, registry );
+
+        Assert.assertEquals( "name", registry.getString( "name" ) );
+        Assert.assertEquals( 9, registry.getInt( "numeric" ) );
+        Assert.assertEquals( "ref-name", registry.getString( "reference.name" ) );
+        Assert.assertNull( registry.getString( "missingReference" ) );
+        Assert.assertNull( registry.getString( "missingReference.name" ) );
+        Assert.assertNull( registry.getString( "emptyReference" ) );
+        Assert.assertNull( registry.getString( "emptyReference.name" ) );
+        Assert.assertEquals( "list-name1", registry.getString( "listReferences.listReference(0).name" ) );
+        Assert.assertEquals( "list-name2", registry.getString( "listReferences.listReference(1).name" ) );
+        Assert.assertEquals( "list-name3", registry.getString( "listReferences.listReference(2).name" ) );
+        List names = new ArrayList( 2 );
+        names.add( registry.getString( "setReferences.setReference(0).name" ) );
+        names.add( registry.getString( "setReferences.setReference(1).name" ) );
+        Collections.sort( names );
+        Assert.assertEquals( Arrays.asList( new String[] { "set-name1", "set-name2" } ), names );
+        Assert.assertEquals( Arrays.asList( new String[] { "S1", "S2", "S3", "S4", "S5" } ),
+                             registry.getList( "stringReferences.stringReference" ) );
+
+        map = registry.getProperties( "map" );
+        Assert.assertEquals( 3, map.size() );
+        Assert.assertEquals( "value1", map.get( "property" ) );
+        Assert.assertEquals( "value2", map.get( "property2" ) );
+        Assert.assertEquals( "value3", map.get( "something.else" ) );
+
+        properties = registry.getProperties( "properties" );
+        Assert.assertEquals( 3, properties.size() );
+        Assert.assertEquals( "value1", properties.getProperty( "property" ) );
+        Assert.assertEquals( "value2", properties.getProperty( "property2" ) );
+        Assert.assertEquals( "value3", properties.getProperty( "something.else" ) );
+
+        // test defaults
+        Assert.assertNull( registry.getString( "defString" ) );
+
+        try
+        {
+            registry.getInt( "defNumeric" );
+            Assert.fail();
+        }
+        catch ( NoSuchElementException e )
+        {
+            // expected
+        }
+
+        try
+        {
+            registry.getBoolean( "defBoolean" );
+            Assert.fail();
+        }
+        catch ( NoSuchElementException e )
+        {
+            // expected
+        }
+
+        // test removing an element from a list [MODELLO-84]
+        model.getListReferences().remove( 0 );
+        modelWriter.write( model, registry );
+        Assert.assertEquals( "list-name2", registry.getString( "listReferences.listReference(0).name" ) );
+        Assert.assertEquals( "list-name3", registry.getString( "listReferences.listReference(1).name" ) );
+        Assert.assertNull( registry.getString( "listReferences.listReference(2).name" ) );
+
+        // test removing an element from a map
+        model.getMap().remove( "property2" );
+        modelWriter.write( model, registry );
+        map = registry.getProperties( "map" );
+        Assert.assertEquals( 2, map.size() );
+        Assert.assertEquals( "value1", map.get( "property" ) );
+        Assert.assertNull( "value2", map.get( "property2" ) );
+        Assert.assertEquals( "value3", map.get( "something.else" ) );
+    }
+}
diff --git a/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml b/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml
new file mode 100644
index 0000000..c995f7d
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml
@@ -0,0 +1,46 @@
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.modello.plugin.ModelloGenerator</role>
+      <role-hint>registry-reader</role-hint>
+      <implementation>org.codehaus.modello.plugin.registry.RegistryReaderGenerator</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.modello.plugin.ModelloGenerator</role>
+      <role-hint>registry-writer</role-hint>
+      <implementation>org.codehaus.modello.plugin.registry.RegistryWriterGenerator</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.velocity.VelocityComponent</role>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
diff --git a/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class
new file mode 100644
index 0000000..28fea83
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class
Binary files differ
diff --git a/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
new file mode 100644
index 0000000..afe8508
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
@@ -0,0 +1,106 @@
+package ${package};
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+#foreach ( $class in $classes )
+#if ( ${class.packageName} != ${package} )
+import ${class.packageName}.${class.name};
+#end
+#end
+
+## TODO! make it possible to change property name via metadata
+## TODO! handle other types
+
+#macro ( handlePrimitive $localVar $registryVar $name $type $getter )
+#if ( $type == "boolean" )
+        $type $localVar = ${registryVar}.getBoolean( prefix + "${name}", $getter );
+#elseif ( $type == "char" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "double" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "float" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "int" )
+        $type $localVar = ${registryVar}.getInt( prefix + "${name}", $getter );
+#elseif ( $type == "long" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "short" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "String" )
+        $type $localVar = ${registryVar}.getString( prefix + "${name}", $getter );
+#elseif ( $type == "Boolean" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "Date" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "DOM" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#else
+    $javaTool.fail( "Unknown type: $type" )
+#end
+#end
+
+#macro ( fillCollection $uncapFieldName $to )
+#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
+#if ( $model.hasClass( $to, $version ) )
+## TODO! make it possible to have unwrapped lists via metadata
+        List ${uncapFieldName}Subsets = registry.getSubsetList( prefix + "${uncapFieldName}.${singularFieldName}" );
+        for ( Iterator i = ${uncapFieldName}Subsets.iterator(); i.hasNext(); )
+        {
+            $to v = read${to}( "", (Registry) i.next() );
+            ${uncapFieldName}.add( v );
+        }
+#else
+        ${uncapFieldName}.addAll( registry.getList( prefix + "${uncapFieldName}.${singularFieldName}" ) );
+#end
+#end
+
+/**
+ * Generate Plexus Registry input mechanism for model '${model.name}'.
+ */
+public class ${model.name}RegistryReader
+{
+    public ${model.name} read( Registry registry )
+    {
+#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
+        return read${root.name}( "", registry );
+    }
+
+#foreach ( $class in $classes )
+    private ${class.name} read${class.name}( String prefix, Registry registry )
+    {
+        ${class.name} value = new ${class.name}();
+
+#foreach ( $field in $class.getAllFields( $version, true ) )
+## TODO: handle aliases
+## TODO: handle required (and optional for those that cry when the registry item is not found)
+#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
+#if ( $field.primitive )
+#handlePrimitive( $uncapFieldName "registry" $field.name $field.type "value.${javaTool.makeGetter( $field )}()" )
+#else
+#set ( $assoc = $field )
+#if ( $assoc.multiplicity == "1" )
+        $assoc.to $uncapFieldName = read${assoc.to}( prefix + "${uncapFieldName}.", registry );
+#else
+#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
+        $assoc.type $uncapFieldName = $assoc.defaultValue;
+#fillCollection( $uncapFieldName $assoc.to )
+#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
+## TODO! make it possible to have exploded maps in xml via metadata
+        $assoc.type $uncapFieldName = registry.getProperties( prefix + "${uncapFieldName}" );
+#else
+    $javaTool.fail( "Unknown collection type: $assoc.type" )
+#end
+#end
+#end
+        value.${javaTool.makeSetter( $field )}( $uncapFieldName );
+#end
+
+        return value;
+    }
+    
+#end
+}
diff --git a/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class
new file mode 100644
index 0000000..360351d
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class
Binary files differ
diff --git a/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
new file mode 100644
index 0000000..e8256fe
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
@@ -0,0 +1,137 @@
+package ${package};
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+#foreach ( $class in $classes )
+#if ( ${class.packageName} != ${package} )
+import ${class.packageName}.${class.name};
+#end
+#end
+
+## TODO! make it possible to change property name via metadata
+## TODO! handle other types
+
+#macro ( writePrimitive $type $value $name )
+#if ( $type == "boolean" )
+                registry.setBoolean( prefix + $name, $value );
+#elseif ( $type == "char" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "double" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "float" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "int" )
+                registry.setInt( prefix + $name, $value );
+#elseif ( $type == "long" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "short" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "String" )
+                registry.setString( prefix + $name, $value );
+#elseif ( $type == "Boolean" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "Date" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#elseif ( $type == "DOM" )
+    $javaTool.fail( "Type not yet handled: $type" )
+#else
+    $javaTool.fail( "Unknown type: $type" )
+#end
+#end
+
+#macro ( writeValueChecker $type $value $field )
+#if ( $type == "boolean" || $type == "double" || $type == "float" || $type == "int" || $type == "long" || $type == "short" )
+$value != $field.defaultValue
+#elseif ( $type == "char" )
+$value != '$field.defaultValue'
+#elseif ( $type == "java.util.List" || $type == "java.util.Set" || $type == "java.util.Map" || $type == "java.util.Properties" )
+$value != null && ${value}.size() > 0
+#elseif ( $type == "String" && $field.defaultValue )
+$value != null && !${value}.equals( "$field.defaultValue" )
+#elseif ( $type == "Date" && $field.defaultValue )
+$value != null && !${value}.equals( "$field.defaultValue" )
+#else
+$value != null
+#end
+#end
+
+/**
+ * Generate Plexus Registry output mechanism for model '${model.name}'.
+ */
+public class ${model.name}RegistryWriter
+{
+    public void write( ${model.name} model, Registry registry )
+    {
+#set ( $root = $model.getClass( $model.getRoot( $version ), $version ) )
+        write${root.name}( "", model, registry );
+    }
+
+#foreach ( $class in $classes )
+    private void write${class.name}( String prefix, ${class.name} value, Registry registry )
+    {
+        if ( value != null )
+        {
+#foreach ( $field in $class.getAllFields( $version, true ) )
+#set ( $uncapFieldName = $javaTool.uncapitalise($field.name) )
+#set ( $value = "value.${javaTool.makeGetter( $field )}()" )
+#if ( $field.primitive )
+            if ( #writeValueChecker( $field.type $value $field ) )
+            {
+                String name = "$uncapFieldName";
+#writePrimitive( $field.type $value "name" )
+            }
+#else
+#set ( $assoc = $field )
+#if ( $assoc.multiplicity == "1" )
+            if ( #writeValueChecker( $field.type $value $field ) )
+            {
+                write${assoc.to}( prefix + "${uncapFieldName}.", $value, registry );
+            }
+#else
+            if ( #writeValueChecker( $assoc.type $value $field ) )
+            {
+#if ( $assoc.type == "java.util.List" || $assoc.type == "java.util.Set" )
+## TODO! make it possible to have unwrapped lists via metadata
+                registry.removeSubset( prefix + "${uncapFieldName}" );
+
+                int count = 0;
+                for ( Iterator iter = ${value}.iterator(); iter.hasNext(); count++ )
+                {
+#set ( $singularFieldName = $javaTool.singular($uncapFieldName) )
+                    String name = "${uncapFieldName}.${singularFieldName}(" + count + ")";
+#if ( $model.hasClass( $assoc.to, $version ) )
+                    $assoc.to o = ( $assoc.to ) iter.next();
+                    write${assoc.to}( prefix + name + ".", o, registry );
+#else
+                    $assoc.to $singularFieldName = ( $assoc.to ) iter.next();
+    #writePrimitive( $assoc.to $singularFieldName "name" )
+#end
+                }
+#elseif ( $assoc.type == "java.util.Map" || $assoc.type == "java.util.Properties" )
+## TODO! make it possible to have exploded maps in xml via metadata
+## TODO! make it possible to have unwrapped lists via metadata
+                registry.removeSubset( prefix + "${uncapFieldName}" );
+                
+                for ( Iterator iter = ${value}.keySet().iterator(); iter.hasNext(); )
+                {
+                    String key = (String) iter.next();
+                    String v = (String) ${value}.get( key );
+
+                    registry.setString( prefix + "${uncapFieldName}." + key, v );
+                }
+#else
+    $javaTool.fail( "Unknown collection type: $assoc.type" )
+#end
+            }
+#end
+#end
+#end
+        }
+    }
+    
+#end    
+}
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class
new file mode 100644
index 0000000..4b3def7
--- /dev/null
+++ b/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class
Binary files differ
diff --git a/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java
new file mode 100644
index 0000000..52670e3
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class EmptyReference.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class EmptyReference implements java.io.Serializable {
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java
new file mode 100644
index 0000000..00a763a
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java
@@ -0,0 +1,531 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class Model.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class Model implements java.io.Serializable {
+
+
+      //--------------------------/
+     //- Class/Member Variables -/
+    //--------------------------/
+
+    /**
+     * Field name.
+     */
+    private String name;
+
+    /**
+     * Field repository.
+     */
+    private String repository;
+
+    /**
+     * Field numeric.
+     */
+    private int numeric = 0;
+
+    /**
+     * Field defString.
+     */
+    private String defString = "def";
+
+    /**
+     * Field defNumeric.
+     */
+    private int defNumeric = 8080;
+
+    /**
+     * Field defBoolean.
+     */
+    private boolean defBoolean = true;
+
+    /**
+     * Field reference.
+     */
+    private Reference reference;
+
+    /**
+     * Field missingReference.
+     */
+    private Reference missingReference;
+
+    /**
+     * Field emptyReference.
+     */
+    private EmptyReference emptyReference;
+
+    /**
+     * Field listReferences.
+     */
+    private java.util.List listReferences;
+
+    /**
+     * Field setReferences.
+     */
+    private java.util.Set setReferences;
+
+    /**
+     * Field stringReferences.
+     */
+    private java.util.List stringReferences;
+
+    /**
+     * Field map.
+     */
+    private java.util.Map map;
+
+    /**
+     * Field properties.
+     */
+    private java.util.Properties properties;
+
+
+      //-----------/
+     //- Methods -/
+    //-----------/
+
+    /**
+     * Method addListReference.
+     * 
+     * @param reference
+     */
+    public void addListReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.addListReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getListReferences().add( reference );
+    } //-- void addListReference(Reference) 
+
+    /**
+     * Method addMap.
+     * 
+     * @param key
+     * @param value
+     */
+    public void addMap(Object key, String value)
+    {
+        getMap().put( key, value );
+    } //-- void addMap(Object, String) 
+
+    /**
+     * Method addProperty.
+     * 
+     * @param key
+     * @param value
+     */
+    public void addProperty(String key, String value)
+    {
+        getProperties().put( key, value );
+    } //-- void addProperty(String, String) 
+
+    /**
+     * Method addSetReference.
+     * 
+     * @param reference
+     */
+    public void addSetReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.addSetReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getSetReferences().add( reference );
+    } //-- void addSetReference(Reference) 
+
+    /**
+     * Method addStringReference.
+     * 
+     * @param string
+     */
+    public void addStringReference(String string)
+    {
+        if ( !(string instanceof String) )
+        {
+            throw new ClassCastException( "Model.addStringReferences(string) parameter must be instanceof " + String.class.getName() );
+        }
+        getStringReferences().add( string );
+    } //-- void addStringReference(String) 
+
+    /**
+     * Get the defNumeric field.
+     * 
+     * @return int
+     */
+    public int getDefNumeric()
+    {
+        return this.defNumeric;
+    } //-- int getDefNumeric() 
+
+    /**
+     * Get the defString field.
+     * 
+     * @return String
+     */
+    public String getDefString()
+    {
+        return this.defString;
+    } //-- String getDefString() 
+
+    /**
+     * Get the emptyReference field.
+     * 
+     * @return EmptyReference
+     */
+    public EmptyReference getEmptyReference()
+    {
+        return this.emptyReference;
+    } //-- EmptyReference getEmptyReference() 
+
+    /**
+     * Method getListReferences.
+     * 
+     * @return java.util.List
+     */
+    public java.util.List getListReferences()
+    {
+        if ( this.listReferences == null )
+        {
+            this.listReferences = new java.util.ArrayList();
+        }
+        
+        return this.listReferences;
+    } //-- java.util.List getListReferences() 
+
+    /**
+     * Method getMap.
+     * 
+     * @return java.util.Map
+     */
+    public java.util.Map getMap()
+    {
+        if ( this.map == null )
+        {
+            this.map = new java.util.HashMap();
+        }
+        
+        return this.map;
+    } //-- java.util.Map getMap() 
+
+    /**
+     * Get the missingReference field.
+     * 
+     * @return Reference
+     */
+    public Reference getMissingReference()
+    {
+        return this.missingReference;
+    } //-- Reference getMissingReference() 
+
+    /**
+     * Get the name field.
+     * 
+     * @return String
+     */
+    public String getName()
+    {
+        return this.name;
+    } //-- String getName() 
+
+    /**
+     * Get the numeric field.
+     * 
+     * @return int
+     */
+    public int getNumeric()
+    {
+        return this.numeric;
+    } //-- int getNumeric() 
+
+    /**
+     * Method getProperties.
+     * 
+     * @return java.util.Properties
+     */
+    public java.util.Properties getProperties()
+    {
+        if ( this.properties == null )
+        {
+            this.properties = new java.util.Properties();
+        }
+        
+        return this.properties;
+    } //-- java.util.Properties getProperties() 
+
+    /**
+     * Get the reference field.
+     * 
+     * @return Reference
+     */
+    public Reference getReference()
+    {
+        return this.reference;
+    } //-- Reference getReference() 
+
+    /**
+     * Get the repository field.
+     * 
+     * @return String
+     */
+    public String getRepository()
+    {
+        return this.repository;
+    } //-- String getRepository() 
+
+    /**
+     * Method getSetReferences.
+     * 
+     * @return java.util.Set
+     */
+    public java.util.Set getSetReferences()
+    {
+        if ( this.setReferences == null )
+        {
+            this.setReferences = new java.util.HashSet();
+        }
+        
+        return this.setReferences;
+    } //-- java.util.Set getSetReferences() 
+
+    /**
+     * Method getStringReferences.
+     * 
+     * @return java.util.List
+     */
+    public java.util.List getStringReferences()
+    {
+        if ( this.stringReferences == null )
+        {
+            this.stringReferences = new java.util.ArrayList();
+        }
+        
+        return this.stringReferences;
+    } //-- java.util.List getStringReferences() 
+
+    /**
+     * Get the defBoolean field.
+     * 
+     * @return boolean
+     */
+    public boolean isDefBoolean()
+    {
+        return this.defBoolean;
+    } //-- boolean isDefBoolean() 
+
+    /**
+     * Method removeListReference.
+     * 
+     * @param reference
+     */
+    public void removeListReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.removeListReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getListReferences().remove( reference );
+    } //-- void removeListReference(Reference) 
+
+    /**
+     * Method removeSetReference.
+     * 
+     * @param reference
+     */
+    public void removeSetReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.removeSetReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getSetReferences().remove( reference );
+    } //-- void removeSetReference(Reference) 
+
+    /**
+     * Method removeStringReference.
+     * 
+     * @param string
+     */
+    public void removeStringReference(String string)
+    {
+        if ( !(string instanceof String) )
+        {
+            throw new ClassCastException( "Model.removeStringReferences(string) parameter must be instanceof " + String.class.getName() );
+        }
+        getStringReferences().remove( string );
+    } //-- void removeStringReference(String) 
+
+    /**
+     * Set the defBoolean field.
+     * 
+     * @param defBoolean
+     */
+    public void setDefBoolean(boolean defBoolean)
+    {
+        this.defBoolean = defBoolean;
+    } //-- void setDefBoolean(boolean) 
+
+    /**
+     * Set the defNumeric field.
+     * 
+     * @param defNumeric
+     */
+    public void setDefNumeric(int defNumeric)
+    {
+        this.defNumeric = defNumeric;
+    } //-- void setDefNumeric(int) 
+
+    /**
+     * Set the defString field.
+     * 
+     * @param defString
+     */
+    public void setDefString(String defString)
+    {
+        this.defString = defString;
+    } //-- void setDefString(String) 
+
+    /**
+     * Set the emptyReference field.
+     * 
+     * @param emptyReference
+     */
+    public void setEmptyReference(EmptyReference emptyReference)
+    {
+        this.emptyReference = emptyReference;
+    } //-- void setEmptyReference(EmptyReference) 
+
+    /**
+     * Set the listReferences field.
+     * 
+     * @param listReferences
+     */
+    public void setListReferences(java.util.List listReferences)
+    {
+        this.listReferences = listReferences;
+    } //-- void setListReferences(java.util.List) 
+
+    /**
+     * Set the map field.
+     * 
+     * @param map
+     */
+    public void setMap(java.util.Map map)
+    {
+        this.map = map;
+    } //-- void setMap(java.util.Map) 
+
+    /**
+     * Set the missingReference field.
+     * 
+     * @param missingReference
+     */
+    public void setMissingReference(Reference missingReference)
+    {
+        this.missingReference = missingReference;
+    } //-- void setMissingReference(Reference) 
+
+    /**
+     * Set the name field.
+     * 
+     * @param name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    } //-- void setName(String) 
+
+    /**
+     * Set the numeric field.
+     * 
+     * @param numeric
+     */
+    public void setNumeric(int numeric)
+    {
+        this.numeric = numeric;
+    } //-- void setNumeric(int) 
+
+    /**
+     * Set the properties field.
+     * 
+     * @param properties
+     */
+    public void setProperties(java.util.Properties properties)
+    {
+        this.properties = properties;
+    } //-- void setProperties(java.util.Properties) 
+
+    /**
+     * Set the reference field.
+     * 
+     * @param reference
+     */
+    public void setReference(Reference reference)
+    {
+        this.reference = reference;
+    } //-- void setReference(Reference) 
+
+    /**
+     * Set the repository field.
+     * 
+     * @param repository
+     */
+    public void setRepository(String repository)
+    {
+        this.repository = repository;
+    } //-- void setRepository(String) 
+
+    /**
+     * Set the setReferences field.
+     * 
+     * @param setReferences
+     */
+    public void setSetReferences(java.util.Set setReferences)
+    {
+        this.setReferences = setReferences;
+    } //-- void setSetReferences(java.util.Set) 
+
+    /**
+     * Set the stringReferences field.
+     * 
+     * @param stringReferences
+     */
+    public void setStringReferences(java.util.List stringReferences)
+    {
+        this.stringReferences = stringReferences;
+    } //-- void setStringReferences(java.util.List) 
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java
new file mode 100644
index 0000000..2f680a9
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class Reference.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class Reference implements java.io.Serializable {
+
+
+      //--------------------------/
+     //- Class/Member Variables -/
+    //--------------------------/
+
+    /**
+     * Field name.
+     */
+    private String name;
+
+
+      //-----------/
+     //- Methods -/
+    //-----------/
+
+    /**
+     * Get the name field.
+     * 
+     * @return String
+     */
+    public String getName()
+    {
+        return this.name;
+    } //-- String getName() 
+
+    /**
+     * Set the name field.
+     * 
+     * @param name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    } //-- void setName(String) 
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java
new file mode 100644
index 0000000..ad25ab4
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java
@@ -0,0 +1,93 @@
+package org.codehaus.modello.test.model.io.registry;
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+import org.codehaus.modello.test.model.Model;
+import org.codehaus.modello.test.model.Reference;
+import org.codehaus.modello.test.model.EmptyReference;
+
+
+
+
+/**
+ * Generate Plexus Registry input mechanism for model 'Model'.
+ */
+public class ModelRegistryReader
+{
+    public Model read( Registry registry )
+    {
+        return readModel( "", registry );
+    }
+
+    private Model readModel( String prefix, Registry registry )
+    {
+        Model value = new Model();
+
+        String name = registry.getString( prefix + "name", value.getName() );
+        value.setName( name );
+        String repository = registry.getString( prefix + "repository", value.getRepository() );
+        value.setRepository( repository );
+        int numeric = registry.getInt( prefix + "numeric", value.getNumeric() );
+        value.setNumeric( numeric );
+        String defString = registry.getString( prefix + "defString", value.getDefString() );
+        value.setDefString( defString );
+        int defNumeric = registry.getInt( prefix + "defNumeric", value.getDefNumeric() );
+        value.setDefNumeric( defNumeric );
+        boolean defBoolean = registry.getBoolean( prefix + "defBoolean", value.isDefBoolean() );
+        value.setDefBoolean( defBoolean );
+        Reference reference = readReference( prefix + "reference.", registry );
+        value.setReference( reference );
+        Reference missingReference = readReference( prefix + "missingReference.", registry );
+        value.setMissingReference( missingReference );
+        EmptyReference emptyReference = readEmptyReference( prefix + "emptyReference.", registry );
+        value.setEmptyReference( emptyReference );
+        java.util.List listReferences = new java.util.ArrayList();
+        List listReferencesSubsets = registry.getSubsetList( prefix + "listReferences.listReference" );
+        for ( Iterator i = listReferencesSubsets.iterator(); i.hasNext(); )
+        {
+            Reference v = readReference( "", (Registry) i.next() );
+            listReferences.add( v );
+        }
+        value.setListReferences( listReferences );
+        java.util.Set setReferences = new java.util.HashSet();
+        List setReferencesSubsets = registry.getSubsetList( prefix + "setReferences.setReference" );
+        for ( Iterator i = setReferencesSubsets.iterator(); i.hasNext(); )
+        {
+            Reference v = readReference( "", (Registry) i.next() );
+            setReferences.add( v );
+        }
+        value.setSetReferences( setReferences );
+        java.util.List stringReferences = new java.util.ArrayList();
+        stringReferences.addAll( registry.getList( prefix + "stringReferences.stringReference" ) );
+        value.setStringReferences( stringReferences );
+        java.util.Map map = registry.getProperties( prefix + "map" );
+        value.setMap( map );
+        java.util.Properties properties = registry.getProperties( prefix + "properties" );
+        value.setProperties( properties );
+
+        return value;
+    }
+    
+    private Reference readReference( String prefix, Registry registry )
+    {
+        Reference value = new Reference();
+
+        String name = registry.getString( prefix + "name", value.getName() );
+        value.setName( name );
+
+        return value;
+    }
+    
+    private EmptyReference readEmptyReference( String prefix, Registry registry )
+    {
+        EmptyReference value = new EmptyReference();
+
+
+        return value;
+    }
+    
+}
diff --git a/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java
new file mode 100644
index 0000000..52670e3
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class EmptyReference.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class EmptyReference implements java.io.Serializable {
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java
new file mode 100644
index 0000000..00a763a
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java
@@ -0,0 +1,531 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class Model.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class Model implements java.io.Serializable {
+
+
+      //--------------------------/
+     //- Class/Member Variables -/
+    //--------------------------/
+
+    /**
+     * Field name.
+     */
+    private String name;
+
+    /**
+     * Field repository.
+     */
+    private String repository;
+
+    /**
+     * Field numeric.
+     */
+    private int numeric = 0;
+
+    /**
+     * Field defString.
+     */
+    private String defString = "def";
+
+    /**
+     * Field defNumeric.
+     */
+    private int defNumeric = 8080;
+
+    /**
+     * Field defBoolean.
+     */
+    private boolean defBoolean = true;
+
+    /**
+     * Field reference.
+     */
+    private Reference reference;
+
+    /**
+     * Field missingReference.
+     */
+    private Reference missingReference;
+
+    /**
+     * Field emptyReference.
+     */
+    private EmptyReference emptyReference;
+
+    /**
+     * Field listReferences.
+     */
+    private java.util.List listReferences;
+
+    /**
+     * Field setReferences.
+     */
+    private java.util.Set setReferences;
+
+    /**
+     * Field stringReferences.
+     */
+    private java.util.List stringReferences;
+
+    /**
+     * Field map.
+     */
+    private java.util.Map map;
+
+    /**
+     * Field properties.
+     */
+    private java.util.Properties properties;
+
+
+      //-----------/
+     //- Methods -/
+    //-----------/
+
+    /**
+     * Method addListReference.
+     * 
+     * @param reference
+     */
+    public void addListReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.addListReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getListReferences().add( reference );
+    } //-- void addListReference(Reference) 
+
+    /**
+     * Method addMap.
+     * 
+     * @param key
+     * @param value
+     */
+    public void addMap(Object key, String value)
+    {
+        getMap().put( key, value );
+    } //-- void addMap(Object, String) 
+
+    /**
+     * Method addProperty.
+     * 
+     * @param key
+     * @param value
+     */
+    public void addProperty(String key, String value)
+    {
+        getProperties().put( key, value );
+    } //-- void addProperty(String, String) 
+
+    /**
+     * Method addSetReference.
+     * 
+     * @param reference
+     */
+    public void addSetReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.addSetReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getSetReferences().add( reference );
+    } //-- void addSetReference(Reference) 
+
+    /**
+     * Method addStringReference.
+     * 
+     * @param string
+     */
+    public void addStringReference(String string)
+    {
+        if ( !(string instanceof String) )
+        {
+            throw new ClassCastException( "Model.addStringReferences(string) parameter must be instanceof " + String.class.getName() );
+        }
+        getStringReferences().add( string );
+    } //-- void addStringReference(String) 
+
+    /**
+     * Get the defNumeric field.
+     * 
+     * @return int
+     */
+    public int getDefNumeric()
+    {
+        return this.defNumeric;
+    } //-- int getDefNumeric() 
+
+    /**
+     * Get the defString field.
+     * 
+     * @return String
+     */
+    public String getDefString()
+    {
+        return this.defString;
+    } //-- String getDefString() 
+
+    /**
+     * Get the emptyReference field.
+     * 
+     * @return EmptyReference
+     */
+    public EmptyReference getEmptyReference()
+    {
+        return this.emptyReference;
+    } //-- EmptyReference getEmptyReference() 
+
+    /**
+     * Method getListReferences.
+     * 
+     * @return java.util.List
+     */
+    public java.util.List getListReferences()
+    {
+        if ( this.listReferences == null )
+        {
+            this.listReferences = new java.util.ArrayList();
+        }
+        
+        return this.listReferences;
+    } //-- java.util.List getListReferences() 
+
+    /**
+     * Method getMap.
+     * 
+     * @return java.util.Map
+     */
+    public java.util.Map getMap()
+    {
+        if ( this.map == null )
+        {
+            this.map = new java.util.HashMap();
+        }
+        
+        return this.map;
+    } //-- java.util.Map getMap() 
+
+    /**
+     * Get the missingReference field.
+     * 
+     * @return Reference
+     */
+    public Reference getMissingReference()
+    {
+        return this.missingReference;
+    } //-- Reference getMissingReference() 
+
+    /**
+     * Get the name field.
+     * 
+     * @return String
+     */
+    public String getName()
+    {
+        return this.name;
+    } //-- String getName() 
+
+    /**
+     * Get the numeric field.
+     * 
+     * @return int
+     */
+    public int getNumeric()
+    {
+        return this.numeric;
+    } //-- int getNumeric() 
+
+    /**
+     * Method getProperties.
+     * 
+     * @return java.util.Properties
+     */
+    public java.util.Properties getProperties()
+    {
+        if ( this.properties == null )
+        {
+            this.properties = new java.util.Properties();
+        }
+        
+        return this.properties;
+    } //-- java.util.Properties getProperties() 
+
+    /**
+     * Get the reference field.
+     * 
+     * @return Reference
+     */
+    public Reference getReference()
+    {
+        return this.reference;
+    } //-- Reference getReference() 
+
+    /**
+     * Get the repository field.
+     * 
+     * @return String
+     */
+    public String getRepository()
+    {
+        return this.repository;
+    } //-- String getRepository() 
+
+    /**
+     * Method getSetReferences.
+     * 
+     * @return java.util.Set
+     */
+    public java.util.Set getSetReferences()
+    {
+        if ( this.setReferences == null )
+        {
+            this.setReferences = new java.util.HashSet();
+        }
+        
+        return this.setReferences;
+    } //-- java.util.Set getSetReferences() 
+
+    /**
+     * Method getStringReferences.
+     * 
+     * @return java.util.List
+     */
+    public java.util.List getStringReferences()
+    {
+        if ( this.stringReferences == null )
+        {
+            this.stringReferences = new java.util.ArrayList();
+        }
+        
+        return this.stringReferences;
+    } //-- java.util.List getStringReferences() 
+
+    /**
+     * Get the defBoolean field.
+     * 
+     * @return boolean
+     */
+    public boolean isDefBoolean()
+    {
+        return this.defBoolean;
+    } //-- boolean isDefBoolean() 
+
+    /**
+     * Method removeListReference.
+     * 
+     * @param reference
+     */
+    public void removeListReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.removeListReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getListReferences().remove( reference );
+    } //-- void removeListReference(Reference) 
+
+    /**
+     * Method removeSetReference.
+     * 
+     * @param reference
+     */
+    public void removeSetReference(Reference reference)
+    {
+        if ( !(reference instanceof Reference) )
+        {
+            throw new ClassCastException( "Model.removeSetReferences(reference) parameter must be instanceof " + Reference.class.getName() );
+        }
+        getSetReferences().remove( reference );
+    } //-- void removeSetReference(Reference) 
+
+    /**
+     * Method removeStringReference.
+     * 
+     * @param string
+     */
+    public void removeStringReference(String string)
+    {
+        if ( !(string instanceof String) )
+        {
+            throw new ClassCastException( "Model.removeStringReferences(string) parameter must be instanceof " + String.class.getName() );
+        }
+        getStringReferences().remove( string );
+    } //-- void removeStringReference(String) 
+
+    /**
+     * Set the defBoolean field.
+     * 
+     * @param defBoolean
+     */
+    public void setDefBoolean(boolean defBoolean)
+    {
+        this.defBoolean = defBoolean;
+    } //-- void setDefBoolean(boolean) 
+
+    /**
+     * Set the defNumeric field.
+     * 
+     * @param defNumeric
+     */
+    public void setDefNumeric(int defNumeric)
+    {
+        this.defNumeric = defNumeric;
+    } //-- void setDefNumeric(int) 
+
+    /**
+     * Set the defString field.
+     * 
+     * @param defString
+     */
+    public void setDefString(String defString)
+    {
+        this.defString = defString;
+    } //-- void setDefString(String) 
+
+    /**
+     * Set the emptyReference field.
+     * 
+     * @param emptyReference
+     */
+    public void setEmptyReference(EmptyReference emptyReference)
+    {
+        this.emptyReference = emptyReference;
+    } //-- void setEmptyReference(EmptyReference) 
+
+    /**
+     * Set the listReferences field.
+     * 
+     * @param listReferences
+     */
+    public void setListReferences(java.util.List listReferences)
+    {
+        this.listReferences = listReferences;
+    } //-- void setListReferences(java.util.List) 
+
+    /**
+     * Set the map field.
+     * 
+     * @param map
+     */
+    public void setMap(java.util.Map map)
+    {
+        this.map = map;
+    } //-- void setMap(java.util.Map) 
+
+    /**
+     * Set the missingReference field.
+     * 
+     * @param missingReference
+     */
+    public void setMissingReference(Reference missingReference)
+    {
+        this.missingReference = missingReference;
+    } //-- void setMissingReference(Reference) 
+
+    /**
+     * Set the name field.
+     * 
+     * @param name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    } //-- void setName(String) 
+
+    /**
+     * Set the numeric field.
+     * 
+     * @param numeric
+     */
+    public void setNumeric(int numeric)
+    {
+        this.numeric = numeric;
+    } //-- void setNumeric(int) 
+
+    /**
+     * Set the properties field.
+     * 
+     * @param properties
+     */
+    public void setProperties(java.util.Properties properties)
+    {
+        this.properties = properties;
+    } //-- void setProperties(java.util.Properties) 
+
+    /**
+     * Set the reference field.
+     * 
+     * @param reference
+     */
+    public void setReference(Reference reference)
+    {
+        this.reference = reference;
+    } //-- void setReference(Reference) 
+
+    /**
+     * Set the repository field.
+     * 
+     * @param repository
+     */
+    public void setRepository(String repository)
+    {
+        this.repository = repository;
+    } //-- void setRepository(String) 
+
+    /**
+     * Set the setReferences field.
+     * 
+     * @param setReferences
+     */
+    public void setSetReferences(java.util.Set setReferences)
+    {
+        this.setReferences = setReferences;
+    } //-- void setSetReferences(java.util.Set) 
+
+    /**
+     * Set the stringReferences field.
+     * 
+     * @param stringReferences
+     */
+    public void setStringReferences(java.util.List stringReferences)
+    {
+        this.stringReferences = stringReferences;
+    } //-- void setStringReferences(java.util.List) 
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java
new file mode 100644
index 0000000..2f680a9
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ */
+
+package org.codehaus.modello.test.model;
+
+  //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import java.util.Date;
+
+/**
+ * Class Reference.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class Reference implements java.io.Serializable {
+
+
+      //--------------------------/
+     //- Class/Member Variables -/
+    //--------------------------/
+
+    /**
+     * Field name.
+     */
+    private String name;
+
+
+      //-----------/
+     //- Methods -/
+    //-----------/
+
+    /**
+     * Get the name field.
+     * 
+     * @return String
+     */
+    public String getName()
+    {
+        return this.name;
+    } //-- String getName() 
+
+    /**
+     * Set the name field.
+     * 
+     * @param name
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    } //-- void setName(String) 
+
+
+    private String modelEncoding = "UTF-8";
+
+    /**
+     * Set an encoding used for reading/writing the model.
+     *
+     * @param modelEncoding the encoding used when reading/writing the model.
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @return the current encoding used when reading/writing this model.
+     */
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}
diff --git a/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java
new file mode 100644
index 0000000..7302493
--- /dev/null
+++ b/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java
@@ -0,0 +1,169 @@
+package org.codehaus.modello.test.model.io.registry;
+
+import org.apache.archiva.redback.components.registry.Registry;
+
+// Util imports
+import java.util.*;
+
+// Model class imports
+import org.codehaus.modello.test.model.Model;
+import org.codehaus.modello.test.model.Reference;
+import org.codehaus.modello.test.model.EmptyReference;
+
+
+
+
+/**
+ * Generate Plexus Registry output mechanism for model 'Model'.
+ */
+public class ModelRegistryWriter
+{
+    public void write( Model model, Registry registry )
+    {
+        writeModel( "", model, registry );
+    }
+
+    private void writeModel( String prefix, Model value, Registry registry )
+    {
+        if ( value != null )
+        {
+            if ( value.getName() != null
+ )
+            {
+                String name = "name";
+                registry.setString( prefix + name, value.getName() );
+            }
+            if ( value.getRepository() != null
+ )
+            {
+                String name = "repository";
+                registry.setString( prefix + name, value.getRepository() );
+            }
+            if ( value.getNumeric() != 0
+ )
+            {
+                String name = "numeric";
+                registry.setInt( prefix + name, value.getNumeric() );
+            }
+            if ( value.getDefString() != null && !value.getDefString().equals( "def" )
+ )
+            {
+                String name = "defString";
+                registry.setString( prefix + name, value.getDefString() );
+            }
+            if ( value.getDefNumeric() != 8080
+ )
+            {
+                String name = "defNumeric";
+                registry.setInt( prefix + name, value.getDefNumeric() );
+            }
+            if ( value.isDefBoolean() != true
+ )
+            {
+                String name = "defBoolean";
+                registry.setBoolean( prefix + name, value.isDefBoolean() );
+            }
+            if ( value.getReference() != null
+ )
+            {
+                writeReference( prefix + "reference.", value.getReference(), registry );
+            }
+            if ( value.getMissingReference() != null
+ )
+            {
+                writeReference( prefix + "missingReference.", value.getMissingReference(), registry );
+            }
+            if ( value.getEmptyReference() != null
+ )
+            {
+                writeEmptyReference( prefix + "emptyReference.", value.getEmptyReference(), registry );
+            }
+            if ( value.getListReferences() != null && value.getListReferences().size() > 0
+ )
+            {
+                registry.removeSubset( prefix + "listReferences" );
+
+                int count = 0;
+                for ( Iterator iter = value.getListReferences().iterator(); iter.hasNext(); count++ )
+                {
+                    String name = "listReferences.listReference(" + count + ")";
+                    Reference o = ( Reference ) iter.next();
+                    writeReference( prefix + name + ".", o, registry );
+                }
+            }
+            if ( value.getSetReferences() != null && value.getSetReferences().size() > 0
+ )
+            {
+                registry.removeSubset( prefix + "setReferences" );
+
+                int count = 0;
+                for ( Iterator iter = value.getSetReferences().iterator(); iter.hasNext(); count++ )
+                {
+                    String name = "setReferences.setReference(" + count + ")";
+                    Reference o = ( Reference ) iter.next();
+                    writeReference( prefix + name + ".", o, registry );
+                }
+            }
+            if ( value.getStringReferences() != null && value.getStringReferences().size() > 0
+ )
+            {
+                registry.removeSubset( prefix + "stringReferences" );
+
+                int count = 0;
+                for ( Iterator iter = value.getStringReferences().iterator(); iter.hasNext(); count++ )
+                {
+                    String name = "stringReferences.stringReference(" + count + ")";
+                    String stringReference = ( String ) iter.next();
+                    registry.setString( prefix + name, stringReference );
+                }
+            }
+            if ( value.getMap() != null && value.getMap().size() > 0
+ )
+            {
+                registry.removeSubset( prefix + "map" );
+                
+                for ( Iterator iter = value.getMap().keySet().iterator(); iter.hasNext(); )
+                {
+                    String key = (String) iter.next();
+                    String v = (String) value.getMap().get( key );
+
+                    registry.setString( prefix + "map." + key, v );
+                }
+            }
+            if ( value.getProperties() != null && value.getProperties().size() > 0
+ )
+            {
+                registry.removeSubset( prefix + "properties" );
+                
+                for ( Iterator iter = value.getProperties().keySet().iterator(); iter.hasNext(); )
+                {
+                    String key = (String) iter.next();
+                    String v = (String) value.getProperties().get( key );
+
+                    registry.setString( prefix + "properties." + key, v );
+                }
+            }
+        }
+    }
+    
+    private void writeReference( String prefix, Reference value, Registry registry )
+    {
+        if ( value != null )
+        {
+            if ( value.getName() != null
+ )
+            {
+                String name = "name";
+                registry.setString( prefix + name, value.getName() );
+            }
+        }
+    }
+    
+    private void writeEmptyReference( String prefix, EmptyReference value, Registry registry )
+    {
+        if ( value != null )
+        {
+        }
+    }
+    
+}
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml b/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml
new file mode 100644
index 0000000..eb2b5f3
--- /dev/null
+++ b/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite failures="1" time="1.538" errors="0" skipped="0" tests="1" name="org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest">
+  <properties>
+    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
+    <property name="sun.boot.library.path" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries"/>
+    <property name="java.vm.version" value="20.6-b01-414"/>
+    <property name="awt.nativeDoubleBuffering" value="true"/>
+    <property name="gopherProxySet" value="false"/>
+    <property name="mrj.build" value="11M3626"/>
+    <property name="java.vm.vendor" value="Apple Inc."/>
+    <property name="java.vendor.url" value="http://www.apple.com/"/>
+    <property name="path.separator" value=":"/>
+    <property name="guice.disable.misplaced.annotation.check" value="true"/>
+    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
+    <property name="file.encoding.pkg" value="sun.io"/>
+    <property name="user.country" value="FR"/>
+    <property name="sun.java.launcher" value="SUN_STANDARD"/>
+    <property name="sun.os.patch.level" value="unknown"/>
+    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
+    <property name="user.dir" value="/Users/olamy/dev/sources/redback-all/components"/>
+    <property name="java.runtime.version" value="1.6.0_31-b04-414-11M3626"/>
+    <property name="java.awt.graphicsenv" value="apple.awt.CGraphicsEnvironment"/>
+    <property name="java.endorsed.dirs" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed"/>
+    <property name="os.arch" value="x86_64"/>
+    <property name="java.io.tmpdir" value="/var/folders/gz/0d9zvd412lx2s1cq7flb6cfm0000gn/T/"/>
+    <property name="line.separator" value="
+"/>
+    <property name="java.vm.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="os.name" value="Mac OS X"/>
+    <property name="classworlds.conf" value="/Users/olamy/softs/maven/trunk/bin/m2.conf"/>
+    <property name="sun.jnu.encoding" value="MacRoman"/>
+    <property name="java.library.path" value=".:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"/>
+    <property name="java.specification.name" value="Java Platform API Specification"/>
+    <property name="java.class.version" value="50.0"/>
+    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
+    <property name="os.version" value="10.7.3"/>
+    <property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="user.home" value="/Users/olamy"/>
+    <property name="user.timezone" value="Europe/Paris"/>
+    <property name="java.awt.printerjob" value="apple.awt.CPrinterJob"/>
+    <property name="java.specification.version" value="1.6"/>
+    <property name="file.encoding" value="MacRoman"/>
+    <property name="user.name" value="olamy"/>
+    <property name="java.class.path" value="/Users/olamy/softs/maven/trunk/boot/plexus-classworlds-2.4.jar"/>
+    <property name="java.vm.specification.version" value="1.0"/>
+    <property name="sun.arch.data.model" value="64"/>
+    <property name="java.home" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"/>
+    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install -f spring-registry/pom.xml -rf :modello-plugin-redback-registry"/>
+    <property name="java.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="user.language" value="fr"/>
+    <property name="awt.toolkit" value="apple.awt.CToolkit"/>
+    <property name="java.vm.info" value="mixed mode"/>
+    <property name="java.version" value="1.6.0_31"/>
+    <property name="java.ext.dirs" value="/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext"/>
+    <property name="sun.boot.class.path" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar"/>
+    <property name="java.vendor" value="Apple Inc."/>
+    <property name="java.awt.headless" value="true"/>
+    <property name="maven.home" value="/Users/olamy/softs/maven/trunk"/>
+    <property name="file.separator" value="/"/>
+    <property name="java.vendor.url.bug" value="http://bugreport.apple.com/"/>
+    <property name="sun.cpu.endian" value="little"/>
+    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
+    <property name="mrj.version" value="1070.1.6.0_31-414"/>
+    <property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="sun.cpu.isalist" value=""/>
+  </properties>
+  <testcase time="1.538" classname="org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest" name="registry-reader">
+    <failure message="There was compilation errors. expected:&lt;0&gt; but was:&lt;7&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: There was compilation errors. expected:&lt;0&gt; but was:&lt;7&gt;
+	at junit.framework.Assert.fail(Assert.java:50)
+	at junit.framework.Assert.failNotEquals(Assert.java:287)
+	at junit.framework.Assert.assertEquals(Assert.java:67)
+	at junit.framework.Assert.assertEquals(Assert.java:199)
+	at org.codehaus.modello.AbstractModelloGeneratorTest.compile(AbstractModelloGeneratorTest.java:205)
+	at org.codehaus.modello.plugin.registry.AbstractRegistryGeneratorTestCase.prepareTest(AbstractRegistryGeneratorTestCase.java:93)
+	at org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.testRegistryReader(RegistryReaderGeneratorTest.java:40)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at junit.framework.TestCase.runTest(TestCase.java:168)
+	at junit.framework.TestCase.runBare(TestCase.java:134)
+	at junit.framework.TestResult$1.protect(TestResult.java:110)
+	at junit.framework.TestResult.runProtected(TestResult.java:128)
+	at junit.framework.TestResult.run(TestResult.java:113)
+	at junit.framework.TestCase.run(TestCase.java:124)
+	at junit.framework.TestSuite.runTest(TestSuite.java:243)
+	at junit.framework.TestSuite.run(TestSuite.java:238)
+	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
+</failure>
+    <system-out>Compiling 5 source files to /Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/classes
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[3,53]: package org.apache.archiva.redback.components.registry does not exist
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[21,23]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[26,44]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[75,52]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[85,62]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[52,46]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java[60,46]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryReader
+
+</system-out>
+  </testcase>
+</testsuite>
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.xml b/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.xml
new file mode 100644
index 0000000..b876b2f
--- /dev/null
+++ b/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite failures="1" time="0.377" errors="0" skipped="0" tests="1" name="org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest">
+  <properties>
+    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
+    <property name="sun.boot.library.path" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries"/>
+    <property name="java.vm.version" value="20.6-b01-414"/>
+    <property name="awt.nativeDoubleBuffering" value="true"/>
+    <property name="gopherProxySet" value="false"/>
+    <property name="mrj.build" value="11M3626"/>
+    <property name="java.vm.vendor" value="Apple Inc."/>
+    <property name="java.vendor.url" value="http://www.apple.com/"/>
+    <property name="path.separator" value=":"/>
+    <property name="guice.disable.misplaced.annotation.check" value="true"/>
+    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
+    <property name="file.encoding.pkg" value="sun.io"/>
+    <property name="user.country" value="FR"/>
+    <property name="sun.java.launcher" value="SUN_STANDARD"/>
+    <property name="sun.os.patch.level" value="unknown"/>
+    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
+    <property name="user.dir" value="/Users/olamy/dev/sources/redback-all/components"/>
+    <property name="java.runtime.version" value="1.6.0_31-b04-414-11M3626"/>
+    <property name="java.awt.graphicsenv" value="apple.awt.CGraphicsEnvironment"/>
+    <property name="java.endorsed.dirs" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed"/>
+    <property name="os.arch" value="x86_64"/>
+    <property name="java.io.tmpdir" value="/var/folders/gz/0d9zvd412lx2s1cq7flb6cfm0000gn/T/"/>
+    <property name="line.separator" value="
+"/>
+    <property name="java.vm.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="os.name" value="Mac OS X"/>
+    <property name="classworlds.conf" value="/Users/olamy/softs/maven/trunk/bin/m2.conf"/>
+    <property name="sun.jnu.encoding" value="MacRoman"/>
+    <property name="java.library.path" value=".:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"/>
+    <property name="java.specification.name" value="Java Platform API Specification"/>
+    <property name="java.class.version" value="50.0"/>
+    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
+    <property name="os.version" value="10.7.3"/>
+    <property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="user.home" value="/Users/olamy"/>
+    <property name="user.timezone" value="Europe/Paris"/>
+    <property name="java.awt.printerjob" value="apple.awt.CPrinterJob"/>
+    <property name="java.specification.version" value="1.6"/>
+    <property name="file.encoding" value="MacRoman"/>
+    <property name="user.name" value="olamy"/>
+    <property name="java.class.path" value="/Users/olamy/softs/maven/trunk/boot/plexus-classworlds-2.4.jar"/>
+    <property name="java.vm.specification.version" value="1.0"/>
+    <property name="sun.arch.data.model" value="64"/>
+    <property name="java.home" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"/>
+    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install -f spring-registry/pom.xml -rf :modello-plugin-redback-registry"/>
+    <property name="java.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="user.language" value="fr"/>
+    <property name="awt.toolkit" value="apple.awt.CToolkit"/>
+    <property name="java.vm.info" value="mixed mode"/>
+    <property name="java.version" value="1.6.0_31"/>
+    <property name="java.ext.dirs" value="/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext"/>
+    <property name="sun.boot.class.path" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar"/>
+    <property name="java.vendor" value="Apple Inc."/>
+    <property name="java.awt.headless" value="true"/>
+    <property name="maven.home" value="/Users/olamy/softs/maven/trunk"/>
+    <property name="file.separator" value="/"/>
+    <property name="java.vendor.url.bug" value="http://bugreport.apple.com/"/>
+    <property name="sun.cpu.endian" value="little"/>
+    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
+    <property name="mrj.version" value="1070.1.6.0_31-414"/>
+    <property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
+    <property name="sun.cpu.isalist" value=""/>
+  </properties>
+  <testcase time="0.377" classname="org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest" name="registry-writer">
+    <failure message="There was compilation errors. expected:&lt;0&gt; but was:&lt;5&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: There was compilation errors. expected:&lt;0&gt; but was:&lt;5&gt;
+	at junit.framework.Assert.fail(Assert.java:50)
+	at junit.framework.Assert.failNotEquals(Assert.java:287)
+	at junit.framework.Assert.assertEquals(Assert.java:67)
+	at junit.framework.Assert.assertEquals(Assert.java:199)
+	at org.codehaus.modello.AbstractModelloGeneratorTest.compile(AbstractModelloGeneratorTest.java:205)
+	at org.codehaus.modello.plugin.registry.AbstractRegistryGeneratorTestCase.prepareTest(AbstractRegistryGeneratorTestCase.java:93)
+	at org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.testRegistryWriter(RegistryWriterGeneratorTest.java:40)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at junit.framework.TestCase.runTest(TestCase.java:168)
+	at junit.framework.TestCase.runBare(TestCase.java:134)
+	at junit.framework.TestResult$1.protect(TestResult.java:110)
+	at junit.framework.TestResult.runProtected(TestResult.java:128)
+	at junit.framework.TestResult.run(TestResult.java:113)
+	at junit.framework.TestCase.run(TestCase.java:124)
+	at junit.framework.TestSuite.runTest(TestSuite.java:243)
+	at junit.framework.TestSuite.run(TestSuite.java:238)
+	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
+</failure>
+    <system-out>Compiling 5 source files to /Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/classes
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java[3,53]: package org.apache.archiva.redback.components.registry does not exist
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java[21,36]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryWriter
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java[26,57]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryWriter
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java[149,65]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryWriter
+
+/Users/olamy/dev/sources/redback-all/components/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java[162,75]: cannot find symbol
+symbol  : class Registry
+location: class org.codehaus.modello.test.model.io.registry.ModelRegistryWriter
+
+</system-out>
+  </testcase>
+</testsuite>
\ No newline at end of file
diff --git a/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.txt b/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.txt
new file mode 100644
index 0000000..c7014c1
--- /dev/null
+++ b/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.txt
@@ -0,0 +1,38 @@
+-------------------------------------------------------------------------------
+Test set: org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest
+-------------------------------------------------------------------------------
+Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.633 sec <<< FAILURE!
+registry-reader(org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest)  Time elapsed: 1.538 sec  <<< FAILURE!
+junit.framework.AssertionFailedError: There was compilation errors. expected:<0> but was:<7>
+	at junit.framework.Assert.fail(Assert.java:50)
+	at junit.framework.Assert.failNotEquals(Assert.java:287)
+	at junit.framework.Assert.assertEquals(Assert.java:67)
+	at junit.framework.Assert.assertEquals(Assert.java:199)
+	at org.codehaus.modello.AbstractModelloGeneratorTest.compile(AbstractModelloGeneratorTest.java:205)
+	at org.codehaus.modello.plugin.registry.AbstractRegistryGeneratorTestCase.prepareTest(AbstractRegistryGeneratorTestCase.java:93)
+	at org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.testRegistryReader(RegistryReaderGeneratorTest.java:40)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at junit.framework.TestCase.runTest(TestCase.java:168)
+	at junit.framework.TestCase.runBare(TestCase.java:134)
+	at junit.framework.TestResult$1.protect(TestResult.java:110)
+	at junit.framework.TestResult.runProtected(TestResult.java:128)
+	at junit.framework.TestResult.run(TestResult.java:113)
+	at junit.framework.TestCase.run(TestCase.java:124)
+	at junit.framework.TestSuite.runTest(TestSuite.java:243)
+	at junit.framework.TestSuite.run(TestSuite.java:238)
+	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
diff --git a/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.txt b/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.txt
new file mode 100644
index 0000000..bd7a593
--- /dev/null
+++ b/modello-plugin-redback-registry/target/surefire-reports/org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.txt
@@ -0,0 +1,38 @@
+-------------------------------------------------------------------------------
+Test set: org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest
+-------------------------------------------------------------------------------
+Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.377 sec <<< FAILURE!
+registry-writer(org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest)  Time elapsed: 0.377 sec  <<< FAILURE!
+junit.framework.AssertionFailedError: There was compilation errors. expected:<0> but was:<5>
+	at junit.framework.Assert.fail(Assert.java:50)
+	at junit.framework.Assert.failNotEquals(Assert.java:287)
+	at junit.framework.Assert.assertEquals(Assert.java:67)
+	at junit.framework.Assert.assertEquals(Assert.java:199)
+	at org.codehaus.modello.AbstractModelloGeneratorTest.compile(AbstractModelloGeneratorTest.java:205)
+	at org.codehaus.modello.plugin.registry.AbstractRegistryGeneratorTestCase.prepareTest(AbstractRegistryGeneratorTestCase.java:93)
+	at org.codehaus.modello.plugin.registry.RegistryWriterGeneratorTest.testRegistryWriter(RegistryWriterGeneratorTest.java:40)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at junit.framework.TestCase.runTest(TestCase.java:168)
+	at junit.framework.TestCase.runBare(TestCase.java:134)
+	at junit.framework.TestResult$1.protect(TestResult.java:110)
+	at junit.framework.TestResult.runProtected(TestResult.java:128)
+	at junit.framework.TestResult.run(TestResult.java:113)
+	at junit.framework.TestCase.run(TestCase.java:124)
+	at junit.framework.TestSuite.runTest(TestSuite.java:243)
+	at junit.framework.TestSuite.run(TestSuite.java:238)
+	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:597)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
diff --git a/modello-plugin-redback-registry/target/test-classes/model.mdo b/modello-plugin-redback-registry/target/test-classes/model.mdo
new file mode 100644
index 0000000..f38e816
--- /dev/null
+++ b/modello-plugin-redback-registry/target/test-classes/model.mdo
@@ -0,0 +1,152 @@
+<!--
+  ~ Copyright (c) 2007, Codehaus.org
+  ~
+  ~ Permission is hereby granted, free of charge, to any person obtaining a copy of
+  ~ this software and associated documentation files (the "Software"), to deal in
+  ~ the Software without restriction, including without limitation the rights to
+  ~ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+  ~ of the Software, and to permit persons to whom the Software is furnished to do
+  ~ so, subject to the following conditions:
+  ~
+  ~ The above copyright notice and this permission notice shall be included in all
+  ~ copies or substantial portions of the Software.
+  ~
+  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  ~ SOFTWARE.
+  -->
+
+<model>
+  <id>model</id>
+  <name>Model</name>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.codehaus.modello.test.model</value>
+    </default>
+  </defaults>
+  <classes>
+    <class rootElement="true">
+      <name>Model</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>repository</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>numeric</name>
+          <version>1.0.0+</version>
+          <type>int</type>
+        </field>
+        <field>
+          <name>defString</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+          <defaultValue>def</defaultValue>
+        </field>
+        <field>
+          <name>defNumeric</name>
+          <version>1.0.0+</version>
+          <type>int</type>
+          <defaultValue>8080</defaultValue>
+        </field>
+        <field>
+          <name>defBoolean</name>
+          <version>1.0.0+</version>
+          <type>boolean</type>
+          <defaultValue>true</defaultValue>
+        </field>
+        <field>
+          <name>reference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+          </association>
+        </field>
+        <field>
+          <name>missingReference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+          </association>
+        </field>
+        <field>
+          <name>emptyReference</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>EmptyReference</type>
+          </association>
+        </field>
+        <field>
+          <name>listReferences</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>Reference</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>setReferences</name>
+          <version>1.0.0+</version>
+          <type>Set</type>
+          <association>
+            <type>Reference</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>stringReferences</name>
+          <version>1.0.0+</version>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>map</name>
+          <version>1.0.0+</version>
+          <type>Map</type>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>properties</name>
+          <version>1.0.0+</version>
+          <type>Properties</type>
+          <association>
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Reference</name>
+      <version>1.0.0+</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>1.0.0+</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>EmptyReference</name>
+      <version>1.0.0+</version>
+    </class>
+  </classes>
+</model>
diff --git a/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.class b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.class
new file mode 100644
index 0000000..86b079d
--- /dev/null
+++ b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/AbstractRegistryGeneratorTestCase.class
Binary files differ
diff --git a/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.class b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.class
new file mode 100644
index 0000000..499525e
--- /dev/null
+++ b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryReaderGeneratorTest.class
Binary files differ
diff --git a/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.class b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.class
new file mode 100644
index 0000000..625ca8e
--- /dev/null
+++ b/modello-plugin-redback-registry/target/test-classes/org/codehaus/modello/plugin/registry/RegistryWriterGeneratorTest.class
Binary files differ
diff --git a/pom.xml b/pom.xml
index f59ba71..d0a506a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,7 @@
   <modules>
     <module>spring-registry-api</module>
     <module>spring-registry-commons</module>
+    <module>modello-plugin-redback-registry</module>
   </modules>
   <dependencyManagement>
     <dependencies>
@@ -59,6 +60,11 @@
         <artifactId>spring-registry-api</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.archiva.redback.components.registry</groupId>
+        <artifactId>spring-registry-commons</artifactId>
+        <version>${project.version}</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
   <dependencies>