continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r406895 [1/7] - in /maven/continuum/trunk: ./ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/configuration/ continuum-api/src/main/java/org/apache/maven/continuum/execution/ co...
Date Tue, 16 May 2006 10:27:16 GMT
Author: evenisse
Date: Tue May 16 03:26:59 2006
New Revision: 406895

URL: http://svn.apache.org/viewcvs?rev=406895&view=rev
Log:
Merge with branch rev. 406599

Added:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java   (with props)
    maven/continuum/trunk/continuum-core/src/test/repository/maven-builder-helper-3.xml   (with props)
    maven/continuum/trunk/continuum-rpc-client/   (with props)
    maven/continuum/trunk/continuum-rpc-client/pom.xml   (with props)
    maven/continuum/trunk/continuum-rpc-client/src/
    maven/continuum/trunk/continuum-rpc-client/src/main/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/maven/continuum/rpc/
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/maven/continuum/rpc/ProjectsReader.java   (with props)
    maven/continuum/trunk/continuum-rpc-client/src/main/java/org/apache/maven/continuum/rpc/SampleClient.java   (with props)
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/servlet/
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/servlet/DownloadServlet.java   (with props)
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/servlet/RepositoryBrowseServlet.java   (with props)
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/arrow.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/bg_warning.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/buildhistory.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/buildhistory_disabled.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/building.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/buildnow.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/buildnow_disabled.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/checkingout.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/delete.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/delete_disabled.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/edit.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/edit_disabled.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/footerborder.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/inqueue.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/legendbg.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/legendbg2.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/link.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/linkover.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/super.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/workingcopy.gif   (with props)
    maven/continuum/trunk/continuum-web/src/main/resources/images/workingcopy_disabled.gif   (with props)
Removed:
    maven/continuum/trunk/continuum-web/src/main/resources/images/apache-maven-project.png
    maven/continuum/trunk/continuum-web/src/main/resources/images/asf_logo_wide.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/codehaus-small.png
    maven/continuum/trunk/continuum-web/src/main/resources/images/continuum_logo.png
    maven/continuum/trunk/continuum-web/src/main/resources/images/corporate_logo.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/docorama.png
    maven/continuum/trunk/continuum-web/src/main/resources/images/help_logo.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_alert.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_alertsml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowmembers1_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowmembers2_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowusergroups1_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowusergroups2_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowwaste1_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_arrowwaste2_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_confirmsml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_doc_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_doc_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_folder_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_folder_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_help_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_help_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_info_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_info_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_infosml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_members_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_members_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_success_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_usergroups_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_usergroups_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_warning_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_waste_lrg.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/icon_waste_sml.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/poweredby_036.gif
    maven/continuum/trunk/continuum-web/src/main/resources/images/product_logo.gif
    maven/continuum/trunk/continuum-web/src/test/java/org/apache/maven/continuum/web/validation/CronExpressionValidatorTest.java
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumObjectNotFoundException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
    maven/continuum/trunk/continuum-core/pom.xml
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumSchedulerConstants.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/security/ContinuumAuthenticator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/PlexusContainerManager.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-model/pom.xml
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/pom.xml
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
    maven/continuum/trunk/continuum-plexus-application/pom.xml
    maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
    maven/continuum/trunk/continuum-test/pom.xml
    maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
    maven/continuum/trunk/continuum-web/pom.xml
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/InitializationChecker.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Logout.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumTriggerContentGenerator.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/DateTool.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/WorkingCopyContentGenerator.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/validation/CronExpressionValidator.java
    maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-web/src/main/resources/WEB-INF/web.xml
    maven/continuum/trunk/continuum-web/src/main/resources/css/tigris.css
    maven/continuum/trunk/continuum-web/src/main/resources/images/continuum_logo_75.gif
    maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-web/src/main/resources/templates/layouts/Configure.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/layouts/Default.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/layouts/Index.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/About.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/AddBuildDefinition.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/AddMavenProject.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/AddUser.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/AddUserGroup.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/BuildDefinition.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Configure.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ConfigureContinuum.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ConfigureEnd.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/DeleteBuildDefinition.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/DeleteNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/DeleteSchedule.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/DeleteUser.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/DeleteUserGroup.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditContinuumConfiguration.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditUser.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditUserGroup.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Login.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Schedules.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/UserGroups.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Users.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewIrcNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewJabberNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMailNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ViewMsnNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/WorkingCopy.vm
    maven/continuum/trunk/continuum-xmlrpc/pom.xml
    maven/continuum/trunk/pom.xml

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Tue May 16 03:26:59 2006
@@ -24,8 +24,8 @@
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.UserGroup;
-import org.apache.maven.continuum.security.ContinuumSecurity;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+import org.apache.maven.continuum.security.ContinuumSecurity;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
 import java.io.File;
@@ -63,6 +63,9 @@
     Collection getProjects()
         throws ContinuumException;
 
+    Collection getProjectsWithDependencies()
+        throws ContinuumException;
+
     BuildResult getLatestBuildResultForProject( int projectId );
 
     Map getLatestBuildResults();
@@ -76,6 +79,9 @@
     boolean isInBuildingQueue( int projectId )
         throws ContinuumException;
 
+    boolean isInBuildingQueue( int projectId, int buildDefinitionId )
+        throws ContinuumException;
+
     boolean isInCheckoutQueue( int projectId )
         throws ContinuumException;
     // ----------------------------------------------------------------------
@@ -191,7 +197,7 @@
     void addBuildDefinition( int projectId, BuildDefinition buildDefinition )
         throws ContinuumException;
 
-    void addBuildDefinition( int projectId, Map configuration )
+    void addBuildDefinitionFromParams( int projectId, Map configuration )
         throws ContinuumException;
 
     void removeBuildDefinition( int projectId, int buildDefinitionId )
@@ -254,7 +260,8 @@
     // User
     // ----------------------------------------------------------------------
 
-    void addUser( ContinuumUser user );
+    void addUser( ContinuumUser user )
+        throws ContinuumException;
 
     void addUser( Map configuration )
         throws ContinuumException;

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java Tue May 16 03:26:59 2006
@@ -49,6 +49,10 @@
 
     void setWorkingDirectory( File workingDirectory );
 
+    File getDeploymentRepositoryDirectory();
+
+    void setDeploymentRepositoryDirectory( File deploymentRepositoryDirectory );
+
     void setJdks( Map jdks );
 
     String getCompanyLogo();
@@ -82,6 +86,8 @@
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
+
+    boolean isLoaded();
 
     void load()
         throws ConfigurationLoadingException;

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java Tue May 16 03:26:59 2006
@@ -20,6 +20,7 @@
 import org.apache.maven.continuum.model.project.Project;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -33,5 +34,12 @@
         throws ContinuumBuildExecutorException;
 
     void updateProjectFromCheckOut( File workingDirectory, Project project, BuildDefinition buildDefinition )
+        throws ContinuumBuildExecutorException;
+
+    boolean isBuilding( Project project );
+
+    void killProcess( Project project );
+
+    List getDeployableArtifacts( File workingDirectory, BuildDefinition buildDefinition )
         throws ContinuumBuildExecutorException;
 }

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java Tue May 16 03:26:59 2006
@@ -50,6 +50,8 @@
 
     String CONTEXT_PROJECT = "project";
 
+    String CONTEXT_PROJECT_NOTIFIER = "projectNotifier";
+
     String CONTEXT_BUILD_RESULT = "result";
 
     String CONTEXT_UPDATE_SCM_RESULT = "scmResult";

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java Tue May 16 03:26:59 2006
@@ -16,17 +16,18 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.formica.util.MungedHttpsURL;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
-import org.codehaus.plexus.formica.util.MungedHttpsURL;
-
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -51,7 +52,47 @@
             is = metadata.openStream();
         }
 
-        File file = File.createTempFile( "continuum-", ".tmp" );
+        String path = metadata.getPath();
+
+        String baseDirectory;
+
+        String fileName;
+
+        int lastIndex = path.lastIndexOf( "/" );
+
+        if ( lastIndex >= 0 )
+        {
+            baseDirectory = path.substring( 0, lastIndex );
+
+            // Required for windows
+            int colonIndex = baseDirectory.indexOf( ":" );
+
+            if ( colonIndex >= 0 )
+            {
+                baseDirectory = baseDirectory.substring( colonIndex + 1 );
+            }
+
+            fileName = path.substring( lastIndex + 1 );
+        }
+        else
+        {
+            baseDirectory = "";
+
+            fileName = path;
+        }
+
+        // Little hack for URLs that contains '*' like "http://svn.codehaus.org/*checkout*/trunk/pom.xml?root=plexus"
+        baseDirectory = StringUtils.replace( baseDirectory, "*", "" );
+
+        File continuumTmpDir = new File( System.getProperty( "java.io.tmpdir" ), "continuum" );
+
+        File uploadDirectory = new File( continuumTmpDir, baseDirectory );
+
+        uploadDirectory.mkdirs();
+
+        FileUtils.forceDeleteOnExit( continuumTmpDir );
+
+        File file = new File( uploadDirectory, fileName );
 
         file.deleteOnExit();
 

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumObjectNotFoundException.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumObjectNotFoundException.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumObjectNotFoundException.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumObjectNotFoundException.java Tue May 16 03:26:59 2006
@@ -23,8 +23,13 @@
 public class ContinuumObjectNotFoundException
     extends ContinuumStoreException
 {
+    public ContinuumObjectNotFoundException( String message )
+    {
+        super( message );
+    }
+
     public ContinuumObjectNotFoundException( String type, String id )
     {
-        super( "Could not find object. Type '" + type + "'. Id: '" + id + "'." );
+        this( "Could not find object. Type '" + type + "'. Id: '" + id + "'." );
     }
 }

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java Tue May 16 03:26:59 2006
@@ -76,6 +76,10 @@
 
     List getAllProjectsByName();
 
+    List getAllProjectsByNameWithDependencies();
+
+    List getAllProjectsByNameWithBuildDetails();
+
     List getAllSchedulesByName();
 
     Schedule addSchedule( Schedule schedule );
@@ -99,7 +103,7 @@
     Project getProject( int projectId )
         throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
-    Map getProjectIdsAndBuildDefinitionIdsBySchedule( int scheduleId )
+    Map getProjectIdsAndBuildDefinitionsIdsBySchedule( int scheduleId )
         throws ContinuumStoreException;
 
     void updateProject( Project project )
@@ -131,6 +135,9 @@
     ProjectGroup getProjectGroupWithBuildDetails( int projectGroupId )
         throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
+    ProjectGroup getProjectGroupWithProjects( int projectGroupId )
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
+
     List getAllProjectGroupsWithBuildDetails();
 
     List getAllProjectsWithAllDetails();
@@ -147,8 +154,13 @@
     ProjectGroup getProjectGroupByGroupId( String groupId )
         throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
+    ProjectGroup getProjectGroupByGroupIdWithProjects( String groupId )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
+
     BuildResult getLatestBuildResultForProject( int projectId );
 
+    List getBuildResultsForProject( int projectId, long fromDate );
+
     Map getLatestBuildResults();
 
     List getBuildResultByBuildNumber( int projectId, int buildNumber );
@@ -216,4 +228,6 @@
     UserGroup getUserGroup( String name );
 
     void removeUserGroup( UserGroup group );
+
+    void closeStore();
 }

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java Tue May 16 03:26:59 2006
@@ -34,19 +34,17 @@
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringInputStream;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
-import java.io.Reader;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
@@ -92,25 +90,11 @@
     protected InputStream getConfiguration()
         throws Exception
     {
-        Reader webappPlexusReader =
-            new FileReader( getTestFile( "../continuum-webapp/src/main/webapp/WEB-INF/plexus.xml" ) );
+        String conf = IOUtil.toString( getClass().getResourceAsStream( "/conf/application.xml" ) );
 
-        Reader webappComponentsReader =
-            new FileReader( getTestFile( "../continuum-webapp/src/main/resources/META-INF/plexus/components.xml" ) );
+        conf = StringUtils.replace( conf, "../../../../../continuum-web/src/main/resources", "webapp" );
 
-        String webappPlexus = IOUtil.toString( webappPlexusReader );
-
-        String webappComponent = IOUtil.toString( webappComponentsReader );
-
-        webappComponent =
-            webappComponent.substring( webappComponent.indexOf( "<components>" ) + "<components>".length() );
-
-        webappComponent = webappComponent.substring( 0, webappComponent.indexOf( "</components>" ) );
-
-        webappPlexus = webappPlexus.substring( 0, webappPlexus.indexOf( "</components>" ) ) + webappComponent +
-            webappPlexus.substring( webappPlexus.indexOf( "</components>" ) );
-
-        return new ByteArrayInputStream( webappPlexus.getBytes() );
+        return new StringInputStream( conf );
     }
 
     protected void customizeContext( Context context )
@@ -127,9 +111,35 @@
         if ( !plexusHome.isDirectory() )
         {
             assertTrue( plexusHome.mkdirs() );
+
+            File plexusHomeLib = new File( plexusHome, "lib" );
+
+            assertTrue( plexusHomeLib.mkdirs() );
         }
 
         context.put( "plexus.home", plexusHome.getAbsolutePath() );
+
+        // Create webapp directory and subdirectories so conf generated by getConfiguration() will be ok
+        File webappDirectory = new File( plexusHome, "webapp" );
+
+        if ( webappDirectory.exists() )
+        {
+            FileUtils.deleteDirectory( webappDirectory );
+        }
+
+        assertTrue( webappDirectory.mkdirs() );
+
+        File formsDirectory = new File( webappDirectory, "forms" );
+
+        assertTrue( formsDirectory.mkdirs() );
+
+        File templatesDirectory = new File( webappDirectory, "templates" );
+
+        assertTrue( templatesDirectory.mkdirs() );
+
+        File localizationDirectory = new File( webappDirectory, "localization" );
+
+        assertTrue( localizationDirectory.mkdirs() );
     }
 
     public final void setUp()
@@ -320,7 +330,7 @@
         }
     }
 
-    private void line()
+    protected void line()
     {
         System.err.println( "-------------------------------------------------------------------------------" );
     }
@@ -406,17 +416,30 @@
         return ( (Project) projects.get( 0 ) ).getId();
     }
 
+    public BuildResult buildProject( int projectId, int trigger )
+        throws Exception
+    {
+        return buildProject( projectId, -1, trigger );
+    }
+
     /**
      * @todo use a notify mechanism rather than polling. That's what queues are for. Really, buildProject should create the build result with a WAITING state, return the ID, and let the queue take it from there
      */
-    public BuildResult buildProject( int projectId, int trigger )
+    public BuildResult buildProject( int projectId, int buildDefinitionId, int trigger )
         throws Exception
     {
         int timeout = 60 * 1000;
 
         BuildResult previousBuild = getContinuum().getLatestBuildResultForProject( projectId );
 
-        getContinuum().buildProject( projectId, trigger );
+        if ( buildDefinitionId <= 0 )
+        {
+            getContinuum().buildProject( projectId, trigger );
+        }
+        else
+        {
+            getContinuum().buildProject( projectId, buildDefinitionId, trigger );
+        }
 
         long start = System.currentTimeMillis();
 
@@ -490,11 +513,6 @@
         {
             fail( "project.scmResult == null" );
         }
-
-        progress( "Command line=" + project.getCheckoutResult().getCommandLine() );
-        progress( "Provider message=" + project.getCheckoutResult().getProviderMessage() );
-        progress( "Command output=" + project.getCheckoutResult().getCommandOutput() );
-        progress( "exception=" + project.getCheckoutResult().getException() );
 
         assertTrue( message + "scmResult.success != true", project.getCheckoutResult().isSuccess() );
         assertEquals( message + "Checkout error exception != null", null, project.getCheckoutResult().getException() );

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java Tue May 16 03:26:59 2006
@@ -76,7 +76,7 @@
 
         progress( "Building SVN Ant project" );
 
-        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
 
         assertSuccessfulAntBuild( buildId, project.getId() );
 
@@ -120,7 +120,7 @@
 
         progress( "Building CVS Ant project" );
 
-        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
 
         assertSuccessfulAntBuild( buildId, projectId );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java Tue May 16 03:26:59 2006
@@ -68,7 +68,7 @@
 
         progress( "Building Maven 1 project" );
 
-        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
 
         assertSuccessfulMaven1Build( buildId, projectId );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java Tue May 16 03:26:59 2006
@@ -16,17 +16,20 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
+import org.apache.maven.continuum.model.scm.ChangeSet;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -39,8 +42,6 @@
     public void testBasic()
         throws Exception
     {
-        Continuum continuum = getContinuum();
-
         initializeCvsRoot();
 
         progress( "Initializing Maven 2 CVS project" );
@@ -51,11 +52,12 @@
 
         progress( "Adding Maven 2 project" );
 
-        int projectId = getProjectId( continuum.addMavenTwoProject( "file:" + root.getAbsolutePath() + "/pom.xml" ) );
+        int projectId =
+            getProjectId( getContinuum().addMavenTwoProject( "file:" + root.getAbsolutePath() + "/pom.xml" ) );
 
         waitForSuccessfulCheckout( projectId );
 
-        Project project = continuum.getProjectWithAllDetails( projectId );
+        Project project = getContinuum().getProjectWithAllDetails( projectId );
 
         assertProject( projectId, "Maven 2 Project", "2.0-SNAPSHOT", "-N -B", MavenTwoBuildExecutor.ID, project );
 
@@ -74,25 +76,28 @@
 
         progress( "Building Maven 2 project" );
 
-        project = continuum.getProjectWithBuilds( projectId );
+        project = getContinuum().getProjectWithBuilds( projectId );
+
         int originalSize = project.getBuildResults().size();
 
-        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
 
         assertSuccessfulMaven2Build( buildId, projectId );
 
         progress( "Test that a build without any files changed won't execute the executor" );
 
-        project = continuum.getProjectWithBuilds( projectId );
+        project = getContinuum().getProjectWithBuilds( projectId );
+
         int expectedSize = project.getBuildResults().size();
 
         assertEquals( "build list was not updated", originalSize + 1, expectedSize );
 
-        continuum.buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN );
+        getContinuum().buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED );
 
         Thread.sleep( 3000 );
 
-        project = continuum.getProjectWithBuilds( projectId );
+        project = getContinuum().getProjectWithBuilds( projectId );
+
         int actualSize = project.getBuildResults().size();
 
         assertEquals( "A build has unexpectedly been executed.", expectedSize, actualSize );
@@ -104,6 +109,95 @@
         BuildResult build = assertSuccessfulMaven2Build( buildId, projectId );
 
         assertEquals( "The 'build forced' flag wasn't true", ContinuumProjectState.TRIGGER_FORCED, build.getTrigger() );
+
+        progress( "Test that a forced build with a pom deleted executes the executor" );
+
+        File pom = new File( getContinuum().getWorkingDirectory( projectId ), "pom.xml" );
+
+        assertTrue( pom.delete() );
+
+        buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_FORCED ).getId();
+
+        build = assertSuccessfulMaven2Build( buildId, projectId );
+
+        assertEquals( "The 'build forced' flag wasn't true", ContinuumProjectState.TRIGGER_FORCED, build.getTrigger() );
+
+        Thread.sleep( 3000 );
+
+        progress( "Test with two build definition, the second receive scm result from the first." );
+
+        BuildDefinition buildDef = new BuildDefinition();
+
+        buildDef.setBuildFile( "pom.xml" );
+
+        buildDef.setGoals( "clean" );
+
+        getContinuum().addBuildDefinition( projectId, buildDef );
+
+        List buildDefs = getContinuum().getBuildDefinitions( projectId );
+
+        for ( Iterator i = buildDefs.iterator(); i.hasNext(); )
+        {
+            BuildDefinition bd = (BuildDefinition) i.next();
+
+            if ( bd.getGoals().equals( "clean" ) )
+            {
+                buildDef = bd;
+
+                break;
+            }
+        }
+        //FileUtils.deleteDirectory( new File( getContinuum().getWorkingDirectory( projectId ), "src" ) );
+
+        Thread.sleep( 3000 );
+
+        build = buildProject( projectId, buildDef.getId(), ContinuumProjectState.TRIGGER_FORCED );
+
+        build = getContinuum().getBuildResult( build.getId() );
+
+        line();
+        System.out.println( "CHANGESET" );
+        line();
+        for ( Iterator i = build.getScmResult().getChanges().iterator(); i.hasNext(); )
+        {
+            ChangeSet changeSet = (ChangeSet) i.next();
+            System.out.println( changeSet.toString() );
+        }
+        line();
+
+        assertEquals( "Changes list must be empty.", 1, build.getScmResult().getChanges().size() );
+
+        FileUtils.deleteDirectory( new File( getContinuum().getWorkingDirectory( projectId ), "src" ) );
+
+        Thread.sleep( 3000 );
+
+        buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_FORCED ).getId();
+
+        build = assertSuccessfulMaven2Build( buildId, projectId );
+
+        build = getContinuum().getBuildResult( build.getId() );
+
+        line();
+        System.out.println( "CHANGESET" );
+        line();
+        for ( Iterator i = build.getScmResult().getChanges().iterator(); i.hasNext(); )
+        {
+            ChangeSet changeSet = (ChangeSet) i.next();
+            System.out.println( changeSet.toString() );
+        }
+        line();
+
+        assertEquals( "Changes list must be empty.", 1, build.getScmResult().getChanges().size() );
+
+        Thread.sleep( 3000 );
+
+        build = buildProject( projectId, buildDef.getId(), ContinuumProjectState.TRIGGER_FORCED );
+
+        Thread.sleep( 3000 );
+
+        build = getContinuum().getBuildResult( build.getId() );
+
+        assertTrue( build.getScmResult().getChanges().size() >= 1 );
 
         removeProject( projectId );
     }

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java Tue May 16 03:26:59 2006
@@ -71,7 +71,7 @@
         Project project = continuum.getProject( projectId );
         assertProject( projectId, "Shell Project", "3.0", "", "shell", project );
         progress( "Building Shell project" );
-        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
         assertSuccessfulShellBuild( buildId, projectId, "" );
 
         // Test project reconfiguration
@@ -89,7 +89,7 @@
         Project shellProject = continuum.getProjectWithAllDetails( projectId );
         bd = (BuildDefinition) shellProject.getBuildDefinitions().iterator().next();
         bd.setArguments( "a b" );
-        continuum.updateProject( shellProject );
+        continuum.updateBuildDefinition( bd, shellProject.getId() );
 
         // TODO: change all details to build details
         shellProject = continuum.getProjectWithAllDetails( projectId );
@@ -97,7 +97,7 @@
         bd = (BuildDefinition) shellProject.getBuildDefinitions().iterator().next();
         assertEquals( "Updated command line arguments doesn't match", "a b", bd.getArguments() );
 
-        buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
+        buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_SCHEDULED ).getId();
         assertSuccessfulShellBuild( buildId, projectId, "a" + EOL + "b" + EOL );
 
         removeProject( projectId );

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/pom.xml?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Tue May 16 03:26:59 2006
@@ -20,23 +20,12 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>jpox</groupId>
-      <artifactId>jpox</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>postgresql</groupId>
-      <artifactId>postgresql</artifactId>
-      <version>7.4</version>
-      <classifier>jdbc3</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-mail-sender-api</artifactId>
+      <artifactId>plexus-quartz</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-security-osuser</artifactId>
+      <artifactId>plexus-mail-sender-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.continuum</groupId>
@@ -44,6 +33,10 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-security-api</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-local</artifactId>
       <scope>test</scope>
@@ -68,7 +61,7 @@
     <dependency>
       <groupId>xml-apis</groupId>
       <artifactId>xml-apis</artifactId>
-      <version>2.0.2</version>
+      <version>1.0.b2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -80,6 +73,10 @@
       <artifactId>maven-model</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-svnexe</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-velocity</artifactId>
     </dependency>
@@ -113,10 +110,6 @@
       <artifactId>maven-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>quartz</groupId>
-      <artifactId>quartz</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-jdo2</artifactId>
     </dependency>
@@ -141,6 +134,10 @@
       <version>1.0-alpha-3</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.continuum.jpox</groupId>
+      <artifactId>jpox</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven.continuum</groupId>
       <artifactId>continuum-store</artifactId>
     </dependency>
@@ -157,16 +154,6 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-mail-sender-simple</artifactId>
       <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.scm</groupId>
-      <artifactId>maven-scm-provider-svnexe</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.4</version>
-      <scope>provided</scope>
     </dependency>
   </dependencies>
 </project>

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Tue May 16 03:26:59 2006
@@ -19,14 +19,16 @@
 import org.apache.maven.continuum.build.settings.SchedulesActivationException;
 import org.apache.maven.continuum.build.settings.SchedulesActivator;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
-import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
 import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
 import org.apache.maven.continuum.core.action.StoreProjectAction;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.apache.maven.continuum.initialization.ContinuumInitializer;
 import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
@@ -50,15 +52,15 @@
 import org.apache.maven.continuum.utils.PlexusContainerManager;
 import org.apache.maven.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
-import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.action.Action;
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.action.ActionNotFoundException;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
@@ -145,6 +147,33 @@
      */
     private WorkingDirectoryService workingDirectoryService;
 
+    /**
+     * @plexus.requirement
+     */
+    private BuildExecutorManager executorManager;
+
+    private boolean stopped = false;
+
+    public DefaultContinuum()
+    {
+        super();
+
+        Runtime.getRuntime().addShutdownHook( new Thread()
+        {
+            public void run()
+            {
+                try
+                {
+                    stopContinuum();
+                }
+                catch ( StoppingException e )
+                {
+                    e.printStackTrace();
+                }
+            }
+        } );
+    }
+
     // ----------------------------------------------------------------------
     // Projects
     // ----------------------------------------------------------------------
@@ -155,14 +184,34 @@
         return store.getAllProjectsByName();
     }
 
+    public Collection getProjectsWithDependencies()
+        throws ContinuumException
+    {
+        return store.getAllProjectsByNameWithDependencies();
+    }
+
     public Map getLatestBuildResults()
     {
-        return store.getLatestBuildResults();
+        Map result = store.getLatestBuildResults();
+
+        if ( result == null )
+        {
+            result = new HashMap();
+        }
+
+        return result;
     }
 
     public Map getBuildResultsInSuccess()
     {
-        return store.getBuildResultsInSuccess();
+        Map result = store.getBuildResultsInSuccess();
+
+        if ( result == null )
+        {
+            result = new HashMap();
+        }
+
+        return result;
     }
 
     public BuildResult getLatestBuildResultForProject( int projectId )
@@ -192,6 +241,12 @@
     public boolean isInBuildingQueue( int projectId )
         throws ContinuumException
     {
+        return isInBuildingQueue( projectId, -1 );
+    }
+
+    public boolean isInBuildingQueue( int projectId, int buildDefinitionId )
+        throws ContinuumException
+    {
         List queue;
 
         try
@@ -207,9 +262,19 @@
         {
             BuildProjectTask task = (BuildProjectTask) it.next();
 
-            if ( task.getProjectId() == projectId )
+            if ( buildDefinitionId < 0 )
             {
-                return true;
+                if ( task.getProjectId() == projectId )
+                {
+                    return true;
+                }
+            }
+            else
+            {
+                if ( task.getProjectId() == projectId && task.getBuildDefinitionId() == buildDefinitionId )
+                {
+                    return true;
+                }
             }
         }
 
@@ -337,10 +402,11 @@
 
             if ( buildDefId == null )
             {
-                throw new ContinuumException( "Project (id=" + project.getId() + " doens't have a default build definition." );
+                throw new ContinuumException(
+                    "Project (id=" + project.getId() + " doens't have a default build definition." );
             }
 
-            buildProject( project.getId(), buildDefId.intValue(), trigger );
+            buildProject( project, buildDefId.intValue(), trigger );
         }
     }
 
@@ -348,11 +414,12 @@
         throws ContinuumException
     {
         Collection projectsList;
+
         Map projectsMap = null;
 
         try
         {
-            projectsMap = store.getProjectIdsAndBuildDefinitionIdsBySchedule( schedule.getId() );
+            projectsMap = store.getProjectIdsAndBuildDefinitionsIdsBySchedule( schedule.getId() );
 
             if ( projectsMap == null )
             {
@@ -375,14 +442,22 @@
 
         for ( Iterator projectIterator = projectsList.iterator(); projectIterator.hasNext(); )
         {
-            Project p = (Project) projectIterator.next();
+            Project project = (Project) projectIterator.next();
 
-            Integer buildDefId = ( (Integer) projectsMap.get( new Integer( p.getId() ) ) );
+            List buildDefIds = (List) projectsMap.get( new Integer( project.getId() ) );
 
-            if ( buildDefId != null && !isInBuildingQueue( p.getId() ) && !isInCheckoutQueue( p.getId() ) )
+            if ( buildDefIds != null && !buildDefIds.isEmpty() )
             {
-                //TODO: Fix trigger name
-                buildProject( p.getId(), buildDefId.intValue(), ContinuumProjectState.TRIGGER_UNKNOWN, false );
+                for ( Iterator buildDefinitionIterator = buildDefIds.iterator(); buildDefinitionIterator.hasNext(); )
+                {
+                    Integer buildDefId = (Integer) buildDefinitionIterator.next();
+
+                    if ( buildDefId != null && !isInBuildingQueue( project.getId(), buildDefId.intValue() ) &&
+                        !isInCheckoutQueue( project.getId() ) )
+                    {
+                        buildProject( project, buildDefId.intValue(), ContinuumProjectState.TRIGGER_SCHEDULED, false );
+                    }
+                }
             }
         }
     }
@@ -393,14 +468,16 @@
         buildProject( projectId, ContinuumProjectState.TRIGGER_FORCED );
     }
 
-    public void buildProject( int projectId, int trigger )
+    public void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
         throws ContinuumException
     {
-        if ( isInBuildingQueue( projectId ) || isInCheckoutQueue( projectId ) )
-        {
-            return;
-        }
+        buildProject( projectId, buildDefinitionId, ContinuumProjectState.TRIGGER_FORCED );
+    }
+
 
+    public void buildProject( int projectId, int trigger )
+        throws ContinuumException
+    {
         BuildDefinition buildDef = getDefaultBuildDefinition( projectId );
 
         if ( buildDef == null )
@@ -408,6 +485,11 @@
             throw new ContinuumException( "Project (id=" + projectId + " doens't have a default build definition." );
         }
 
+        if ( isInBuildingQueue( projectId, buildDef.getId() ) || isInCheckoutQueue( projectId ) )
+        {
+            return;
+        }
+
         buildProject( projectId, buildDef.getId(), trigger, false );
     }
 
@@ -417,12 +499,35 @@
         buildProject( projectId, buildDefinitionId, trigger, true );
     }
 
-    private synchronized void buildProject( int projectId, int buildDefinitionId, int trigger, boolean checkQueues )
+    public void buildProject( Project project, int buildDefinitionId, int trigger )
+        throws ContinuumException
+    {
+        buildProject( project, buildDefinitionId, trigger, true );
+    }
+
+    private void buildProject( int projectId, int buildDefinitionId, int trigger, boolean checkQueues )
+        throws ContinuumException
+    {
+        Project project;
+
+        try
+        {
+            project = store.getProject( projectId );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while getting project " + projectId + ".", e );
+        }
+
+        buildProject( project, buildDefinitionId, trigger, checkQueues );
+    }
+
+    private synchronized void buildProject( Project project, int buildDefinitionId, int trigger, boolean checkQueues )
         throws ContinuumException
     {
         if ( checkQueues )
         {
-            if ( isInBuildingQueue( projectId ) || isInCheckoutQueue( projectId ) )
+            if ( isInBuildingQueue( project.getId(), buildDefinitionId ) || isInCheckoutQueue( project.getId() ) )
             {
                 return;
             }
@@ -430,26 +535,34 @@
 
         try
         {
-            Project project = store.getProject( projectId );
-
             if ( project.getState() != ContinuumProjectState.NEW &&
-                 project.getState() != ContinuumProjectState.OK &&
-                 project.getState() != ContinuumProjectState.FAILED &&
-                 project.getState() != ContinuumProjectState.ERROR )
+                project.getState() != ContinuumProjectState.CHECKEDOUT &&
+                project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED &&
+                project.getState() != ContinuumProjectState.ERROR )
             {
-                // project is building
-                return;
-            }
+                ContinuumBuildExecutor executor = executorManager.getBuildExecutor( project.getExecutorId() );
+
+                if ( executor.isBuilding( project ) )
+                {
+                    // project is building
+                    getLogger().info( "Project '" + project.getName() + "' always running." );
 
-            project.setOldState( project.getState() );
+                    return;
+                }
+                else
+                {
+                    project.setState( ContinuumProjectState.ERROR );
 
-            project.setState( ContinuumProjectState.BUILDING );
+                    store.updateProject( project );
 
-            store.updateProject( project );
+                    project = store.getProject( project.getId() );
+                }
+            }
 
-            getLogger().info( "Enqueuing '" + project.getName() + "' (Build definition id=" + buildDefinitionId + ")." );
+            getLogger().info(
+                "Enqueuing '" + project.getName() + "' (Build definition id=" + buildDefinitionId + ")." );
 
-            buildQueue.put( new BuildProjectTask( projectId, buildDefinitionId, trigger ) );
+            buildQueue.put( new BuildProjectTask( project.getId(), buildDefinitionId, trigger ) );
         }
         catch ( ContinuumStoreException e )
         {
@@ -507,7 +620,7 @@
 
         boolean stop = false;
 
-        while( !stop )
+        while ( !stop )
         {
             if ( buildResultsIterator.hasNext() )
             {
@@ -533,7 +646,7 @@
 
         List changes = null;
 
-        while (  buildResult.getState() != ContinuumProjectState.OK )
+        while ( buildResult.getState() != ContinuumProjectState.OK )
         {
             if ( changes == null )
             {
@@ -550,6 +663,11 @@
             buildResult = (BuildResult) buildResultsIterator.next();
         }
 
+        if ( changes == null )
+        {
+            changes = Collections.EMPTY_LIST;
+        }
+
         return changes;
     }
 
@@ -560,7 +678,7 @@
     public List getProjectsInBuildOrder()
         throws CycleDetectedException, ContinuumException
     {
-        return getProjectsInBuildOrder( getProjects() );
+        return getProjectsInBuildOrder( getProjectsWithDependencies() );
     }
 
     private List getProjectsInBuildOrder( Collection projects )
@@ -621,7 +739,7 @@
 
                 bd.setSchedule( schedule );
 
-                project.addBuildDefinition( bd );       
+                project.addBuildDefinition( bd );
             }
             catch ( ContinuumStoreException e )
             {
@@ -685,8 +803,8 @@
 
         executeAction( "create-projects-from-metadata", context );
 
-        ContinuumProjectBuildingResult result = (ContinuumProjectBuildingResult) context.get(
-            CreateProjectsFromMetadata.KEY_PROJECT_BUILDING_RESULT );
+        ContinuumProjectBuildingResult result =
+            (ContinuumProjectBuildingResult) context.get( CreateProjectsFromMetadata.KEY_PROJECT_BUILDING_RESULT );
 
         if ( result.getProjects() != null )
         {
@@ -728,7 +846,7 @@
         {
             try
             {
-                projectGroup = store.getProjectGroupByGroupId( projectGroup.getGroupId() );
+                projectGroup = store.getProjectGroupByGroupIdWithProjects( projectGroup.getGroupId() );
 
                 getLogger().info(
                     "Using existing project group with the group id: '" + projectGroup.getGroupId() + "'." );
@@ -749,7 +867,7 @@
 
                 int projectGroupId = AbstractContinuumAction.getProjectGroupId( pgContext );
 
-                projectGroup = store.getProjectGroup( projectGroupId );
+                projectGroup = store.getProjectGroupWithProjects( projectGroupId );
             }
         }
         catch ( ContinuumStoreException e )
@@ -874,10 +992,8 @@
             if ( value instanceof String )
             {
                 String val = (String) value;
-                if ( !"sendOnSuccess".equals( val ) &&
-                     !"sendOnFailure".equals( val ) &&
-                     !"sendOnError".equals( val ) &&
-                     !"sendOnWarning".equals( val ) )
+                if ( !"sendOnSuccess".equals( val ) && !"sendOnFailure".equals( val ) && !"sendOnError".equals( val ) &&
+                    !"sendOnWarning".equals( val ) )
                 {
                     if ( !StringUtils.isEmpty( val ) )
                     {
@@ -907,7 +1023,7 @@
 
         notif.setType( notifier.getType() );
 
-        notifier.setFrom( ProjectNotifier.FROM_USER );
+        notif.setFrom( ProjectNotifier.FROM_USER );
 
         Project project = getProjectWithAllDetails( projectId );
 
@@ -1023,14 +1139,30 @@
 
         bd.setArguments( buildDefinition.getArguments() );
 
-        Schedule schedule = getSchedule( buildDefinition.getSchedule().getId() );
+        Schedule schedule;
+
+        if ( buildDefinition.getSchedule() == null )
+        {
+            try
+            {
+                schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME );
+            }
+            catch ( ContinuumStoreException e )
+            {
+                throw new ContinuumException( "Can't get default schedule.", e );
+            }
+        }
+        else
+        {
+            schedule = getSchedule( buildDefinition.getSchedule().getId() );
+        }
 
         bd.setSchedule( schedule );
 
         if ( buildDefinition.isDefaultForProject() && !bd.isDefaultForProject() )
         {
             bd.setDefaultForProject( true );
-            
+
             BuildDefinition defaultBd = getDefaultBuildDefinition( projectId );
 
             if ( defaultBd != null )
@@ -1059,7 +1191,10 @@
 
         buildDefinition.setSchedule( schedule );
 
-        buildDefinition.setDefaultForProject( true );
+        if ( convertBoolean( (String) configuration.get( "defaultForProject" ) ) )
+        {
+            buildDefinition.setDefaultForProject( true );
+        }
 
         updateBuildDefinition( buildDefinition, projectId );
     }
@@ -1099,7 +1234,7 @@
         updateProject( project );
     }
 
-    public void addBuildDefinition( int projectId, Map configuration )
+    public void addBuildDefinitionFromParams( int projectId, Map configuration )
         throws ContinuumException
     {
         BuildDefinition buildDefinition = new BuildDefinition();
@@ -1184,7 +1319,8 @@
 
             if ( s != null )
             {
-                throw logAndCreateException( "Can't create schedule. A schedule with the same name already exists.", null );
+                throw logAndCreateException( "Can't create schedule. A schedule with the same name already exists.",
+                                             null );
             }
 
             s = store.addSchedule( schedule );
@@ -1297,7 +1433,7 @@
         {
             return workingDirectoryService.getWorkingDirectory( store.getProject( projectId ) );
         }
-        catch( ContinuumStoreException e )
+        catch ( ContinuumStoreException e )
         {
             throw new ContinuumException( "Can't get files list.", e );
         }
@@ -1316,7 +1452,7 @@
         {
             return FileUtils.fileRead( userFile );
         }
-        catch( IOException e )
+        catch ( IOException e )
         {
             throw new ContinuumException( "Can't read file " + filename, e );
         }
@@ -1351,17 +1487,17 @@
         {
             for ( int i = 0; i < files.length; i++ )
             {
-                File current = new File( workingDirectory, files[ i ] );
+                File current = new File( workingDirectory, files[i] );
 
                 String currentFile;
 
                 if ( currentSubDirectory == null )
                 {
-                    currentFile = files[ i ];
+                    currentFile = files[i];
                 }
                 else
                 {
-                    currentFile = currentSubDirectory + "/" + files[ i ];
+                    currentFile = currentSubDirectory + "/" + files[i];
                 }
 
                 if ( userDirectory != null && current.isDirectory() && userDirectory.startsWith( currentFile ) )
@@ -1405,7 +1541,8 @@
 
             if ( configuration.get( "conf.workingDirectory" ) != null )
             {
-                configurationService.setWorkingDirectory( configurationService.getFile( (String) configuration.get( "conf.workingDirectory" ) ) );
+                configurationService.setWorkingDirectory(
+                    configurationService.getFile( (String) configuration.get( "conf.workingDirectory" ) ) );
             }
             else
             {
@@ -1414,13 +1551,20 @@
 
             if ( configuration.get( "conf.buildOutputDirectory" ) != null )
             {
-                configurationService.setBuildOutputDirectory( configurationService.getFile( (String) configuration.get( "conf.buildOutputDirectory" ) ) );
+                configurationService.setBuildOutputDirectory(
+                    configurationService.getFile( (String) configuration.get( "conf.buildOutputDirectory" ) ) );
             }
             else
             {
                 throw new ContinuumException( "build output directory can't be null" );
             }
 
+            if ( configuration.get( "conf.deploymentRepositoryDirectory" ) != null )
+            {
+                configurationService.setDeploymentRepositoryDirectory( configurationService.getFile(
+                    (String) configuration.get( "conf.deploymentRepositoryDirectory" ) ) );
+            }
+
             if ( configuration.get( "conf.url" ) != null )
             {
                 configurationService.setUrl( (String) configuration.get( "conf.url" ) );
@@ -1451,7 +1595,7 @@
         {
             configurationService.load();
         }
-        catch( ConfigurationLoadingException e )
+        catch ( ConfigurationLoadingException e )
         {
             throw new ContinuumException( "Can't reload configuration.", e );
         }
@@ -1484,7 +1628,12 @@
     }
 
     public void addUser( ContinuumUser user )
+        throws ContinuumException
     {
+        if ( StringUtils.isEmpty( user.getHashedPassword() ) )
+        {
+            throw new ContinuumException( "Password can't be null" );
+        }
         store.addUser( user );
     }
 
@@ -1509,6 +1658,13 @@
     public void updateUser( ContinuumUser user )
         throws ContinuumException
     {
+        if ( StringUtils.isEmpty( user.getHashedPassword() ) )
+        {
+            ContinuumUser u = getUser( user.getAccountId() );
+
+            user.setHashedPassword( u.getHashedPassword() );
+        }
+
         try
         {
             store.updateUser( user );
@@ -1542,7 +1698,7 @@
     {
         try
         {
-            return store.getUser( userId);
+            return store.getUser( userId );
         }
         catch ( Exception ex )
         {
@@ -1722,7 +1878,7 @@
     {
         try
         {
-            return store.getUserGroup( userGroupId);
+            return store.getUserGroup( userGroupId );
         }
         catch ( Exception ex )
         {
@@ -1768,30 +1924,60 @@
 
         getLogger().info( "Showing all projects: " );
 
-        for ( Iterator it = store.getAllProjectsByName().iterator(); it.hasNext(); )
+        for ( Iterator it = store.getAllProjectsByNameWithBuildDetails().iterator(); it.hasNext(); )
         {
             Project project = (Project) it.next();
 
+            for ( Iterator notifierIt = project.getNotifiers().iterator(); notifierIt.hasNext(); )
+            {
+                ProjectNotifier notifier = (ProjectNotifier) notifierIt.next();
+
+                if ( StringUtils.isEmpty( notifier.getType() ) )
+                {
+                    try
+                    {
+                        removeNotifier( project.getId(), notifier.getId() );
+                    }
+                    catch ( ContinuumException e )
+                    {
+                        throw new InitializationException( "Database is corrupted.", e );
+                    }
+                }
+            }
+
             if ( project.getState() != ContinuumProjectState.NEW &&
-                 project.getState() != ContinuumProjectState.OK &&
-                 project.getState() != ContinuumProjectState.FAILED &&
-                 project.getState() != ContinuumProjectState.ERROR )
+                project.getState() != ContinuumProjectState.CHECKEDOUT &&
+                project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED &&
+                project.getState() != ContinuumProjectState.ERROR )
             {
+                int state = project.getState();
+
                 project.setState( project.getOldState() );
 
                 project.setOldState( 0 );
 
                 try
                 {
+                    getLogger().info( "Fix project state for project " + project.getId() + ":" + project.getName() +
+                        ":" + project.getVersion() );
+
                     store.updateProject( project );
+
+                    Project p = store.getProject( project.getId() );
+
+                    if ( state == p.getState() )
+                    {
+                        getLogger().info( "Can't fix the project state." );
+                    }
                 }
-                catch( ContinuumStoreException e )
+                catch ( ContinuumStoreException e )
                 {
                     throw new InitializationException( "Database is corrupted.", e );
                 }
             }
-            
-            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getExecutorId() );
+
+            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getVersion() + ":" +
+                project.getExecutorId() );
         }
     }
 
@@ -1837,9 +2023,25 @@
         }
     }
 
+    private void closeStore()
+    {
+        store.closeStore();
+    }
+
     public void stop()
         throws StoppingException
     {
+        stopContinuum();
+    }
+
+    public void stopContinuum()
+        throws StoppingException
+    {
+        if ( stopped )
+        {
+            return;
+        }
+
         try
         {
             configurationService.store();
@@ -1849,7 +2051,11 @@
             throw new StoppingException( "Error storing the Continuum configuration.", e );
         }
 
+        closeStore();
+
         stopMessage();
+
+        stopped = true;
     }
 
     public Collection getBuildResultsForProject( int projectId )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java Tue May 16 03:26:59 2006
@@ -19,17 +19,17 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.scheduler.ContinuumBuildJob;
-import org.apache.maven.continuum.scheduler.ContinuumScheduler;
 import org.apache.maven.continuum.scheduler.ContinuumSchedulerConstants;
-import org.apache.maven.continuum.scheduler.ContinuumSchedulerException;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.scheduler.AbstractJob;
+import org.codehaus.plexus.scheduler.Scheduler;
 import org.codehaus.plexus.util.StringUtils;
 import org.quartz.CronTrigger;
 import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
-import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
 
 import java.text.ParseException;
 import java.util.Collection;
@@ -52,7 +52,7 @@
     /**
      * @plexus.requirement
      */
-    private ContinuumScheduler scheduler;
+    private Scheduler scheduler;
 
     //private int delay = 3600;
     private int delay = 1;
@@ -130,13 +130,14 @@
 
         dataMap.put( "continuum", continuum );
 
-        dataMap.put( "logger", getLogger() );
+        dataMap.put( AbstractJob.LOGGER, getLogger() );
 
         dataMap.put( ContinuumSchedulerConstants.SCHEDULE, schedule );
 
         //the name + group makes the job unique
 
-        JobDetail jobDetail = new JobDetail( schedule.getName(), Scheduler.DEFAULT_GROUP, ContinuumBuildJob.class );
+        JobDetail jobDetail =
+            new JobDetail( schedule.getName(), org.quartz.Scheduler.DEFAULT_GROUP, ContinuumBuildJob.class );
 
         jobDetail.setJobDataMap( dataMap );
 
@@ -146,7 +147,7 @@
 
         trigger.setName( schedule.getName() );
 
-        trigger.setGroup( Scheduler.DEFAULT_GROUP );
+        trigger.setGroup( org.quartz.Scheduler.DEFAULT_GROUP );
 
         Date startTime = new Date( System.currentTimeMillis() + delay * 1000 );
 
@@ -169,7 +170,7 @@
 
             getLogger().info( trigger.getNextFireTime() + "" );
         }
-        catch ( ContinuumSchedulerException e )
+        catch ( SchedulerException e )
         {
             throw new SchedulesActivationException( "Cannot schedule build job.", e );
         }
@@ -184,12 +185,12 @@
             {
                 getLogger().info( "Stopping active schedule \"" + schedule.getName() + "\"." );
 
-                scheduler.interruptSchedule( schedule.getName(), Scheduler.DEFAULT_GROUP );
+                scheduler.interruptSchedule( schedule.getName(), org.quartz.Scheduler.DEFAULT_GROUP );
             }
 
-            scheduler.unscheduleJob( schedule.getName(), Scheduler.DEFAULT_GROUP );
+            scheduler.unscheduleJob( schedule.getName(), org.quartz.Scheduler.DEFAULT_GROUP );
         }
-        catch ( ContinuumSchedulerException e )
+        catch ( SchedulerException e )
         {
             throw new SchedulesActivationException( "Cannot unschedule build job \"" + schedule.getName() + "\".", e );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java?rev=406895&r1=406894&r2=406895&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java Tue May 16 03:26:59 2006
@@ -17,7 +17,6 @@
  */
 
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
@@ -35,11 +34,6 @@
      * @plexus.requirement
      */
     private BuildController controller;
-
-    /**
-     * @plexus.requirement
-     */
-    private ContinuumStore store;
 
     // ----------------------------------------------------------------------
     // TaskExecutor Implementation



Mime
View raw message