continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r190775 [2/2] - /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core-it /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-model/src/main/resources /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
Date Wed, 15 Jun 2005 16:32:44 GMT
Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Wed Jun 15 09:32:41
2005
@@ -15,7 +15,7 @@
    |
    |-->
   <classes>
-    <class rootElement="true" stash.storable="true"><!-- java.abstract="true" -->
+    <class rootElement="true" stash.storable="true" java.abstract="true"><!-- -->
       <name>ContinuumProject</name>
       <version>1.0.0</version>
       <fields>
@@ -321,7 +321,7 @@
          | Common fields for all builders
          |
          | -->
-
+<!--
         <field>
           <name>buildResult</name>
           <version>1.0.0</version>
@@ -333,6 +333,27 @@
             know how to work with.
           </description>
         </field>
+-->
+        <field>
+          <name>success</name>
+          <version>1.0.0</version>
+          <type>boolean</type>
+        </field>
+        <field stash.maxSize="8000">
+          <name>standardOutput</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field stash.maxSize="8000">
+          <name>standardError</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>exitCode</name>
+          <version>1.0.0</version>
+          <type>int</type>
+        </field>
         <field>
           <name>updateScmResult</name>
           <version>1.0.0</version>
@@ -348,7 +369,9 @@
     | BuilderBuildResult
     |
     | -->
-    <class stash.storable="true"> <!-- java.abstract="true"-->
+    <!-- java.abstract="true"-->
+<!--
+    <class>
       <name>ContinuumBuildResult</name>
       <version>1.0.0</version>
       <fields>
@@ -364,16 +387,25 @@
           <version>1.0.0</version>
           <type>boolean</type>
         </field>
+        <field>
+          <name>standardOutput</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>standardError</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>exitCode</name>
+          <version>1.0.0</version>
+          <type>int</type>
+        </field>
       </fields>
     </class>
-<!--
-    <class>
-      <name>ErrorBuildResult</name>
-      <packageName>org.apache.maven.continuum.execution</packageName>
-      <superClass>ContinuumBuildResult</superClass>
-      <version>1.0.0</version>
-    </class>
 -->
+<!--
     <class>
       <name>ShellBuildResult</name>
       <packageName>org.apache.maven.continuum.execution.shell</packageName>
@@ -469,7 +501,7 @@
         </field>
       </fields>
     </class>
-
+-->
     <!--
      |
      | Scm Result

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
Wed Jun 15 09:32:41 2005
@@ -62,7 +62,7 @@
                                    int start,
                                    int end );
 
-    Hashtable getBuildResultForBuild( String buildId );
+//    Hashtable getBuildResultForBuild( String buildId );
 
     Hashtable getChangedFilesForBuild( String buildId );
 

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
Wed Jun 15 09:32:41 2005
@@ -29,7 +29,6 @@
 
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
@@ -85,7 +84,9 @@
     {
         try
         {
-            return makeHashtable( "project", convertContinuumProject( continuum.getProject(
projectId ) ) );
+            ContinuumProject project = continuum.getProject( projectId );
+
+            return makeHashtable( "project", convertContinuumProject( project, false ) );
         }
         catch ( Throwable e )
         {
@@ -104,7 +105,7 @@
 
             for ( Iterator it = projects.iterator(); it.hasNext(); )
             {
-                results.add( convertContinuumProject( it.next() ) );
+                results.add( convertContinuumProject( it.next(), true ) );
             }
 
             return makeHashtable( "projects", results );
@@ -212,20 +213,20 @@
         }
     }
 
-    public Hashtable getBuildResultForBuild( String buildId )
-    {
-        try
-        {
-            ContinuumBuildResult result = continuum.getBuildResultForBuild( buildId );
-
-            return makeHashtable( "buildResult", convertContinuumBuildResult( result ) );
-        }
-        catch ( Throwable e )
-        {
-            return handleException( "ContinuumXmlRpc.getBuildResultForProject()",
-                                    "Build id: '" + buildId + "'.", e );
-        }
-    }
+//    public Hashtable getBuildResultForBuild( String buildId )
+//    {
+//        try
+//        {
+//            ContinuumBuildResult result = continuum.getBuildResultForBuild( buildId );
+//
+//            return makeHashtable( "buildResult", convertContinuumBuildResult( result )
);
+//        }
+//        catch ( Throwable e )
+//        {
+//            return handleException( "ContinuumXmlRpc.getBuildResultForProject()",
+//                                    "Build id: '" + buildId + "'.", e );
+//        }
+//    }
 
     public Hashtable getChangedFilesForBuild( String buildId )
     {
@@ -269,8 +270,6 @@
                 ContinuumProject project = (ContinuumProject) it.next();
 
                 projectIds.add( project.getId() );
-
-                getLogger().info( "project id: " + project.getId() );
             }
 
             return makeHashtable( "projectIds", xmlRpcHelper.collectionToVector( projectIds,
false ) );
@@ -297,8 +296,6 @@
 
             projectIds.add( projectId );
 
-            getLogger().info( "project id: " + projectId );
-
             return makeHashtable( "projectIds", xmlRpcHelper.collectionToVector( projectIds,
false ) );
         }
         catch ( Throwable e )
@@ -345,8 +342,6 @@
                 ContinuumProject project = (ContinuumProject) it.next();
 
                 projectIds.add( project.getId() );
-
-                getLogger().info( "project id: " + project.getId() );
             }
 
             return makeHashtable( "projectIds", xmlRpcHelper.collectionToVector( projectIds,
false ) );
@@ -497,16 +492,19 @@
     // Object to Hashtable converters
     // ----------------------------------------------------------------------
 
-    private Hashtable convertContinuumProject( Object object )
+    private Hashtable convertContinuumProject( Object object, boolean summary )
         throws IllegalAccessException, InvocationTargetException
     {
         Set excludedProperties = new HashSet();
 
-        excludedProperties.add( "configuration" );
-
         excludedProperties.add( "builds" );
 
-        excludedProperties.add( "developers" );
+        if ( summary )
+        {
+            excludedProperties.add( "developers" );
+
+            excludedProperties.add( "notifiers" );
+        }
 
         ContinuumProject project = (ContinuumProject) object;
 
@@ -521,16 +519,6 @@
         Set excludedProperties = new HashSet();
 
         excludedProperties.add( "project" );
-
-        return xmlRpcHelper.objectToHashtable( object, excludedProperties );
-    }
-
-    private Hashtable convertContinuumBuildResult( Object object )
-        throws IllegalAccessException, InvocationTargetException
-    {
-        Set excludedProperties = new HashSet();
-
-        excludedProperties.add( "build" );
 
         return xmlRpcHelper.objectToHashtable( object, excludedProperties );
     }

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
Wed Jun 15 09:32:41 2005
@@ -29,6 +29,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.Vector;
+import java.util.Properties;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
@@ -238,6 +239,10 @@
                                             excludedProperties,
                                             visitedObjects );
             }
+            else if ( value instanceof Properties )
+            {
+                value = propertiesToHashtable( (Properties) value );
+            }
             else
             {
                 value = objectToHashtable( value,
@@ -258,10 +263,24 @@
         return hashtable;
     }
 
+    private Hashtable propertiesToHashtable( Properties value  )
+    {
+        Hashtable properties = new Hashtable();
+
+        for ( Iterator it = value.entrySet().iterator(); it.hasNext(); )
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+
+            properties.put( entry.getKey(), entry.getValue() );
+        }
+
+        return properties;
+    }
+
     private Vector collectionToVector( Collection value,
-                                      boolean convertElements,
-                                      Set excludedProperties,
-                                      Set visitedObjects )
+                                       boolean convertElements,
+                                       Set excludedProperties,
+                                       Set visitedObjects )
         throws IllegalAccessException, InvocationTargetException
     {
         if ( value instanceof Vector )



Mime
View raw message