You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/04/12 15:32:47 UTC

svn commit: r1325248 [2/3] - in /archiva/redback/redback-components/trunk/spring-registry: ./ modello-plugin-redback-registry/ modello-plugin-redback-registry/src/ modello-plugin-redback-registry/src/main/ modello-plugin-redback-registry/src/main/java/...

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java Thu Apr 12 13:32:44 2012
@@ -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" ) );
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/src/test/verifiers/registry-writer/RegistryWriterVerifier.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml Thu Apr 12 13:32:44 2012
@@ -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>

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class?rev=1325248&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/AbstractRegistryGenerator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm Thu Apr 12 13:32:44 2012
@@ -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
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReader.java.vm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class?rev=1325248&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryReaderGenerator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm Thu Apr 12 13:32:44 2012
@@ -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

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriter.java.vm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class?rev=1325248&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/classes/org/codehaus/modello/plugin/registry/RegistryWriterGenerator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/EmptyReference.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Model.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/Reference.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+    
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-reader/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryReader.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/EmptyReference.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Model.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java Thu Apr 12 13:32:44 2012
@@ -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;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/Reference.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java Thu Apr 12 13:32:44 2012
@@ -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

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/registry-writer/sources/org/codehaus/modello/test/model/io/registry/ModelRegistryWriter.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml?rev=1325248&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml (added)
+++ archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml Thu Apr 12 13:32:44 2012
@@ -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

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/spring-registry/modello-plugin-redback-registry/target/surefire-reports/TEST-org.codehaus.modello.plugin.registry.RegistryReaderGeneratorTest.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision