geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r572612 - in /geronimo/sandbox/gshell/trunk/gshell-plugin/src: main/mdo/plugin.mdo test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml
Date Tue, 04 Sep 2007 10:47:23 GMT
Author: jdillon
Date: Tue Sep  4 03:47:22 2007
New Revision: 572612

URL: http://svn.apache.org/viewvc?rev=572612&view=rev
Log:
Ugh, so modello is super cool and also a royal pain in the ass.... :-(

Modified:
    geronimo/sandbox/gshell/trunk/gshell-plugin/src/main/mdo/plugin.mdo
    geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java
    geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml

Modified: geronimo/sandbox/gshell/trunk/gshell-plugin/src/main/mdo/plugin.mdo
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-plugin/src/main/mdo/plugin.mdo?rev=572612&r1=572611&r2=572612&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-plugin/src/main/mdo/plugin.mdo (original)
+++ geronimo/sandbox/gshell/trunk/gshell-plugin/src/main/mdo/plugin.mdo Tue Sep  4 03:47:22
2007
@@ -43,6 +43,13 @@
             <version>1.0.0+</version>
             <description>TODO</description>
             <fields>
+                <field xml.attribute="true">
+                    <name>id</name>
+                    <version>1.0.0+</version>
+                    <description>TODO</description>
+                    <type>String</type>
+                </field>
+                
                 <field>
                     <name>description</name>
                     <version>1.0.0+</version>

Modified: geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java?rev=572612&r1=572611&r2=572612&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/java/org/apache/geronimo/gshell/plugin/model/BasicModelValidationTest.java
Tue Sep  4 03:47:22 2007
@@ -19,8 +19,11 @@
 
 package org.apache.geronimo.gshell.plugin.model;
 
+import java.io.StringWriter;
+
 import junit.framework.TestCase;
 import org.apache.geronimo.gshell.plugin.model.io.xpp3.PluginXpp3Reader;
+import org.apache.geronimo.gshell.plugin.model.io.xpp3.PluginXpp3Writer;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 /**
@@ -35,6 +38,8 @@
         PluginXpp3Reader reader = new PluginXpp3Reader();
         Plugin plugin = reader.read(getClass().getResourceAsStream("plugins1.xml"));
 
+        System.out.println(plugin.getId());
+        
         assertNotNull(plugin);
         assertEquals("testing", plugin.getName());
 
@@ -61,5 +66,16 @@
         //
         // TODO: Validate the configuration bits...
         //
+    }
+
+    public void testDump1() throws Exception {
+        Plugin plugin = new Plugin();
+        plugin.setId("foo");
+
+        PluginXpp3Writer writer = new PluginXpp3Writer();
+        StringWriter out = new StringWriter();
+        writer.write(out, plugin);
+        
+        System.out.println(out.getBuffer());
     }
 }

Modified: geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml?rev=572612&r1=572611&r2=572612&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-plugin/src/test/resources/org/apache/geronimo/gshell/plugin/model/plugins1.xml
Tue Sep  4 03:47:22 2007
@@ -20,7 +20,7 @@
 
 <!-- $Rev$ $Date$ -->
 
-<plugin>
+<plugin id="foo">
     <name>testing</name>
     
     <commands>



Mime
View raw message