continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r941625 [12/24] - in /continuum/branches/continuum-flat-multi-module: ./ continuum-api/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ cont...
Date Thu, 06 May 2010 09:23:34 GMT
Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java Thu May  6 09:23:13 2010
@@ -29,6 +29,8 @@ import javax.mail.internet.InternetAddre
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMessage.RecipientType;
 
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.notification.mail.MockJavaMailSender;
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -62,18 +64,39 @@ public class MailContinuumNotifierTest
 
         ProjectGroup group = createStubProjectGroup( "foo.bar", "" );
 
+        BuildResultDao brDao = (BuildResultDao) lookup( BuildResultDao.class );
         Project project = addProject( "Test Project", group );
+        BuildResult br = makeBuild( ContinuumProjectState.FAILED );
+        brDao.addBuildResult( project, br );
+
+        br = makeBuild( ContinuumProjectState.OK );
+        brDao.addBuildResult( project, br );
+
+        br = makeBuild( ContinuumProjectState.FAILED );
+        brDao.addBuildResult( project, br );
 
         BuildResult build = makeBuild( ContinuumProjectState.OK );
+        assertEquals( ContinuumProjectState.OK, build.getState() );
+
+        project.setState( build.getState() );
+        getProjectDao().updateProject( project );
 
         BuildDefinition buildDef = new BuildDefinition();
         buildDef.setType( "maven2" );
         buildDef.setBuildFile( "pom.xml" );
         buildDef.setGoals( "clean install" );
         buildDef.setArguments( "" );
+        BuildDefinitionDao buildDefDao = (BuildDefinitionDao) lookup( BuildDefinitionDao.class );
+        buildDef = buildDefDao.addBuildDefinition( buildDef );
         build.setBuildDefinition( buildDef );
+        assertEquals( ContinuumProjectState.OK, build.getState() );
 
-        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, "lots out build output", toOverride );
+        brDao.addBuildResult( project, build );
+        build = brDao.getLatestBuildResultForProjectWithDetails( project.getId() );
+        assertEquals( ContinuumProjectState.OK, build.getState() );
+
+        MimeMessage mailMessage =
+            sendNotificationAndGetMessage( project, build, buildDef, "lots out build output", toOverride );
 
         assertEquals( "[continuum] BUILD SUCCESSFUL: foo.bar Test Project", mailMessage.getSubject() );
 
@@ -92,7 +115,7 @@ public class MailContinuumNotifierTest
 
         BuildResult build = makeBuild( ContinuumProjectState.FAILED );
 
-        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, "output", null );
+        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, null, "output", null );
 
         assertEquals( "[continuum] BUILD FAILURE: foo.bar Test Project", mailMessage.getSubject() );
 
@@ -110,7 +133,7 @@ public class MailContinuumNotifierTest
 
         build.setError( "Big long error message" );
 
-        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, "lots of stack traces", null );
+        MimeMessage mailMessage = sendNotificationAndGetMessage( project, build, null, "lots of stack traces", null );
 
         assertEquals( "[continuum] BUILD ERROR: foo.bar Test Project", mailMessage.getSubject() );
 
@@ -151,8 +174,8 @@ public class MailContinuumNotifierTest
     //
     // ----------------------------------------------------------------------
 
-    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput,
-                                                       String toOverride )
+    private MimeMessage sendNotificationAndGetMessage( Project project, BuildResult build, BuildDefinition buildDef,
+                                                       String buildOutput, String toOverride )
         throws Exception
     {
         MessageContext context = new MessageContext();
@@ -161,6 +184,8 @@ public class MailContinuumNotifierTest
 
         context.setBuildResult( build );
 
+        context.setBuildDefinition( buildDef );
+
         ProjectNotifier projectNotifier = new ProjectNotifier();
         projectNotifier.setType( "mail" );
         Map<String, String> config = new HashMap<String, String>();
@@ -217,8 +242,6 @@ public class MailContinuumNotifierTest
     {
         BuildResult build = new BuildResult();
 
-        build.setId( 17 );
-
         build.setStartTime( System.currentTimeMillis() );
 
         build.setEndTime( System.currentTimeMillis() + 1234567 );

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilderTest.java Thu May  6 09:23:13 2010
@@ -69,7 +69,7 @@ public abstract class AbstractContinuumP
         }
 
         public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
-                                                                         boolean recursiveProjects, boolean checkoutInSingleDirectory )
+                                                                         boolean recursiveProjects )
             throws ContinuumProjectBuilderException
         {
             return null;
@@ -77,7 +77,7 @@ public abstract class AbstractContinuumP
 
         public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
                                                                          boolean recursiveProjects,
-                                                                         BuildDefinitionTemplate buildDefinitionTemplate, boolean checkoutInSingleDirectory )
+                                                                         BuildDefinitionTemplate buildDefinitionTemplate )
             throws ContinuumProjectBuilderException
         {
             return null;

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java Thu May  6 09:23:13 2010
@@ -63,7 +63,7 @@ public class MavenOneContinuumProjectBui
         bdt = service.addBuildDefinitionInTemplate( bdt, bd, false );
 
         ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata(
-            getTestFile( "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false, bdt, false );
+            getTestFile( "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false, bdt );
 
         assertOnResult( result );
 
@@ -79,7 +79,7 @@ public class MavenOneContinuumProjectBui
 
         ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata(
             getTestFile( "src/test/resources/projects/maven-1.pom.xml" ).toURL(), null, null, false,
-            service.getDefaultMavenOneBuildDefinitionTemplate(), false );
+            service.getDefaultMavenOneBuildDefinitionTemplate() );
 
         assertOnResult( result );
 

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Thu May  6 09:23:13 2010
@@ -21,7 +21,6 @@ package org.apache.maven.continuum.proje
 
 import java.io.File;
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -37,7 +36,6 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -361,7 +359,7 @@ public class MavenTwoContinuumProjectBui
 
         ContinuumProjectBuildingResult result;
 
-        result = projectBuilder.buildProjectsFromMetadata( url, null, null, false, bdt, false );
+        result = projectBuilder.buildProjectsFromMetadata( url, null, null, false, bdt );
         assertFalse( result.hasErrors() );
 
         assertEquals( 5, service.getAllBuildDefinitionTemplate().size() );
@@ -392,43 +390,7 @@ public class MavenTwoContinuumProjectBui
 
         assertEquals( 0, projectGroup.getProjects().size() );
     }
-    
-    public void testCreateProjectWithFlatStructure()
-        throws Exception
-    {
-        ContinuumProjectBuilder projectBuilder =
-            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
 
-        URL url =
-            new URL( "file://" + PlexusInSpringTestCase.getBasedir() +
-                "/src/test-projects/flat-multi-module/parent-project/pom.xml" );
-
-        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( url, null, null, true, true );
-        
-        Project rootProject = result.getRootProject();
-        assertEquals( "Incorrect root project", "parent-project", rootProject.getArtifactId() );
-        
-        List<Project> projects = result.getProjects();
-        for( Project project : projects )
-        {
-            if( project.getName().equals( "parent-project" ) )
-            {
-                assertEquals( "Incorrect scm url for parent-project",
-                              "scm:local:src/test-projects:flat-multi-module/parent-project", project.getScmUrl() );
-            }
-            else if( project.getName().equals( "module-a" ) )
-            {
-                assertEquals( "Incorrect scm url for parent-project",
-                              "scm:local:src/test-projects:flat-multi-module/module-a", project.getScmUrl() );
-            }
-            else
-            {
-                assertEquals( "Incorrect scm url for parent-project",
-                              "scm:local:src/test-projects:flat-multi-module/module-b", project.getScmUrl() );
-            }   
-        }
-    }
-    
     private void assertDependency( String dep, String proj, Map<String, Project> projects )
     {
         Project p = projects.get( proj );

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/AddProjectTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/AddProjectTest.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/AddProjectTest.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/AddProjectTest.xml Thu May  6 09:23:13 2010
@@ -24,5 +24,10 @@
       <role-hint>continuumUrl</role-hint>
       <implementation>org.apache.maven.continuum.utils.ContinuumUrlValidator</implementation>
     </component>
+    <component>
+      <role>org.codehaus.plexus.action.Action</role>
+      <role-hint>add-project-to-checkout-queue</role-hint>
+      <implementation>org.apache.maven.continuum.AddProjectToCheckoutQueueStub</implementation>
+    </component>
   </components>
 </plexus>

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml Thu May  6 09:23:13 2010
@@ -59,7 +59,7 @@
         <fromMailbox>continuum@localhost</fromMailbox>
         <fromName>Continuum</fromName>
         <timestampFormat>EEE, d MMM yyyy HH:mm:ss Z</timestampFormat>
-        <includeBuildResult>true</includeBuildResult>
+        <includeBuildOutput>true</includeBuildOutput>
         <toOverride>nobody@localhost</toOverride>
       </configuration>
     </component>

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml Thu May  6 09:23:13 2010
@@ -61,7 +61,7 @@
         <fromMailbox>continuum@localhost</fromMailbox>
         <fromName>Continuum</fromName>
         <timestampFormat>EEE, d MMM yyyy HH:mm:ss Z</timestampFormat>
-        <includeBuildResult>true</includeBuildResult>
+        <includeBuildOutput>true</includeBuildOutput>
       </configuration>
     </component>
 

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/pom.xml Thu May  6 09:23:13 2010
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-legacy</artifactId>
@@ -36,36 +36,19 @@
           <execution>
             <id>modello-continuum-metadata</id>
             <goals>
-              <goal>jpox-metadata-class</goal>
               <goal>java</goal>
               <goal>stax-reader</goal>
               <goal>stax-writer</goal>
             </goals>
           </execution>
-          <execution>
-            <id>jpox-jdo-mapping</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-replication</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
-              <replicationParameters>true</replicationParameters>
-            </configuration>
-          </execution>
         </executions>
         <configuration>
           <version>1.0.9</version>
           <packageWithVersion>true</packageWithVersion>
-          <model>src/main/mdo/continuum.xml</model>
+          <models>
+            <model>src/main/mdo/continuum.xml</model>
+          </models>
+          <useJava5>true</useJava5>
         </configuration>
       </plugin>
       <plugin>
@@ -83,12 +66,14 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
-            <id>hack-sources</id>
-            <phase>process-sources</phase>
+            <id>hack-resources</id>
+            <phase>process-classes</phase>
             <configuration>
               <tasks>
-                <!-- Workaround for MODELLO-89 -->
-                <replace file="target/generated-sources/modello/org/apache/maven/continuum/model/project/v1_0_9/ContinuumModelloMetadata.java" token="project;" value="project.v1_0_9;" />
+                <move file="target/classes/META-INF/package.jdorepl" tofile="target/classes/META-INF/package.jdorepl109" />
+                <move file="target/classes/META-INF/package.jdo" tofile="target/classes/META-INF/package.jdo109" />
+                <delete file="target/classes/package.jdo" />
+                <delete file="target/classes/package.jdorepl" />
               </tasks>
             </configuration>
             <goals>
@@ -96,22 +81,13 @@
             </goals>
           </execution>
           <execution>
-            <id>hack-resources</id>
+            <id>copy-resources</id>
+            <!-- Need to perform the workaround for MODELLO-91 first -->
             <phase>process-classes</phase>
             <configuration>
               <tasks>
-                <!-- Workaround for MODELLO-91 -->
-                <replace dir="target/classes/META-INF" token="name=&quot;notifiertype&quot;" value="name=&quot;type&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;resultstate&quot;" value="name=&quot;state&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;resulttrigger&quot;" value="name=&quot;trigger&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;projectstate&quot;" value="name=&quot;state&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;changecomment&quot;" value="name=&quot;comment&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;changedate&quot;" value="name=&quot;date&quot;" />
-                <replace dir="target/classes/META-INF" token="name=&quot;scheduledelay&quot;" value="name=&quot;delay&quot;" />
-                <move file="target/classes/META-INF/package.jdorepl" tofile="target/classes/META-INF/package.jdorepl109" />
-                <move file="target/classes/META-INF/package.jdo" tofile="target/classes/META-INF/package.jdo109" />
-                <delete file="target/classes/package.jdo" />
-                <delete file="target/classes/package.jdorepl" />
+                <copy file="target/classes/META-INF/package.jdorepl109" todir="target/classes" />
+                <copy file="target/classes/META-INF/package.jdo109" todir="target/classes" />
               </tasks>
             </configuration>
             <goals>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml Thu May  6 09:23:13 2010
@@ -504,6 +504,11 @@
           <version>1.0.9</version>
           <type>int</type>
         </field>
+        <field>
+          <name>username</name>
+          <version>1.0.9+</version>
+          <type>String</type>
+        </field>
         <field jpox.column="resultstate">
           <name>state</name>
           <version>1.1.0+</version>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/pom.xml Thu May  6 09:23:13 2010
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>data-management-api</artifactId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-api/src/main/java/org/apache/maven/continuum/management/DataManagementTool.java Thu May  6 09:23:13 2010
@@ -42,10 +42,11 @@ public interface DataManagementTool
      * Restore the database.
      *
      * @param backupDirectory the directory where the backup to restore from resides
+     * @param strict
      * @throws java.io.IOException     if there is a problem reading the backup file
      * @throws DataManagementException if there is a problem parsing the backup file
      */
-    void restoreDatabase( File backupDirectory )
+    void restoreDatabase( File backupDirectory, boolean strict )
         throws IOException, DataManagementException;
 
     /**

Propchange: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May  6 09:23:13 2010
@@ -1,3 +1,3 @@
 /continuum/branches/continuum-1.2.x/continuum-data-management/data-management-cli:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239,726462,734910
-/continuum/branches/continuum-1.3.x/continuum-data-management/data-management-cli:766106,766120-766121,766641,766645,766669,766977,767397,767792,767796,768222
+/continuum/branches/continuum-1.3.x/continuum-data-management/data-management-cli:760767-900271,915354,915760,915848-915864,916073-916074
 /continuum/branches/continuum-distributed-builds/continuum-data-management/data-management-cli:713270-734307

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/pom.xml Thu May  6 09:23:13 2010
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>data-management-cli</artifactId>
@@ -55,10 +55,6 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-classworlds</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
     <dependency>
@@ -68,6 +64,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-slf4j-logging</artifactId>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -75,6 +72,11 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
     </dependency>
@@ -89,44 +91,71 @@
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-container-default</artifactId>
+      <artifactId>plexus-spring</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
   </dependencies>
   <build>
     <plugins>
-      <!-- TODO: shade it instead, not currently working with this
-        <plugin>
-          <artifactId>shade-maven-plugin</artifactId>
-          <groupId>org.codehaus.mojo</groupId>
-          <executions>
-            <execution>
-              <goals>
-                <goal>shade</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptor>src/assembly/app.xml</descriptor>
-          <archive>
-            <manifest>
-              <mainClass>org.apache.maven.continuum.management.DataManagementCli</mainClass>
-            </manifest>
-          </archive>
-        </configuration>
+        <artifactId>maven-shade-plugin</artifactId>
         <executions>
           <execution>
             <phase>package</phase>
             <goals>
-              <goal>single</goal>
+              <goal>shade</goal>
             </goals>
+            <configuration>
+              <shadedArtifactAttached>true</shadedArtifactAttached>
+              <shadedClassifierName>app</shadedClassifierName>
+              <shadedArtifactAttached>true</shadedArtifactAttached>
+              <shadedClassifierName>app</shadedClassifierName> 
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                  <resource>META-INF/spring.handlers</resource>
+                </transformer>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                  <resource>META-INF/spring.schemas</resource>
+                </transformer>
+              </transformers>
+              <artifactSet>
+                <excludes>
+                  <exclude>xml-apis:xml-apis</exclude>
+                </excludes>
+              </artifactSet>
+            </configuration>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>org.apache.maven.continuum.management.DataManagementCli</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-cli/src/main/java/org/apache/maven/continuum/management/DataManagementCli.java Thu May  6 09:23:13 2010
@@ -40,6 +40,7 @@ import org.apache.maven.artifact.resolve
 import org.apache.maven.artifact.resolver.ResolutionListener;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
+import org.apache.maven.continuum.management.util.PlexusFileSystemXmlApplicationContext;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Profile;
@@ -48,12 +49,12 @@ import org.apache.maven.settings.Reposit
 import org.apache.maven.settings.Server;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.wagon.repository.RepositoryPermissions;
-import org.codehaus.plexus.DefaultPlexusContainer;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.PlexusContainerException;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.spring.PlexusClassPathXmlApplicationContext;
+import org.codehaus.plexus.spring.PlexusContainerAdapter;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
@@ -78,6 +79,14 @@ public class DataManagementCli
 {
     private static final Logger LOGGER = Logger.getLogger( DataManagementCli.class );
 
+    private static final String JAR_FILE_PREFIX = "jar:file:";
+
+    private static final String FILE_PREFIX = "file:";
+
+    private static final String SPRING_CONTEXT_LOC = "!/**/META-INF/spring-context.xml";
+
+    private static final String PLEXUS_XML_LOC = "!/**/META-INF/plexus/components.xml";
+
     public static void main( String[] args )
         throws Exception
     {
@@ -166,25 +175,35 @@ public class DataManagementCli
             Logger.getRootLogger().setLevel( Level.INFO );
             Logger.getLogger( "JPOX" ).setLevel( Level.WARN );
         }
+        
+        if ( command.settings != null && !command.settings.isFile() )
+        {
+            System.err.println( command.settings + " not exists or is not a file." );
+            Args.usage( command );
+            return;
+        }
 
         if ( command.buildsJdbcUrl != null )
         {
             LOGGER.info( "Processing Continuum database..." );
             processDatabase( databaseType, databaseFormat, mode, command.buildsJdbcUrl, command.directory,
-                             databaseFormat.getContinuumToolRoleHint(), "data-management-jdo", "continuum" );
+                             command.settings, databaseFormat.getContinuumToolRoleHint(), "data-management-jdo",
+                             "continuum", command.strict );
         }
 
         if ( command.usersJdbcUrl != null )
         {
             LOGGER.info( "Processing Redback database..." );
             processDatabase( databaseType, databaseFormat, mode, command.usersJdbcUrl, command.directory,
-                             databaseFormat.getRedbackToolRoleHint(), "data-management-redback-jdo", "redback" );
+                             command.settings, databaseFormat.getRedbackToolRoleHint(), "data-management-redback-jdo",
+                             "redback", command.strict );
         }
     }
 
     private static void processDatabase( SupportedDatabase databaseType, DatabaseFormat databaseFormat,
-                                         OperationMode mode, String jdbcUrl, File directory, String toolRoleHint,
-                                         String managementArtifactId, String configRoleHint )
+                                         OperationMode mode, String jdbcUrl, File directory, File setting,
+                                         String toolRoleHint, String managementArtifactId, String configRoleHint,
+                                         boolean strict )
         throws PlexusContainerException, ComponentLookupException, ComponentLifecycleException,
         ArtifactNotFoundException, ArtifactResolutionException, IOException
     {
@@ -193,22 +212,31 @@ public class DataManagementCli
         DatabaseParams params = new DatabaseParams( databaseType.defaultParams );
         params.setUrl( jdbcUrl );
 
-        DefaultPlexusContainer container = new DefaultPlexusContainer();
+        PlexusClassPathXmlApplicationContext classPathApplicationContext = new PlexusClassPathXmlApplicationContext(
+            new String[]{"classpath*:/META-INF/spring-context.xml", "classpath*:/META-INF/plexus/components.xml",
+            		"classpath*:/META-INF/plexus/plexus.xml"} );
 
-        initializeWagon( container );
+        PlexusContainerAdapter container = new PlexusContainerAdapter();
+        container.setApplicationContext( classPathApplicationContext );
+
+        initializeWagon( container, setting );
 
         List<Artifact> artifacts = new ArrayList<Artifact>();
         artifacts.addAll(
-            downloadArtifact( container, params.getGroupId(), params.getArtifactId(), params.getVersion() ) );
+            downloadArtifact( container, params.getGroupId(), params.getArtifactId(),
+                                            params.getVersion(), setting ) );
         artifacts.addAll(
-            downloadArtifact( container, "org.apache.continuum", managementArtifactId, applicationVersion ) );
-        artifacts.addAll( downloadArtifact( container, "jpox", "jpox", databaseFormat.getJpoxVersion() ) );
+            downloadArtifact( container, "org.apache.continuum", managementArtifactId,
+                                            applicationVersion, setting ) );
+        artifacts.addAll( downloadArtifact( container, "jpox", "jpox", databaseFormat.getJpoxVersion(), setting ) );
 
-        List<File> jars = new ArrayList<File>();
+        List<String> jars = new ArrayList<String>();
 
         // Little hack to make it work more nicely in the IDE
         List<String> exclusions = new ArrayList<String>();
         URLClassLoader cp = (URLClassLoader) DataManagementCli.class.getClassLoader();
+        List<URL> jarUrls = new ArrayList<URL>();
+
         for ( URL url : cp.getURLs() )
         {
             String urlEF = url.toExternalForm();
@@ -223,7 +251,8 @@ public class DataManagementCli
                 {
                     LOGGER.debug( "[IDE Help] Adding '" + id + "' as an exclusion and using one from classpath" );
                     exclusions.add( "org.apache.continuum:" + id );
-                    jars.add( new File( url.getPath() ) );
+                    jars.add( url.getPath() );
+                    jarUrls.add( url );
                 }
             }
 
@@ -231,9 +260,11 @@ public class DataManagementCli
             if ( urlEF.contains( "jpox-enhancer" ) )
             {
                 LOGGER.debug( "[IDE Help] Adding 'jpox-enhancer' as an exclusion and using one from classpath" );
-                jars.add( new File( url.getPath() ) );
+                jars.add( url.getPath() );
+                jarUrls.add( url );
             }
         }
+
         ArtifactFilter filter = new ExcludesArtifactFilter( exclusions );
 
         for ( Artifact a : artifacts )
@@ -243,29 +274,35 @@ public class DataManagementCli
                 if ( a.getVersion().equals( databaseFormat.getJpoxVersion() ) )
                 {
                     LOGGER.debug( "Adding artifact: " + a.getFile() );
-                    jars.add( a.getFile() );
+                    jars.add( JAR_FILE_PREFIX + a.getFile().getAbsolutePath() + SPRING_CONTEXT_LOC );
+                    jars.add( JAR_FILE_PREFIX + a.getFile().getAbsolutePath() + PLEXUS_XML_LOC );
+                    jarUrls.add( new URL( FILE_PREFIX + a.getFile().getAbsolutePath() ) );
                 }
             }
             else if ( filter.include( a ) )
             {
                 LOGGER.debug( "Adding artifact: " + a.getFile() );
-                jars.add( a.getFile() );
+                jars.add( JAR_FILE_PREFIX + a.getFile().getAbsolutePath() + SPRING_CONTEXT_LOC );
+                jars.add( JAR_FILE_PREFIX + a.getFile().getAbsolutePath() + PLEXUS_XML_LOC );
+                jarUrls.add( new URL( FILE_PREFIX + a.getFile().getAbsolutePath() ) );
             }
         }
 
-        ClassRealm realm = container.createComponentRealm( "app", jars );
-
-        ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader( realm );
+        URLClassLoader newClassLoader = new URLClassLoader( (URL[]) jarUrls.toArray( new URL[jarUrls.size()] ), cp );
+        Thread.currentThread().setContextClassLoader( newClassLoader );
+        classPathApplicationContext.setClassLoader( newClassLoader );
 
-        ClassRealm oldRealm = container.setLookupRealm( realm );
+        PlexusFileSystemXmlApplicationContext fileSystemApplicationContext = new PlexusFileSystemXmlApplicationContext(
+             (String[]) jars.toArray( new String[jars.size()] ), classPathApplicationContext );
+        fileSystemApplicationContext.setClassLoader( newClassLoader );
+        container.setApplicationContext( fileSystemApplicationContext );
 
-        DatabaseFactoryConfigurator configurator = (DatabaseFactoryConfigurator) container.lookup(
-            DatabaseFactoryConfigurator.class.getName(), configRoleHint, realm );
+        DatabaseFactoryConfigurator configurator = (DatabaseFactoryConfigurator) container.lookup( 
+                                DatabaseFactoryConfigurator.class.getName(), configRoleHint );
         configurator.configure( params );
 
         DataManagementTool manager =
-            (DataManagementTool) container.lookup( DataManagementTool.class.getName(), toolRoleHint, realm );
+            (DataManagementTool) container.lookup( DataManagementTool.class.getName(), toolRoleHint );
 
         if ( mode == OperationMode.EXPORT )
         {
@@ -274,19 +311,16 @@ public class DataManagementCli
         else if ( mode == OperationMode.IMPORT )
         {
             manager.eraseDatabase();
-            manager.restoreDatabase( directory );
+            manager.restoreDatabase( directory, strict );
         }
-
-        container.setLookupRealm( oldRealm );
-        Thread.currentThread().setContextClassLoader( oldLoader );
     }
 
-    private static void initializeWagon( DefaultPlexusContainer container )
+    private static void initializeWagon( PlexusContainerAdapter container, File setting )
         throws ComponentLookupException, ComponentLifecycleException, IOException
     {
         WagonManager wagonManager = (WagonManager) container.lookup( WagonManager.ROLE );
 
-        Settings settings = getSettings( container );
+        Settings settings = getSettings( container, setting );
 
         try
         {
@@ -342,7 +376,7 @@ public class DataManagementCli
     }
 
     private static Collection<Artifact> downloadArtifact( PlexusContainer container, String groupId, String artifactId,
-                                                          String version )
+                                                          String version, File setting )
         throws ComponentLookupException, ArtifactNotFoundException, ArtifactResolutionException, IOException
     {
         ArtifactRepositoryFactory factory =
@@ -352,14 +386,14 @@ public class DataManagementCli
             (DefaultRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "default" );
 
         ArtifactRepository localRepository =
-            factory.createArtifactRepository( "local", getLocalRepositoryURL( container ), layout, null, null );
+            factory.createArtifactRepository( "local", getLocalRepositoryURL( container, setting ), layout, null, null );
 
         List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
         remoteRepositories.add(
             factory.createArtifactRepository( "central", "http://repo1.maven.org/maven2", layout, null, null ) );
         //Load extra repositories from active profile
         
-        Settings settings = getSettings( container );
+        Settings settings = getSettings( container, setting );
         List<String> profileIds = settings.getActiveProfiles();
         Map<String, Profile> profilesAsMap = settings.getProfilesAsMap();
         if ( profileIds != null && !profileIds.isEmpty() )
@@ -424,29 +458,43 @@ public class DataManagementCli
         return result.getArtifacts();
     }
 
-    private static String getLocalRepositoryURL( PlexusContainer container )
+    private static String getLocalRepositoryURL( PlexusContainer container, File setting )
         throws ComponentLookupException, IOException
     {
+        String repositoryPath;
         File settingsFile = new File( System.getProperty( "user.home" ), ".m2/settings.xml" );
-        if ( !settingsFile.exists() )
+        if ( setting != null )
         {
-            return new File( System.getProperty( "user.home" ), ".m2/repository" ).toURL().toString();
+            Settings settings = getSettings( container, setting );
+            repositoryPath = new File( settings.getLocalRepository() ).toURL().toString();
+        }
+        else if ( !settingsFile.exists() )
+        {
+            repositoryPath = new File( System.getProperty( "user.home" ), ".m2/repository" ).toURL().toString();
         }
         else
         {
-            Settings settings = getSettings( container );
-            return new File( settings.getLocalRepository() ).toURL().toString();
+            Settings settings = getSettings( container, null );
+            repositoryPath = new File( settings.getLocalRepository() ).toURL().toString();
         }
+        return repositoryPath;
     }
 
-    private static Settings getSettings( PlexusContainer container )
+    private static Settings getSettings( PlexusContainer container, File setting )
         throws ComponentLookupException, IOException
     {
         MavenSettingsBuilder mavenSettingsBuilder =
             (MavenSettingsBuilder) container.lookup( MavenSettingsBuilder.class.getName() );
         try
         {
-            return mavenSettingsBuilder.buildSettings( false );
+            if ( setting != null )
+            {
+                return mavenSettingsBuilder.buildSettings( setting, false );
+            }
+            else
+            {
+                return mavenSettingsBuilder.buildSettings( false );
+            }
         }
         catch ( XmlPullParserException e )
         {
@@ -538,6 +586,12 @@ public class DataManagementCli
             description = "Turn on debugging information. Default is off.",
             value = "debug")
         private boolean debug;
+        
+        @Argument( description = "Alternate path for the user settings file", value = "settings", required = false, alias = "s" )
+        private File settings;
+
+        @Argument(description = "Run on strict mode. Default is false.", value="strict")
+        private boolean strict;
     }
 
     private enum OperationMode

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/pom.xml Thu May  6 09:23:13 2010
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>data-management-jdo</artifactId>
@@ -73,6 +73,7 @@
     <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-commons</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>stax</groupId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java Thu May  6 09:23:13 2010
@@ -232,7 +232,7 @@ public class JdoDataManagementTool
         daoUtils.eraseDatabase();
     }
 
-    public void restoreDatabase( File backupDirectory )
+    public void restoreDatabase( File backupDirectory, boolean strict )
         throws IOException
     {
         ContinuumStaxReader reader = new ContinuumStaxReader();
@@ -242,7 +242,7 @@ public class JdoDataManagementTool
         ContinuumDatabase database;
         try
         {
-            database = reader.read( fileReader );
+            database = reader.read( fileReader, strict );
         }
         catch ( XMLStreamException e )
         {

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/LegacyJdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/LegacyJdoDataManagementTool.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/LegacyJdoDataManagementTool.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/LegacyJdoDataManagementTool.java Thu May  6 09:23:13 2010
@@ -189,7 +189,7 @@ public class LegacyJdoDataManagementTool
         return pm;
     }
 
-    public void restoreDatabase( File backupDirectory )
+    public void restoreDatabase( File backupDirectory, boolean strict )
         throws IOException
     {
         ContinuumStaxReader reader = new ContinuumStaxReader();
@@ -199,7 +199,7 @@ public class LegacyJdoDataManagementTool
         ContinuumDatabase database;
         try
         {
-            database = reader.read( fileReader );
+            database = reader.read( fileReader, strict );
         }
         catch ( XMLStreamException e )
         {

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-jdo/src/test/java/org/apache/maven/continuum/management/DataManagementToolTest.java Thu May  6 09:23:13 2010
@@ -118,7 +118,7 @@ public class DataManagementToolTest
 
         IOUtil.copy( getClass().getResourceAsStream( "/expected.xml" ), new FileWriter( backupFile ) );
 
-        dataManagementTool.restoreDatabase( targetDirectory );
+        dataManagementTool.restoreDatabase( targetDirectory, true );
 /*
         // TODO: why is this wrong?
         assertBuildDatabase();

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/pom.xml Thu May  6 09:23:13 2010
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>data-management-redback-jdo</artifactId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/JdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/JdoDataManagementTool.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/JdoDataManagementTool.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/JdoDataManagementTool.java Thu May  6 09:23:13 2010
@@ -84,7 +84,7 @@ public class JdoDataManagementTool
         toolDelegate.eraseUsersDatabase( userManager );
     }
 
-    public void restoreDatabase( File backupDirectory )
+    public void restoreDatabase( File backupDirectory, boolean strict )
         throws IOException
     {
         try

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/LegacyJdoDataManagementTool.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/LegacyJdoDataManagementTool.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/LegacyJdoDataManagementTool.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/data-management-redback-jdo/src/main/java/org/apache/maven/continuum/management/redback/LegacyJdoDataManagementTool.java Thu May  6 09:23:13 2010
@@ -101,7 +101,7 @@ public class LegacyJdoDataManagementTool
         }
     }
 
-    public void restoreDatabase( File backupDirectory )
+    public void restoreDatabase( File backupDirectory, boolean strict )
         throws IOException, DataManagementException
     {
         try

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/pom.xml Thu May  6 09:23:13 2010
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>continuum</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <artifactId>continuum-data-management</artifactId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-data-management/redback-legacy/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-data-management/redback-legacy/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-data-management/redback-legacy/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-data-management/redback-legacy/pom.xml Thu May  6 09:23:13 2010
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>continuum-data-management</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>redback-legacy</artifactId>
@@ -16,149 +16,59 @@
           <execution>
             <id>modello-rbac</id>
             <goals>
-              <goal>jpox-metadata-class</goal>
               <goal>java</goal>
               <goal>stax-reader</goal>
               <goal>stax-writer</goal>
             </goals>
             <configuration>
-              <model>src/main/mdo/rbac-jdo.mdo</model>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-rbac</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/rbac-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/authorization/rbac/jdo
-              </outputDirectory>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-rbac-replication</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/rbac-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/authorization/rbac/jdo
-              </outputDirectory>
-              <replicationParameters>true</replicationParameters>
+              <models>
+                <model>src/main/mdo/rbac-jdo.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
             <id>modello-keys</id>
             <goals>
-              <goal>jpox-metadata-class</goal>
               <goal>java</goal>
               <goal>stax-reader</goal>
               <goal>stax-writer</goal>
             </goals>
             <configuration>
-              <model>src/main/mdo/keys-jdo.mdo</model>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-keys</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/keys-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/keys/jdo
-              </outputDirectory>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-keys-replication</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/keys-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/keys/jdo
-              </outputDirectory>
-              <replicationParameters>true</replicationParameters>
+              <models>
+                <model>src/main/mdo/keys-jdo.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
             <id>modello-users</id>
             <goals>
-              <goal>jpox-metadata-class</goal>
               <goal>java</goal>
               <goal>stax-reader</goal>
               <goal>stax-writer</goal>
             </goals>
             <configuration>
-              <model>src/main/mdo/users-jdo.mdo</model>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-users</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/users-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/user/jdo
-              </outputDirectory>
-            </configuration>
-          </execution>
-          <execution>
-            <id>jpox-jdo-mapping-users-replication</id>
-            <goals>
-              <goal>jpox-jdo-mapping</goal>
-            </goals>
-            <configuration>
-              <model>src/main/mdo/users-jdo.mdo</model>
-              <outputDirectory>
-                ${basedir}/target/classes/org/codehaus/plexus/security/user/jdo
-              </outputDirectory>
-              <replicationParameters>true</replicationParameters>
+              <models>
+                <model>src/main/mdo/users-jdo.mdo</model>
+              </models>
             </configuration>
           </execution>
         </executions>
         <configuration>
           <version>0.9.0</version>
           <packageWithVersion>true</packageWithVersion>
+          <!--<useJava5>true</useJava5>-->
         </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
-            <id>hack-sources</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <tasks>
-                <!-- Workaround for MODELLO-89 -->
-                <replace file="target/generated-sources/modello/org/codehaus/plexus/security/keys/jdo/v0_9_0/PlexusSecurityKeyManagementJdoModelloMetadata.java" token="jdo;" value="jdo.v0_9_0;" />
-                <replace file="target/generated-sources/modello/org/codehaus/plexus/security/authorization/rbac/jdo/v0_9_0/RbacJdoModelModelloMetadata.java" token="jdo;" value="jdo.v0_9_0;" />
-                <replace file="target/generated-sources/modello/org/codehaus/plexus/security/user/jdo/v0_9_0/UserManagementModelloMetadata.java" token="jdo;" value="jdo.v0_9_0;" />
-              </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>hack-resources</id>
-            <phase>process-classes</phase>
+            <id>copy-resources</id>
+            <phase>process-resources</phase>
             <configuration>
               <tasks>
-                <!-- Workaround for MODELLO-91 -->
-                <replace dir="target/classes/org/codehaus/plexus/security/user/jdo" token="name=&quot;USER_PASSWORD&quot;" value="name=&quot;PASSWORD&quot;" />
-                <replace dir="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo" token="SECURITY_" value="" />
-                <replace dir="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo" token="name=&quot;RBAC_OPERATION&quot;" value="name=&quot;OPERATION&quot;" />
-                <replace dir="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo" token="name=&quot;RBAC_RESOURCE&quot;" value="name=&quot;RESOURCE&quot;" />
-                <replace dir="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo" token="name=&quot;LAST_UPDATED&quot;" value="name=&quot;TIMESTAMP&quot;" />
+                <copy file="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo/package.jdorepl" todir="target/classes" />
+                <copy file="target/classes/org/codehaus/plexus/security/authorization/rbac/jdo/package.jdo" todir="target/classes" />
               </tasks>
             </configuration>
             <goals>

Propchange: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-commons/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu May  6 09:23:13 2010
@@ -0,0 +1,6 @@
+target
+*.iml
+.classpath
+.project
+.settings
+build

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/pom.xml Thu May  6 09:23:13 2010
@@ -21,7 +21,7 @@ under the License.
   <parent>
     <groupId>org.apache.continuum</groupId>
     <artifactId>continuum-distributed-master</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-distributed-master-api</artifactId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportService.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportService.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-api/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportService.java Thu May  6 09:23:13 2010
@@ -1,9 +1,5 @@
 package org.apache.continuum.distributed.transport.master;
 
-import com.atlassian.xmlrpc.ServiceObject;
-
-import java.util.Map;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -23,6 +19,10 @@ import java.util.Map;
  * under the License.
  */
 
+import com.atlassian.xmlrpc.ServiceObject;
+
+import java.util.Map;
+
 /**
  * MasterBuildAgentTransportService
  */

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/pom.xml Thu May  6 09:23:13 2010
@@ -21,7 +21,7 @@ under the License.
   <parent>
     <groupId>org.apache.continuum</groupId>
     <artifactId>continuum-distributed-master</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-distributed-master-client</artifactId>
@@ -33,6 +33,11 @@ under the License.
       <artifactId>continuum-distributed-master-api</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-distributed-commons</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
       <groupId>com.atlassian.xmlrpc</groupId>
       <artifactId>atlassian-xmlrpc-binder</artifactId>
     </dependency>

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java Thu May  6 09:23:13 2010
@@ -30,6 +30,8 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.continuum.distributed.commons.utils.ContinuumDistributedUtil;
+
 /**
  * MasterBuildAgentTransportClient
  */
@@ -71,16 +73,17 @@ public class MasterBuildAgentTransportCl
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( buildResult );
 
         try
         {
             result = master.returnBuildResult( buildResult );
-            log.info( "Returning the build result." );
+            log.info( "Returning the build result for project " + projectInfo + "." );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to return the build result.", e );
-            throw new Exception( "Failed to return the build result", e );
+            log.error( "Failed to return the build result for project " + projectInfo + ".", e );
+            throw new Exception( "Failed to return the build result for project " + projectInfo + ".", e );
         }
 
         return result;
@@ -109,16 +112,17 @@ public class MasterBuildAgentTransportCl
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult );
 
         try
         {
             result = master.prepareBuildFinished( prepareBuildResult );
-            log.info( "Prepare build finished." );
+            log.info( "Prepare build finished for project " + projectInfo + "." );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to finish prepare build" );
-            throw new Exception( "Failed to finish prepare build", e );
+            log.error( "Failed to finish prepare build for project " + projectInfo + "." );
+            throw new Exception( "Failed to finish prepare build for project " + projectInfo + ".", e );
         }
 
         return result;
@@ -132,12 +136,12 @@ public class MasterBuildAgentTransportCl
         try
         {
             result = master.startProjectBuild( projectId );
-            log.info( "Return project currently building" );
+            log.info( "Return project currently building, projectId=" + projectId );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to return project currently building", e );
-            throw new Exception( "Failed to return project currently building", e );
+            log.error( "Failed to return project currently building, projectId=" + projectId, e );
+            throw new Exception( "Failed to return project currently building, projectId=" + projectId, e );
         }
 
         return result;
@@ -147,16 +151,17 @@ public class MasterBuildAgentTransportCl
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult );
 
         try
         {
             result = master.startPrepareBuild( prepareBuildResult );
-            log.info( "Started prepare build" );
+            log.info( "Start prepare build for project " + projectInfo );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to start prepare build", e );
-            throw new Exception( "Failed to start prepare build", e );
+            log.error( "Failed to start prepare build for project " + projectInfo, e );
+            throw new Exception( "Failed to start prepare build for project " + projectInfo, e );
         }
 
         return result;
@@ -169,12 +174,14 @@ public class MasterBuildAgentTransportCl
         try
         {
             result = master.getEnvironments( buildDefinitionId, installationType );
-            log.info( "Retrieved environments" );
+            log.info( "Retrieved environments. buildDefinitionId=" + buildDefinitionId + ", installationType=" + installationType );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to retrieve environments", e );
-            throw new Exception( "Failed to retrieve environments", e );
+            log.error( "Failed to retrieve environments. buildDefinitionId=" + buildDefinitionId +
+                       ", installationType=" + installationType, e );
+            throw new Exception( "Failed to retrieve environments. buildDefinitionId=" +
+                                  buildDefinitionId + ", installationType=" + installationType, e );
         }
 
         return result;
@@ -184,16 +191,17 @@ public class MasterBuildAgentTransportCl
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( project );
 
         try
         {
             result = master.updateProject( project );
-            log.info( "Updating project" );
+            log.info( "Updating project " + projectInfo );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to update project", e );
-            throw new Exception( "Failed to update project", e );
+            log.error( "Failed to update project " + projectInfo, e );
+            throw new Exception( "Failed to update project " + projectInfo, e );
         }
 
         return result;
@@ -203,16 +211,17 @@ public class MasterBuildAgentTransportCl
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( context );
 
         try
         {
             result = master.shouldBuild( context );
-            log.info( "Checking if project should build" );
+            log.info( "Checking if project " + projectInfo + " should build" );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to determine if project should build", e );
-            throw new Exception( "Failed to determine if project should build", e );
+            log.error( "Failed to determine if project " + projectInfo + " should build", e );
+            throw new Exception( "Failed to determine if project " + projectInfo + " should build", e );
         }
 
         return result;

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/pom.xml Thu May  6 09:23:13 2010
@@ -21,7 +21,7 @@ under the License.
   <parent>
     <groupId>org.apache.continuum</groupId>
     <artifactId>continuum-distributed-master</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-distributed-master-server</artifactId>
@@ -38,6 +38,11 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.continuum</groupId>
+      <artifactId>continuum-distributed-commons</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-api</artifactId>
       <exclusions>
         <exclusion>

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java Thu May  6 09:23:13 2010
@@ -21,7 +21,8 @@ package org.apache.continuum.distributed
 
 import java.util.Map;
 
-import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
+import org.apache.continuum.builder.distributed.DistributedBuildService;
+import org.apache.continuum.distributed.commons.utils.ContinuumDistributedUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,18 +34,18 @@ public class MasterBuildAgentTransportSe
 {
     private static final Logger log = LoggerFactory.getLogger( MasterBuildAgentTransportServer.class );
 
-    private final DistributedBuildManager distributedBuildManager;
+    private final DistributedBuildService distributedBuildService;
 
-    public MasterBuildAgentTransportServer( DistributedBuildManager distributedBuildManager )
+    public MasterBuildAgentTransportServer( DistributedBuildService distributedBuildService )
     {
-        this.distributedBuildManager = distributedBuildManager;
+        this.distributedBuildService = distributedBuildService;
     }
 
     public Boolean returnBuildResult( Map<String, Object> buildResult )
         throws Exception
     {
-        log.info( "Build result returned." );
-        distributedBuildManager.updateBuildResult( buildResult );
+        log.info( "Build result returned for project " + ContinuumDistributedUtil.getProjectNameAndId( buildResult ) + "." );
+        distributedBuildService.updateBuildResult( buildResult );
         return Boolean.TRUE;
     }
 
@@ -59,46 +60,46 @@ public class MasterBuildAgentTransportSe
     public Boolean prepareBuildFinished( Map<String, Object> prepareBuildResult )
         throws Exception
     {
-        log.info( "Prepare build finished." );
-        distributedBuildManager.prepareBuildFinished( prepareBuildResult );
+        log.info( "Prepare build finished for project " + ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult ) + "." );
+        distributedBuildService.prepareBuildFinished( prepareBuildResult );
         return Boolean.TRUE;
     }
 
     public Boolean startProjectBuild( Integer projectId )
         throws Exception
     {
-        log.info( "Start project build." );
-        distributedBuildManager.startProjectBuild( projectId );
+        log.info( "Start project '" + projectId + "' build." );
+        distributedBuildService.startProjectBuild( projectId );
         return Boolean.TRUE;
     }
 
     public Boolean startPrepareBuild( Map<String, Object> prepareBuildResult )
         throws Exception
     {
-        log.info( "Start prepare build." );
-        distributedBuildManager.startPrepareBuild( prepareBuildResult );
+        log.info( "Start prepare build of project " + ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult ) + "." );
+        distributedBuildService.startPrepareBuild( prepareBuildResult );
         return Boolean.TRUE;
     }
 
     public Map<String, String> getEnvironments( Integer buildDefinitionId, String installationType )
         throws Exception
     {
-        log.info( "Retrieving environments" );
-        return distributedBuildManager.getEnvironments( buildDefinitionId, installationType );
+        log.info( "Retrieving environments. buildDefinitionId=" + buildDefinitionId + ", installationType=" + installationType );
+        return distributedBuildService.getEnvironments( buildDefinitionId, installationType );
     }
 
     public Boolean updateProject( Map<String, Object> project )
         throws Exception
     {
-        log.info( "Start updating project" );
-        distributedBuildManager.updateProject( project );
+        log.info( "Start updating project " + ContinuumDistributedUtil.getProjectNameAndId( project ) );
+        distributedBuildService.updateProject( project );
         return Boolean.TRUE;
     }
 
     public Boolean shouldBuild( Map<String, Object> context )
         throws Exception
     {
-        log.info( "Checking if project should build" );
-        return distributedBuildManager.shouldBuild( context );
+        log.info( "Checking if project " + ContinuumDistributedUtil.getProjectNameAndId( context ) + " should build" );
+        return distributedBuildService.shouldBuild( context );
     }
 }

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-master/pom.xml Thu May  6 09:23:13 2010
@@ -21,7 +21,7 @@ under the License.
   <parent>
     <artifactId>continuum-distributed</artifactId>
     <groupId>org.apache.continuum</groupId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-distributed-master</artifactId>

Modified: continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/pom.xml?rev=941625&r1=941624&r2=941625&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/pom.xml (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/pom.xml Thu May  6 09:23:13 2010
@@ -21,7 +21,7 @@ under the License.
   <parent>
     <groupId>org.apache.continuum</groupId>
     <artifactId>continuum-distributed-slave</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
+    <version>1.4.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-distributed-slave-api</artifactId>



Mime
View raw message