continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r225216 - in /maven/continuum/branches/trygvis-test: ./ continuum-api/src/main/java/org/apache/maven/continuum/configuration/ continuum-core/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/m...
Date Tue, 26 Jul 2005 01:18:42 GMT
Author: trygvis
Date: Mon Jul 25 18:18:23 2005
New Revision: 225216

URL: http://svn.apache.org/viewcvs?rev=225216&view=rev
Log:
o Creating a experimental branch for me and Jason.

Added:
    maven/continuum/branches/trygvis-test/
      - copied from r225215, maven/continuum/trunk/
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java   (with props)
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java   (with props)
    maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java   (with props)
Modified:
    maven/continuum/branches/trygvis-test/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
    maven/continuum/branches/trygvis-test/continuum-core/pom.xml
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerException.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/ContinuumBuildTrigger.java
    maven/continuum/branches/trygvis-test/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
    maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
    maven/continuum/branches/trygvis-test/continuum-core/src/test/resources/configuration.xml
    maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/continuum.mdo
    maven/continuum/branches/trygvis-test/continuum-plexus-application/src/conf/configuration.xml
    maven/continuum/branches/trygvis-test/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
    maven/continuum/branches/trygvis-test/continuum-web/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProject.java

Modified: maven/continuum/branches/trygvis-test/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java Mon Jul 25 18:18:23 2005
@@ -33,21 +33,23 @@
     //
     // ----------------------------------------------------------------------
 
-    public static final String CONFIGURATION = "configuration";
+    String CONFIGURATION = "configuration";
 
-    public static final String CONFIGURATION_INITIALIZED = "initialized";
+    String CONFIGURATION_INITIALIZED = "initialized";
 
-    public static final String CONFIGURATION_URL = "url";
+    String CONFIGURATION_URL = "url";
 
-    public static final String CONFIGURATION_BUILD_OUTPUT_DIRECTORY = "build-output-directory";
+    String CONFIGURATION_BUILD_OUTPUT_DIRECTORY = "build-output-directory";
 
-    public static final String CONFIGURATION_JDKS = "jdks";
+    String CONFIGURATION_WORKING_DIRECTORY = "working-directory";
 
-    public static final String CONFIGURATION_JDK = "jdk";
+    String CONFIGURATION_JDKS = "jdks";
 
-    public static final String CONFIGURATION_JDK_VERSION = "jdk-version";
+    String CONFIGURATION_JDK = "jdk";
 
-    public static final String CONFIGURATION_JDK_HOME = "jdk-home";
+    String CONFIGURATION_JDK_VERSION = "jdk-version";
+
+    String CONFIGURATION_JDK_HOME = "jdk-home";
 
     // ----------------------------------------------------------------------
     //
@@ -64,6 +66,10 @@
     File getBuildOutputDirectory();
 
     void setBuildOutputDirectory( File buildOutputDirectory );
+
+    File getWorkingDirectory();
+
+    void setWorkingDirectory( File workingDirectory );
 
     Map getJdks();
 

Modified: maven/continuum/branches/trygvis-test/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/pom.xml?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/pom.xml (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/pom.xml Mon Jul 25 18:18:23 2005
@@ -155,6 +155,18 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>postgresql</groupId>
+      <artifactId>postgresql</artifactId>
+      <version>7.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.incubator.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.0.2.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>xml-apis</groupId>
       <artifactId>xml-apis</artifactId>
       <version>2.0.2</version>

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Mon Jul 25 18:18:23 2005
@@ -88,11 +88,6 @@
     /**
      * @plexus.requirement
      */
-    //private ContinuumCore core;
-
-    /**
-     * @plexus.requirement
-     */
     private ActionManager actionManager;
 
     /**
@@ -358,7 +353,8 @@
             }
             catch ( ContinuumException ex )
             {
-                getLogger().error( "Could not enqueue project: " + project.getId() + " ('" + project.getName() + "').", ex );
+                getLogger().error( "Could not enqueue project: " + project.getId() + " " +
+                                   "('" + project.getName() + "').", ex );
             }
         }
     }
@@ -596,36 +592,55 @@
         // will go into the first project group in the list.
         // ----------------------------------------------------------------------
 
-        ContinuumProjectGroup projectGroup = null;
-
-        for ( Iterator it = result.getProjectGroups().iterator(); it.hasNext(); )
+        if ( result.getProjectGroups().size() != 1 )
         {
-            projectGroup = (ContinuumProjectGroup) it.next();
+            throw new ContinuumException( "The project building result has to contain exactly one project group." );
+        }
 
+        ContinuumProjectGroup projectGroup = (ContinuumProjectGroup) result.getProjectGroups().iterator().next();
+
+        try
+        {
             try
             {
-                try
-                {
-                    projectGroup = store.getProjectGroupByGroupId( projectGroup.getGroupId() );
-                }
-                catch ( ContinuumObjectNotFoundException e )
-                {
-                    Map pgContext = new HashMap();
+                projectGroup = store.getProjectGroupByGroupId( projectGroup.getGroupId() );
 
-                    pgContext.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, getWorkingDirectory() );                    
+                getLogger().info( "Using existing project group with the group id: '" + projectGroup.getGroupId() + "'." );
+            }
+            catch ( ContinuumObjectNotFoundException e )
+            {
+                getLogger().info("Creating project group with the group id: '" + projectGroup.getGroupId() + "'." );
 
-                    pgContext.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT_GROUP, projectGroup );
+                Map pgContext = new HashMap();
 
-                    executeAction( "validate-project-group", pgContext );
+                pgContext.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, getWorkingDirectory() );
 
-                    executeAction( "store-project-group", pgContext );
-                }
-            }
-            catch ( ContinuumStoreException e )
-            {
-                throw new ContinuumException( "Error while querying for project group.", e );
+                pgContext.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT_GROUP, projectGroup );
+
+                executeAction( "validate-project-group", pgContext );
+
+                executeAction( "store-project-group", pgContext );
+
+                String projectGroupId = AbstractContinuumAction.getProjectGroupId( pgContext );
+
+                projectGroup = store.getProjectGroup( projectGroupId );
             }
         }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error while querying for project group.", e );
+        }
+
+//        try
+//        {
+//            projectGroup = store.getProjectGroup( projectGroup.getId() );
+//        }
+//        catch ( ContinuumStoreException e )
+//        {
+//            throw new ContinuumException( "Error while querying for project group.", e );
+//        }
+
+        projectGroup.getProjects();
 
         // ----------------------------------------------------------------------
         // Save all the projects
@@ -640,7 +655,7 @@
 
             project.setExecutorId( buildExecutorId );
 
-            project.setProjectGroup( projectGroup );
+            projectGroup.addProject( project );
 
             context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
 
@@ -1044,7 +1059,6 @@
     }
 
     private void startMessage()
-        throws StartingException
     {
         getLogger().info( "Starting Continuum." );
 

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Mon Jul 25 18:18:23 2005
@@ -26,6 +26,7 @@
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ContinuumUtils;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
@@ -51,6 +52,9 @@
     /** @plexus.requirement */
     private ActionManager actionManager;
 
+    /** @plexus.requirement */
+    private WorkingDirectoryService workingDirectoryService;
+
     // ----------------------------------------------------------------------
     // BuildController Implementation
     // ----------------------------------------------------------------------
@@ -87,10 +91,6 @@
         // methods, even in a case of failure.
         // ----------------------------------------------------------------------
 
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
         try
         {
             notifierDispatcher.buildStarted( project );
@@ -117,7 +117,8 @@
                 }
                 else
                 {
-                    actionContext.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY, project.getWorkingDirectory() );
+                    actionContext.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY,
+                                       workingDirectoryService.getWorkingDirectory( project ) );
 
                     actionManager.lookup( "checkout-project" ).execute( actionContext );
 

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java Mon Jul 25 18:18:23 2005
@@ -56,6 +56,8 @@
 
     private File buildOutputDirectory;
 
+    private File workingDirectory;
+
     private Map jdks;
 
     private static final String LS = System.getProperty( "line.separator" );
@@ -96,6 +98,16 @@
         this.buildOutputDirectory = buildOutputDirectory;
     }
 
+    public File getWorkingDirectory()
+    {
+        return workingDirectory;
+    }
+
+    public void setWorkingDirectory( File workingDirectory )
+    {
+        this.workingDirectory = workingDirectory;
+    }
+
     public Map getJdks()
     {
         return jdks;
@@ -139,14 +151,7 @@
         {
             String booleanString = initializedDom.getValue();
 
-            if ( booleanString.equals( "true" ) || booleanString.equals( "1" ) )
-            {
-                initialized = true;
-            }
-            else
-            {
-                initialized = false;
-            }
+            initialized = booleanString.equals( "true" ) || booleanString.equals( "1" );
         }
 
         Xpp3Dom urlDom = configuration.getChild( CONFIGURATION_URL );
@@ -163,6 +168,8 @@
             buildOutputDirectory = getFile( configuration, CONFIGURATION_BUILD_OUTPUT_DIRECTORY );
         }
 
+        workingDirectory = getFile( configuration, CONFIGURATION_WORKING_DIRECTORY );
+
         Xpp3Dom jdksElement = configuration.getChild( CONFIGURATION_JDKS );
 
         if ( jdksElement != null )
@@ -196,7 +203,14 @@
     private File getFile( Xpp3Dom configuration, String elementName )
         throws ConfigurationLoadingException
     {
-        String value = configuration.getChild( elementName ).getValue();
+        Xpp3Dom element = configuration.getChild( elementName );
+
+        if ( element == null )
+        {
+            throw new ConfigurationLoadingException( "Missing required element '" + elementName + "'." );
+        }
+
+        String value = element.getValue();
 
         if ( StringUtils.isEmpty( value ) )
         {
@@ -217,10 +231,6 @@
     {
         configuration = new Xpp3Dom( CONFIGURATION );
 
-        System.out.println( "initialized = " + initialized );
-
-        System.out.println( ">>>>>>>>>>>>>>>>>>> Boolean.toString( initialized ) = " + Boolean.toString( initialized ) );
-
         configuration.addChild( createDom( CONFIGURATION_INITIALIZED, Boolean.toString( initialized ) ) );
 
         if ( url != null )
@@ -231,6 +241,11 @@
         if ( buildOutputDirectory != null )
         {
             configuration.addChild( createFileDom( CONFIGURATION_BUILD_OUTPUT_DIRECTORY, buildOutputDirectory ) );
+        }
+
+        if ( workingDirectory != null )
+        {
+            configuration.addChild( createFileDom( CONFIGURATION_WORKING_DIRECTORY, workingDirectory ) );
         }
 
         if ( jdks != null )

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Mon Jul 25 18:18:23 2005
@@ -83,6 +83,11 @@
         return getString( context, KEY_PROJECT_ID );
     }
 
+    public static String getProjectGroupId( Map context )
+    {
+        return getString( context, KEY_PROJECT_GROUP_ID );
+    }
+
     public static String getBuildId( Map context )
     {
         return getString( context, KEY_BUILD_ID );

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Mon Jul 25 18:18:23 2005
@@ -18,10 +18,10 @@
 
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
-import java.io.File;
 import java.util.Map;
 
 /**
@@ -31,6 +31,9 @@
 public class AddProjectToCheckOutQueueAction
     extends AbstractContinuumAction
 {
+    /** @plexus.requirement */
+    private WorkingDirectoryService workingDirectoryService;
+
     private TaskQueue checkOutQueue;
 
     private ContinuumStore store;
@@ -40,7 +43,8 @@
     {
         ContinuumProject project = store.getProject( getProjectId( context ) );
 
-        CheckOutTask checkOutTask = new CheckOutTask( project.getId(), new File( project.getWorkingDirectory() ) );
+        CheckOutTask checkOutTask = new CheckOutTask( project.getId(),
+                                                      workingDirectoryService.getWorkingDirectory( project ) );
 
         checkOutQueue.put( checkOutTask );
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Mon Jul 25 18:18:23 2005
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.io.File;
@@ -29,6 +30,14 @@
 public class CheckWorkingDirectoryAction
     extends AbstractContinuumAction
 {
+    /**
+     * @plexus.requirement *
+     */
+    private WorkingDirectoryService workingDirectoryService;
+
+    /**
+     * @plexus.requirement *
+     */
     private ContinuumStore store;
 
     public void execute( Map context )
@@ -36,7 +45,7 @@
     {
         ContinuumProject project = store.getProject( getProjectId( context ) );
 
-        File workingDirectory = new File( project.getWorkingDirectory() );
+        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 
         if ( !workingDirectory.exists() )
         {

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java Mon Jul 25 18:18:23 2005
@@ -22,7 +22,6 @@
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
 import java.util.Map;
 
 /**
@@ -50,7 +49,7 @@
         // ----------------------------------------------------------------------
         // Set the working directory
         // ----------------------------------------------------------------------
-
+/*
         File projectWorkingDirectory = new File( getWorkingDirectory( context ), project.getId() );
 
         if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
@@ -63,9 +62,9 @@
         // figure out what it is.
 
         project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
-
+*/
         project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
 
-        project = store.updateProject( project );
+        store.updateProject( project );
     }
 }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java Mon Jul 25 18:18:23 2005
@@ -47,8 +47,6 @@
 
         projectGroup.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
 
-        projectGroup = store.updateProjectGroup( projectGroup );
-
-        context.put( KEY_UNVALIDATED_PROJECT_GROUP, projectGroup );
+        store.updateProjectGroup( projectGroup );
     }
 }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java Mon Jul 25 18:18:23 2005
@@ -22,9 +22,9 @@
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.continuum.store.ContinuumStore;
 
-import java.io.File;
 import java.util.Map;
 
 /**
@@ -34,6 +34,9 @@
 public class UpdateProjectFromWorkingDirectoryContinuumAction
     extends AbstractContinuumAction
 {
+    /** @plexus.requirement */
+    private WorkingDirectoryService workingDirectoryService;
+
     private BuildExecutorManager buildExecutorManager;
 
     private ContinuumStore store;
@@ -51,7 +54,8 @@
 
         ContinuumBuildExecutor builder = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
 
-        builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
+        builder.updateProjectFromCheckOut( workingDirectoryService.getWorkingDirectory( project ),
+                                           project );
 
         // ----------------------------------------------------------------------
         // Store the new descriptor

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java Mon Jul 25 18:18:23 2005
@@ -64,7 +64,11 @@
 //        assertStringNotEmpty( project.getPath(), "path" );
 //        assertStringNotEmpty( project.getGroupId(), "group id" );
 //        assertStringNotEmpty( project.getArtifactId(), "artifact id" );
-        // TODO: check for project group
+
+//        if ( project.getProjectGroup() == null )
+//        {
+//            throw new ContinuumException( "A project has to belong to a project group." );
+//        }
 
         // TODO: validate that the SCM provider id
 

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java Mon Jul 25 18:18:23 2005
@@ -18,6 +18,8 @@
 
 import org.apache.maven.continuum.utils.shell.ExecutionResult;
 import org.apache.maven.continuum.utils.shell.ShellCommandHelper;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
+import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.commandline.ExecutableResolver;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -51,6 +53,11 @@
     private ExecutableResolver executableResolver;
 
     /**
+     * @plexus.requirement
+     * */
+    private WorkingDirectoryService workingDirectoryService;
+
+    /**
      * @plexus.configuration
      */
     private String defaultExecutable;
@@ -112,7 +119,7 @@
     //
     // ----------------------------------------------------------------------
 
-    protected ContinuumBuildExecutionResult executeShellCommand( File workingDirectory,
+    protected ContinuumBuildExecutionResult executeShellCommand( ContinuumProject project,
                                                                  String executable,
                                                                  String arguments )
         throws ContinuumBuildExecutorException
@@ -124,6 +131,8 @@
         // ----------------------------------------------------------------------
 
         String actualExecutable;
+
+        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 
         if ( !resolveExecutable )
         {

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java Mon Jul 25 18:18:23 2005
@@ -62,14 +62,12 @@
     {
         AntProject project = (AntProject) p;
 
-        File workingDirectory = new File( project.getWorkingDirectory() );
-
         String executable = project.getExecutable();
 
         String arguments = StringUtils.clean( project.getCommandLineArguments() ) + " " +
                            StringUtils.clean( project.getTargets() );
 
-        return executeShellCommand( workingDirectory,
+        return executeShellCommand( project,
                                     executable,
                                     arguments );
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java Mon Jul 25 18:18:23 2005
@@ -59,12 +59,10 @@
     {
         MavenOneProject project = (MavenOneProject) p;
 
-        File workingDirectory = new File( project.getWorkingDirectory() );
-
         String commandLine = StringUtils.clean( project.getCommandLineArguments() ) + " " +
                              StringUtils.clean( project.getGoals() );
 
-        return executeShellCommand( workingDirectory, 
+        return executeShellCommand( project,
                                     null,
                                     commandLine );
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java Mon Jul 25 18:18:23 2005
@@ -38,9 +38,9 @@
     //
     // ----------------------------------------------------------------------
 
-    public final static String CONFIGURATION_GOALS = "goals";
+    public static final String CONFIGURATION_GOALS = "goals";
 
-    public final static String ID = "maven2";
+    public static final String ID = "maven2";
 
     // ----------------------------------------------------------------------
     //
@@ -67,12 +67,10 @@
     {
         MavenTwoProject project = (MavenTwoProject) p;
 
-        File workingDirectory = new File( project.getWorkingDirectory() );
-
         String arguments = StringUtils.clean( project.getCommandLineArguments() ) + " " +
                            StringUtils.clean( project.getGoals() );
 
-        return executeShellCommand( workingDirectory,
+        return executeShellCommand( project,
                                     null,
                                     arguments );
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java Mon Jul 25 18:18:23 2005
@@ -39,7 +39,7 @@
 
     public static final String CONFIGURATION_EXECUTABLE = "executable";
 
-    public final static String ID = "shell";
+    public static final String ID = "shell";
 
     // ----------------------------------------------------------------------
     //
@@ -59,11 +59,9 @@
     {
         ShellProject project = (ShellProject) p;
 
-        File workingDirectory = new File( project.getWorkingDirectory() );
-
         String executable = project.getExecutable();
 
-        return executeShellCommand( workingDirectory,
+        return executeShellCommand( project,
                                     executable,
                                     project.getCommandLineArguments() );
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java Mon Jul 25 18:18:23 2005
@@ -20,6 +20,7 @@
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelperException;
 import org.apache.maven.continuum.project.MavenOneProject;
+import org.apache.maven.continuum.project.ContinuumProjectGroup;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -64,9 +65,11 @@
             return result;
         }
 
+        MavenOneProject project;
+
         try
         {
-            MavenOneProject project = new MavenOneProject();
+            project = new MavenOneProject();
 
             metadataHelper.mapMetadata( pomFile, project );
 
@@ -76,6 +79,18 @@
         {
             result.addWarning( e.getMessage() );
         }
+
+        // ----------------------------------------------------------------------
+        // This is a hack.
+        // ----------------------------------------------------------------------
+
+        ContinuumProjectGroup projectGroup = new ContinuumProjectGroup();
+
+        projectGroup.setName( "Maven 1 group" );
+
+        projectGroup.setGroupId( "dummy" );
+
+        result.addProjectGroup( projectGroup );
 
         return result;
     }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerException.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerException.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerException.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerException.java Mon Jul 25 18:18:23 2005
@@ -2,7 +2,7 @@
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id:$
+ * @version $Id$
  */
 public class ContinuumSchedulerException
     extends Exception

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java Mon Jul 25 18:18:23 2005
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
@@ -39,9 +40,16 @@
     extends AbstractLogEnabled
     implements ContinuumScm
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private ScmManager scmManager;
 
+    /**
+     * @plexus.requirement
+     */
+    private WorkingDirectoryService workingDirectoryService;
+
     // ----------------------------------------------------------------------
     // ContinuumScm implementation
     // ----------------------------------------------------------------------
@@ -121,14 +129,14 @@
     public ScmResult checkOutProject( ContinuumProject project )
         throws ContinuumScmException
     {
-        String workingDirectory = project.getWorkingDirectory();
+        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 
         if ( workingDirectory == null )
         {
             throw new ContinuumScmException( "The working directory for the project has to be set. Project: '" + project.getName() + "', id: '" + project.getId() + "'.");
         }
 
-        return checkOut( project, new File( workingDirectory ) );
+        return checkOut( project, workingDirectory );
     }
 
     public ScmResult updateProject( ContinuumProject project )
@@ -138,11 +146,12 @@
         {
             getLogger().info( "Updating project: id: '" + project.getId() + "', name '" + project.getName() + "'." );
 
-            File workingDirectory = new File( project.getWorkingDirectory() );
+            File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 
             if ( !workingDirectory.exists() )
             {
-                throw new ContinuumScmException( "The working directory for the project doesn't exist (" + project.getWorkingDirectory() + ")." );
+                throw new ContinuumScmException( "The working directory for the project doesn't exist " +
+                                                 "(" + workingDirectory.getAbsolutePath() + ")." );
             }
 
             ScmRepository repository = scmManager.makeScmRepository( project.getScmUrl() );

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java Mon Jul 25 18:18:23 2005
@@ -29,6 +29,10 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
 import javax.jdo.Extent;
 import javax.jdo.JDOObjectNotFoundException;
 import javax.jdo.JDOUserException;
@@ -36,10 +40,6 @@
 import javax.jdo.PersistenceManagerFactory;
 import javax.jdo.Query;
 import javax.jdo.Transaction;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -1104,10 +1104,18 @@
         {
             tx.begin();
 
+            // ----------------------------------------------------------------------
+            // Store the object
+            // ----------------------------------------------------------------------
+
             pm.makePersistent( object );
 
             Object id = pm.getObjectId( object );
 
+            // ----------------------------------------------------------------------
+            // Fetch the object again and return it
+            // ----------------------------------------------------------------------
+
             pm.getFetchPlan().addGroup( detailedFetchGroup );
 
             Object addedObject = pm.getObjectById( id );
@@ -1195,8 +1203,6 @@
 
             query.setFilter( "this." + idField + " == " + idField );
 
-            query.getFetchPlan().addGroup( fetchGroup );
-
             Collection result = (Collection) query.execute( id );
 
             if ( result.size() == 0 )
@@ -1210,6 +1216,8 @@
                                                    "type " + clazz.getName() + " on the " +
                                                    "field '" + idField + "' returned more than one object." );
             }
+
+            pm.getFetchPlan().addGroup( fetchGroup );
 
             Object object = pm.detachCopy( result.iterator().next() );
 

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/ContinuumBuildTrigger.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/ContinuumBuildTrigger.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/ContinuumBuildTrigger.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/ContinuumBuildTrigger.java Mon Jul 25 18:18:23 2005
@@ -4,7 +4,7 @@
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id:$
+ * @version $Id$
  */
 public class ContinuumBuildTrigger
     extends SimpleTrigger

Added: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java?rev=225216&view=auto
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java (added)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java Mon Jul 25 18:18:23 2005
@@ -0,0 +1,59 @@
+package org.apache.maven.continuum.utils;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.configuration.ConfigurationService;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultWorkingDirectoryService
+    extends AbstractLogEnabled
+    implements WorkingDirectoryService
+{
+    /**
+     * @plexus.requirement
+     */
+    private ContinuumStore store;
+
+    /**
+     * @plexus.requirement
+     */
+    private ConfigurationService configurationService;
+
+    // ----------------------------------------------------------------------
+    // WorkingDirectoryService Implementation
+    // ----------------------------------------------------------------------
+
+    public File getWorkingDirectory( ContinuumProject project )
+    {
+//        TODO: Enable, this is what we really want
+//        ContinuumProjectGroup projectGroup = project.getProjectGroup();
+//
+//        return new File( projectGroup.getWorkingDirectory(),
+//                         project.getPath() );
+
+        return new File( configurationService.getWorkingDirectory(),
+                         project.getId() );
+    }
+}

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java?rev=225216&view=auto
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java (added)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java Mon Jul 25 18:18:23 2005
@@ -0,0 +1,32 @@
+package org.apache.maven.continuum.utils;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.project.ContinuumProject;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface WorkingDirectoryService
+{
+    String ROLE = WorkingDirectoryService.class.getName();
+
+    File getWorkingDirectory( ContinuumProject project );
+}

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/main/resources/META-INF/plexus/components.xml Mon Jul 25 18:18:23 2005
@@ -103,6 +103,9 @@
         <requirement>
           <role>org.codehaus.plexus.action.ActionManager</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -129,6 +132,9 @@
         <requirement>
           <role>org.codehaus.plexus.scm.ScmManager</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -145,9 +151,22 @@
       </requirements>
     </component>
 
+    <component>
+      <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+      <implementation>org.apache.maven.continuum.utils.DefaultWorkingDirectoryService</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
+        </requirement>
+      </requirements>
+    </component>
+
     <!-- TODO: Remove these two once the plexus bug where plexus would pick
-         the first component with role hint if no component without a role hint exists
-         and was looked up -->
+the first component with role hint if no component without a role hint exists
+and was looked up -->
     <component>
       <role>ContinuumStore</role>
       <role-hint>modello</role-hint>
@@ -246,6 +265,9 @@
         <requirement>
           <role>org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -289,6 +311,9 @@
         <requirement>
           <role>org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -313,6 +338,9 @@
         <requirement>
           <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
       <configuration>
         <default-executable>ant</default-executable>
@@ -330,6 +358,9 @@
         <requirement>
           <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
 
@@ -487,20 +518,51 @@
             <name>javax.jdo.PersistenceManagerFactoryClass</name>
             <value>org.jpox.PersistenceManagerFactoryImpl</value>
           </property>
+          <!-- HSQL DB Configuration -->
           <property>
             <name>javax.jdo.option.ConnectionDriverName</name>
             <value>org.hsqldb.jdbcDriver</value>
           </property>
           <property>
             <name>javax.jdo.option.ConnectionURL</name>
-            <!--
-            -->
-            <value>jdbc:hsqldb:.</value>
+            <value>jdbc:hsqldb:${plexus.home}/continuum-database</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionUserName</name>
+            <value>sa</value>
+          </property>
+          <!--
+          -->
+          <!-- Postgresql Configuration -->
+          <!--
+          <property>
+            <name>javax.jdo.option.ConnectionDriverName</name>
+            <value>org.postgresql.Driver</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionURL</name>
+            <value>jdbc:postgresql://localhost/continuum</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionUserName</name>
+            <value>trygvis</value>
+          </property>
+          -->
+          <!-- Apache Derby Configuration -->
+          <!--
+          <property>
+            <name>javax.jdo.option.ConnectionDriverName</name>
+            <value>org.apache.derby.jdbc.EmbeddedDriver</value>
+          </property>
+          <property>
+            <name>javax.jdo.option.ConnectionURL</name>
+            <value>jdbc:derby:faen;create=true</value>
           </property>
           <property>
             <name>javax.jdo.option.ConnectionUserName</name>
             <value>sa</value>
           </property>
+          -->
           <property>
             <name>javax.jdo.option.ConnectionPassword</name>
             <value></value>
@@ -511,6 +573,7 @@
            | unit tests. When running with Continuum in a production enviroment
            | READ_COMMITTED should be used.
            |-->
+<!--
           <property>
             <name>org.jpox.transactionIsolation</name>
             <value>READ_UNCOMMITTED</value>
@@ -519,6 +582,7 @@
             <name>org.jpox.poid.transactionIsolation</name>
             <value>READ_UNCOMMITTED</value>
           </property>
+-->
           <property>
             <name>org.jpox.autoCreateSchema</name>
             <value>true</value>
@@ -579,6 +643,9 @@
         <requirement>
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
     <component>
@@ -602,6 +669,9 @@
         <requirement>
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
     <component>
@@ -699,8 +769,7 @@
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-project-from-working-directory</role-hint>
-      <implementation>
-        org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
+      <implementation>org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
@@ -708,6 +777,9 @@
         <requirement>
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
     <component>
@@ -721,8 +793,12 @@
         <requirement>
           <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.utils.WorkingDirectoryService</role>
+        </requirement>
       </requirements>
     </component>
+
     <!--
      |
      | Scheduler
@@ -761,7 +837,6 @@
         </properties>
       </configuration>
     </component>
-
 
   </components>
 </component-set>

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java Mon Jul 25 18:18:23 2005
@@ -53,6 +53,8 @@
 
         assertEquals( "build-output", service.getBuildOutputDirectory().getName() );
 
+        assertEquals( "working-directory", service.getWorkingDirectory().getName() );
+
         ContinuumJdk jdk = new ContinuumJdk();
 
         jdk.setVersion( "1.3" );
@@ -100,6 +102,5 @@
         jdk = (ContinuumJdk) jdks.get( "1.5" );
 
         assertEquals( "/jdks/1.5", jdk.getHome() );
-
     }
 }

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java Mon Jul 25 18:18:23 2005
@@ -1,5 +1,21 @@
 package org.apache.maven.continuum.store;
 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -7,7 +23,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.Set;
 
 import org.apache.maven.continuum.AbstractContinuumTest;
@@ -20,6 +35,7 @@
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ContinuumSchedule;
+import org.apache.maven.continuum.project.ContinuumProjectGroup;
 import org.apache.maven.continuum.scm.ScmFile;
 import org.apache.maven.continuum.scm.ScmResult;
 
@@ -69,21 +85,49 @@
     public void testAddProject()
         throws Exception
     {
-        Properties configuration = new Properties();
+        MavenTwoProject expected = makeMavenTwoProject( "Test Project",
+                                                        "foo@bar.com",
+                                                        "1.0",
+                                                        "a b" );
+
+        ContinuumProject actual = store.addProject( expected );
+
+        assertNotNull( "The project added is null", actual );
+
+        assertNotNull( "The project id is null.", actual.getId() );
+
+        assertProjectEquals( makeMavenTwoProject( "Test Project",
+                                                  "foo@bar.com",
+                                                  "1.0",
+                                                  "a b" ),
+                                actual );
+    }
+
+    public void testAddProjectWithProjectGroup()
+        throws Exception
+    {
+        ContinuumProjectGroup projectGroup = createStubProjectGroup( "name", "description" );
+
+        MavenTwoProject expected = makeMavenTwoProject( "Test Project",
+                                                        "foo@bar.com",
+                                                        "1.0",
+                                                        "a b" );
 
-        configuration.setProperty( "foo", "bar" );
+        expected.setProjectGroup( projectGroup );
 
-        ContinuumProject actual = store.addProject( makeMavenTwoProject( "Test Project",
-                                                                         "foo@bar.com",
-                                                                         "1.0",
-                                                                         "a b" ) );
+        ContinuumProject actual = store.addProject( expected );
+
+        assertNotNull( "The project added is null", actual );
 
         assertNotNull( "The project id is null.", actual.getId() );
 
+        assertNotNull( "The project group is null.", actual.getProjectGroup() );
+
         assertProjectEquals( makeMavenTwoProject( "Test Project",
                                                   "foo@bar.com",
                                                   "1.0",
-                                                  "a b" ), actual );
+                                                  "a b" ),
+                             actual );
     }
 
     public void testGetNonExistingProject()
@@ -225,11 +269,6 @@
         {
             // expected
         }
-        // TODO: Remove me when the generated stuff throws a better exception when the object is missing
-        catch ( ContinuumStoreException ex )
-        {
-            // expected
-        }
     }
 
     public void testGetAllProjects()
@@ -291,7 +330,13 @@
     public void testRemoveProject()
         throws Exception
     {
-        ContinuumProject project = addMavenTwoProject( store, "Remove Test Project" );
+//        ContinuumProject project = addMavenTwoProject( store,
+//                                                       "Remove Test Project" );
+        ContinuumProject project = addMavenTwoProject( store,
+                                                       "name1",
+                                                       "nagEmailAddress1",
+                                                       "version1",
+                                                       "commandLineArguments1" );
 
         ContinuumBuild build = createBuild( store, project.getId(), false );
 
@@ -323,8 +368,15 @@
     public void testGetLatestBuildForProject()
         throws Exception
     {
-        String projectId = addMavenTwoProject( store,
-                                               makeStubMavenTwoProject( "Last project" ) ).getId();
+//        String projectId = addMavenTwoProject( store,
+//                                               makeStubMavenTwoProject( "Last project" ) ).getId();
+        ContinuumProject project = addMavenTwoProject( store,
+                                                       "name1",
+                                                       "nagEmailAddress1",
+                                                       "version1",
+                                                       "commandLineArguments1" );
+
+        String projectId = project.getId();
 
         assertNull( store.getLatestBuildForProject( projectId ) );
 
@@ -346,9 +398,14 @@
     public void testUpdateMavenTwoProject()
         throws Exception
     {
-        String projectId = addMavenTwoProject( store, "Maven Two Project" ).getId();
+//        ContinuumProject project = addMavenTwoProject( store, "Maven Two Project" );
+        MavenTwoProject project = addMavenTwoProject( store,
+                                                       "name1",
+                                                       "nagEmailAddress1",
+                                                       "version1",
+                                                       "commandLineArguments1" );
 
-        MavenTwoProject project = (MavenTwoProject) store.getProject( projectId );
+        String projectId = project.getId();
 
         project.setName( "New name" );
         project.setGoals( "clean test" );
@@ -357,6 +414,7 @@
 
         project = (MavenTwoProject) store.getProject( projectId );
 
+
         assertEquals( "New name", project.getName() );
         assertEquals( "clean test", project.getGoals() );
     }
@@ -407,7 +465,12 @@
     {
         lookup( JdoFactory.ROLE );
 
-        String projectId = addMavenTwoProject( store, "Build Test Project" ).getId();
+//        String projectId = addMavenTwoProject( store, "Build Test Project" ).getId();
+        String projectId = addMavenTwoProject( store,
+                                               "name1",
+                                               "nagEmailAddress1",
+                                               "version1",
+                                               "commandLineArguments1" ).getId();
 
         // ----------------------------------------------------------------------
         // Construct a build object
@@ -477,11 +540,26 @@
         // Set up projects
         // ----------------------------------------------------------------------
 
-        String projectId = addMavenTwoProject( store, "Association Test Project" ).getId();
-
-        String projectIdFoo = addMavenTwoProject( store, "Foo Project" ).getId();
-
-        String projectIdBar = addMavenTwoProject( store, "Bar Project" ).getId();
+//        String projectId = addMavenTwoProject( store, "Association Test Project" ).getId();
+        String projectId = addMavenTwoProject( store,
+                                               "Association Test Project",
+                                               "nagEmailAddress1",
+                                               "version1",
+                                               "commandLineArguments1" ).getId();
+
+//        String projectIdFoo = addMavenTwoProject( store, "Foo Project" ).getId();
+        String projectIdFoo = addMavenTwoProject( store,
+                                                  "Foo Project",
+                                                  "nagEmailAddress1",
+                                                  "version1",
+                                                  "commandLineArguments1" ).getId();
+
+//        String projectIdBar = addMavenTwoProject( store, "Bar Project" ).getId();
+        String projectIdBar = addMavenTwoProject( store,
+                                                  "Bar Project",
+                                                  "nagEmailAddress1",
+                                                  "version1",
+                                                  "commandLineArguments1" ).getId();
 
         // ----------------------------------------------------------------------
         //
@@ -493,6 +571,7 @@
         {
             expectedBuilds.add( createBuild( store, projectId, false ).getId() );
 
+
             createBuild( store, projectIdFoo, false );
 
             createBuild( store, projectIdBar, false );
@@ -533,7 +612,12 @@
     public void testGetLatestBuild()
         throws Exception
     {
-        String projectId = addMavenTwoProject( store, "Association Test Project" ).getId();
+//        String projectId = addMavenTwoProject( store, "Association Test Project" ).getId();
+        String projectId = addMavenTwoProject( store,
+                                               "name1",
+                                               "nagEmailAddress1",
+                                               "version1",
+                                               "commandLineArguments1" ).getId();
 
         int size = 10;
 
@@ -570,7 +654,12 @@
         //
         // ----------------------------------------------------------------------
 
-        String projectId = addMavenTwoProject( store, "Build Result Project" ).getId();
+//        String projectId = addMavenTwoProject( store, "Build Result Project" ).getId();
+        String projectId = addMavenTwoProject( store,
+                                               "name1",
+                                               "nagEmailAddress1",
+                                               "version1",
+                                               "commandLineArguments1" ).getId();
 
         long now = System.currentTimeMillis();
 
@@ -660,7 +749,12 @@
         throws Exception
     {
         // create project
-        ContinuumProject project = addMavenTwoProject( store, "Project Scheduling" );
+//        ContinuumProject project = addMavenTwoProject( store, "Project Scheduling" );
+        ContinuumProject project = addMavenTwoProject( store,
+                                                       "Project Scheduling",
+                                                       "nagEmailAddress1",
+                                                       "version1",
+                                                       "commandLineArguments1" );
 
         String projectId = project.getId();
 
@@ -741,7 +835,12 @@
 
         schedule = store.addSchedule( schedule );
 
-        ContinuumProject project = addMavenTwoProject( store, "Project" );
+//        ContinuumProject project = addMavenTwoProject( store, "Project" );
+        ContinuumProject project = addMavenTwoProject( store,
+                                                       "Project Schedule Test Project",
+                                                       "nagEmailAddress1",
+                                                       "version1",
+                                                       "commandLineArguments1" );
 
         // add project
         schedule.addProject( project );
@@ -760,7 +859,7 @@
         project = (ContinuumProject) schedule.getProjects().iterator().next();
 
         // test values within project
-        assertEquals( "Project", project.getName() );
+        assertEquals( "Project Schedule Test Project", project.getName() );
 
         // ----------------------------------------------------------------------
         // Now lookup the project on its own and make sure the schedule is

Added: maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java?rev=225216&view=auto
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java (added)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java Mon Jul 25 18:18:23 2005
@@ -0,0 +1,42 @@
+package org.apache.maven.continuum.utils;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.AbstractContinuumTest;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class WorkingDirectoryServiceTest
+    extends AbstractContinuumTest
+{
+    public void testBasic()
+        throws Exception
+    {
+//        WorkingDirectoryService workingDirectoryService =
+//            (WorkingDirectoryService) lookup( WorkingDirectoryService.ROLE );
+//
+//        ContinuumProject project = addMavenTwoProject( getStore(), "Foo" );
+//
+//        assertNotNull( project.getProjectGroup() );
+//
+//        File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
+//
+//        assertTrue( workingDirectory.isAbsolute() );
+    }
+}

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/trygvis-test/continuum-core/src/test/java/org/apache/maven/continuum/utils/WorkingDirectoryServiceTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: maven/continuum/branches/trygvis-test/continuum-core/src/test/resources/configuration.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-core/src/test/resources/configuration.xml?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-core/src/test/resources/configuration.xml (original)
+++ maven/continuum/branches/trygvis-test/continuum-core/src/test/resources/configuration.xml Mon Jul 25 18:18:23 2005
@@ -1,4 +1,5 @@
 <configuration>
   <url>http://localhost:8080/continuum/servlet/continuum</url>
   <build-output-directory>build-output</build-output-directory>
+  <working-directory>working-directory</working-directory>
 </configuration>

Modified: maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/META-INF/package.jdo
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/META-INF/package.jdo?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/META-INF/package.jdo (original)
+++ maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/META-INF/package.jdo Mon Jul 25 18:18:23 2005
@@ -11,16 +11,13 @@
       <field name="name" persistence-modifier="persistent"/>
       <field name="scmUrl" persistence-modifier="persistent"/>
       <field name="version" persistence-modifier="persistent"/>
-      <field name="workingDirectory" persistence-modifier="persistent"/>
-<!--
       <field name="path" persistence-modifier="persistent"/>
--->
       <field name="state" persistence-modifier="none"/>
       <field name="executorId" persistence-modifier="persistent"/>
       <field name="latestBuildId" persistence-modifier="persistent"/>
       <field name="previousBuildId" persistence-modifier="persistent"/>
       <field name="buildNumber" persistence-modifier="persistent"/>
-      <field name="scmResult" persistence-modifier="persistent" dependent="true"/>
+      <field name="scmResult" persistence-modifier="persistent" default-fetch-group="true" dependent="true"/>
       <field name="checkOutErrorMessage" persistence-modifier="persistent"/>
       <field name="checkOutErrorException" persistence-modifier="persistent"/>
       <field name="mailType" persistence-modifier="persistent"/>
@@ -56,6 +53,7 @@
       <field name="projectGroup" persistence-modifier="persistent"/>
 
       <fetch-group name="project-detail">
+        <field name="scmResult"/>
         <field name="builds"/>
         <field name="developers"/>
         <field name="notifiers"/>
@@ -63,7 +61,6 @@
         <field name="schedules"/>
         <field name="buildGroups"/>
         <field name="projectGroup"/>
-        <field name="scmResult"/>
       </fetch-group>
     </class>
 

Modified: maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/continuum.mdo?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/branches/trygvis-test/continuum-model/src/main/resources/continuum.mdo Mon Jul 25 18:18:23 2005
@@ -31,6 +31,7 @@
           <version>1.0.0</version>
           <type>String</type>
         </field>
+        <!-- TODO: Remove -->
         <field>
           <name>scmUrl</name>
           <version>1.0.0</version>
@@ -42,18 +43,10 @@
           <type>String</type>
         </field>
         <field>
-          <name>workingDirectory</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-<!--
-add stash.storable="false" to workingDirectory and scmUrl
-        <field>
           <name>path</name>
           <version>1.0.0</version>
           <type>String</type>
         </field>
--->
         <field stash.storable="false">
           <name>state</name>
           <version>1.0.0</version>

Modified: maven/continuum/branches/trygvis-test/continuum-plexus-application/src/conf/configuration.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-plexus-application/src/conf/configuration.xml?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-plexus-application/src/conf/configuration.xml (original)
+++ maven/continuum/branches/trygvis-test/continuum-plexus-application/src/conf/configuration.xml Mon Jul 25 18:18:23 2005
@@ -1,3 +1,4 @@
 <configuration>
   <url>http://localhost:8080/continuum/servlet/continuum</url>
+  <working-directory>${plexus.app}/working-directory</working-directory>
 </configuration>

Modified: maven/continuum/branches/trygvis-test/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java Mon Jul 25 18:18:23 2005
@@ -71,6 +71,8 @@
         configurationService.setInMemoryMode( true );
 
         configurationService.setBuildOutputDirectory( getTestFile( "target/build-output" ) );
+
+        configurationService.setWorkingDirectory( getTestFile( "target/working-directory" ) );
     }
 
     public static ContinuumProjectGroup getDefaultProjectGroup( ContinuumStore store )
@@ -179,9 +181,6 @@
         project.setCommandLineArguments( commandLineArguments );
         project.setExecutorId( executorId );
 
-        // TODO: Remove
-        project.setWorkingDirectory( "/tmp" );
-
         return project;
     }
 
@@ -217,11 +216,13 @@
                                                       MavenTwoProject project )
         throws Exception
     {
-        if ( project.getProjectGroup() != null )
+        if ( project.getProjectGroup() == null )
         {
             project.setProjectGroup( getDefaultProjectGroup( store ) );
         }
 
+        assertNotNull( project.getProjectGroup() );
+
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -229,6 +230,8 @@
         ContinuumProject addedProject = store.addProject( project );
 
         assertNotNull( addedProject );
+
+        assertNotNull( addedProject.getProjectGroup() );
 
         // ----------------------------------------------------------------------
         //

Modified: maven/continuum/branches/trygvis-test/continuum-web/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProject.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/trygvis-test/continuum-web/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProject.java?rev=225216&r1=225215&r2=225216&view=diff
==============================================================================
--- maven/continuum/branches/trygvis-test/continuum-web/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProject.java (original)
+++ maven/continuum/branches/trygvis-test/continuum-web/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProject.java Mon Jul 25 18:18:23 2005
@@ -10,7 +10,7 @@
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id:$
+ * @version $Id$
  */
 public class AddMavenTwoProject
     extends AbstractEntityAction



Mime
View raw message