continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r232767 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/build/settings/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core...
Date Mon, 15 Aug 2005 06:58:18 GMT
Author: brett
Date: Sun Aug 14 23:57:55 2005
New Revision: 232767

URL: http://svn.apache.org/viewcvs?rev=232767&view=rev
Log:
use schedules instead of ContinuumBuildSettings

Added:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivationException.java
      - copied, changed from r232205, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivationException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivator.java
      - copied, changed from r232205, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
      - copied, changed from r232205, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultBuildSettingsActivator.java
Removed:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivationException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultBuildSettingsActivator.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/store/ContinuumStore.java
    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/initialization/ContinuumInitializer.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/scheduler/ContinuumBuildJob.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
    maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

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=232767&r1=232766&r2=232767&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
Sun Aug 14 23:57:55 2005
@@ -19,7 +19,6 @@
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
@@ -134,8 +133,6 @@
 
     void removeNotifier( String projectId, String notifierType )
         throws ContinuumException;
-
-    ContinuumBuildSettings getDefaultBuildSettings();
 
     Collection getBuildResultsForProject( String projectId )
         throws ContinuumException;

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivationException.java
(from r232205, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivationException.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivationException.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivationException.java&p1=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivationException.java&r1=232205&r2=232767&rev=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivationException.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivationException.java
Sun Aug 14 23:57:55 2005
@@ -4,20 +4,20 @@
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id:$
  */
-public class BuildSettingsActivationException
+public class SchedulesActivationException
     extends Exception
 {
-    public BuildSettingsActivationException( String message )
+    public SchedulesActivationException( String message )
     {
         super( message );
     }
 
-    public BuildSettingsActivationException( Throwable cause )
+    public SchedulesActivationException( Throwable cause )
     {
         super( cause );
     }
 
-    public BuildSettingsActivationException( String message, Throwable cause )
+    public SchedulesActivationException( String message, Throwable cause )
     {
         super( message, cause );
     }

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivator.java
(from r232205, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivator.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivator.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivator.java&p1=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivator.java&r1=232205&r2=232767&rev=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/BuildSettingsActivator.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/build/settings/SchedulesActivator.java
Sun Aug 14 23:57:55 2005
@@ -1,22 +1,38 @@
 package org.apache.maven.continuum.build.settings;
 
+/*
+ * Copyright 2004-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.Continuum;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id:$
  */
-public interface BuildSettingsActivator
+public interface SchedulesActivator
 {
-    String ROLE = BuildSettingsActivator.class.getName();
+    String ROLE = SchedulesActivator.class.getName();
 
     /**
-     * Grab all the stored {@link org.apache.maven.continuum.project.ContinuumBuildSettings}
objects
+     * Grab all the stored {@link org.apache.maven.continuum.model.project.Schedule} objects
      * and activate them by looking at the scheduling information contained within and submitting
a
      * Job to the scheduler.
      *
-     * @throws BuildSettingsActivationException
+     * @throws SchedulesActivationException
      */
-    void activateBuildSettings( Continuum continuum )
-        throws BuildSettingsActivationException;
+    void activateSchedules( Continuum continuum )
+        throws SchedulesActivationException;
 }

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=232767&r1=232766&r2=232767&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
Sun Aug 14 23:57:55 2005
@@ -24,7 +24,6 @@
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 
 import java.io.File;
@@ -71,21 +70,6 @@
         throws ContinuumStoreException;
 
     ProjectNotifier storeNotifier( ProjectNotifier notifier )
-        throws ContinuumStoreException;
-
-    ContinuumBuildSettings addBuildSettings( ContinuumBuildSettings buildSettings )
-        throws ContinuumStoreException;
-
-    ContinuumBuildSettings updateBuildSettings( ContinuumBuildSettings buildSettings )
-        throws ContinuumStoreException;
-
-    void removeBuildSettings( String buildSettingsId )
-        throws ContinuumStoreException;
-
-    ContinuumBuildSettings getBuildSettings( String buildSettingsId )
-        throws ContinuumStoreException;
-
-    Collection getBuildSettings()
         throws ContinuumStoreException;
 
     ProjectGroup addProjectGroup( ProjectGroup group );

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=232767&r1=232766&r2=232767&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
Sun Aug 14 23:57:55 2005
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.build.settings.BuildSettingsActivationException;
-import org.apache.maven.continuum.build.settings.BuildSettingsActivator;
+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.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
@@ -34,7 +34,6 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
@@ -99,7 +98,7 @@
     /**
      * @plexus.requirement
      */
-    private BuildSettingsActivator buildSettingsActivator;
+    private SchedulesActivator schedulesActivator;
 
     // ----------------------------------------------------------------------
     // Moved from core
@@ -682,9 +681,9 @@
             // Activate all the Build settings in the system
             // ----------------------------------------------------------------------
 
-            buildSettingsActivator.activateBuildSettings( this );
+            schedulesActivator.activateSchedules( this );
         }
-        catch ( BuildSettingsActivationException e )
+        catch ( SchedulesActivationException e )
         {
             throw new StartingException( "Error activating build settings.", e );
         }
@@ -711,11 +710,6 @@
         }
 
         stopMessage();
-    }
-
-    public ContinuumBuildSettings getDefaultBuildSettings()
-    {
-        return initializer.getDefaultBuildSettings();
     }
 
     public Collection getBuildResultsForProject( String projectId )

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
(from r232205, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultBuildSettingsActivator.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultBuildSettingsActivator.java&r1=232205&r2=232767&rev=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultBuildSettingsActivator.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
Sun Aug 14 23:57:55 2005
@@ -17,12 +17,11 @@
  */
 
 import org.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
+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.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.util.StringUtils;
 import org.quartz.CronTrigger;
@@ -39,9 +38,9 @@
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id:$
  */
-public class DefaultBuildSettingsActivator
+public class DefaultSchedulesActivator
     extends AbstractLogEnabled
-    implements BuildSettingsActivator
+    implements SchedulesActivator
 {
     /**
      * @plexus.requirement
@@ -56,39 +55,32 @@
     //private int delay = 3600;
     private int delay = 1;
 
-    public void activateBuildSettings( Continuum continuum )
-        throws BuildSettingsActivationException
+    public void activateSchedules( Continuum continuum )
+        throws SchedulesActivationException
     {
         getLogger().info( "Activating build settings ..." );
 
-        try
+        Collection schedules = store.getAllSchedulesByName();
+
+        for ( Iterator i = schedules.iterator(); i.hasNext(); )
         {
-            Collection buildSettingsCollection = store.getBuildSettings();
+            Schedule schedule = (Schedule) i.next();
 
-            for ( Iterator i = buildSettingsCollection.iterator(); i.hasNext(); )
+            if ( StringUtils.isEmpty( schedule.getCronExpression() ) )
             {
-                ContinuumBuildSettings buildSettings = (ContinuumBuildSettings) i.next();
-
-                if ( StringUtils.isEmpty( buildSettings.getCronExpression() ) )
-                {
-                    // TODO: this can possibly be removed but it's here now to
-                    // weed out any bugs
-                    getLogger().info( "Not scheduling " + buildSettings.getName() );
-
-                    continue;
-                }
+                // TODO: this can possibly be removed but it's here now to
+                // weed out any bugs
+                getLogger().info( "Not scheduling " + schedule.getName() );
 
-                scheduleBuildSettings( buildSettings, continuum );
+                continue;
             }
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw new BuildSettingsActivationException( "Error activating build settings.",
e );
+
+            schedule( schedule, continuum );
         }
     }
 
-    protected void scheduleBuildSettings( ContinuumBuildSettings buildSettings, Continuum
continuum )
-        throws BuildSettingsActivationException
+    protected void schedule( Schedule schedule, Continuum continuum )
+        throws SchedulesActivationException
     {
         JobDataMap dataMap = new JobDataMap();
 
@@ -98,13 +90,13 @@
 
         //the name + group makes the job unique
 
-        JobDetail jobDetail = new JobDetail( buildSettings.getName(), Scheduler.DEFAULT_GROUP,
ContinuumBuildJob.class );
+        JobDetail jobDetail = new JobDetail( schedule.getName(), Scheduler.DEFAULT_GROUP,
ContinuumBuildJob.class );
 
         jobDetail.setJobDataMap( dataMap );
 
         CronTrigger trigger = new CronTrigger();
 
-        trigger.setName( buildSettings.getName() );
+        trigger.setName( schedule.getName() );
 
         trigger.setGroup( Scheduler.DEFAULT_GROUP );
 
@@ -116,11 +108,11 @@
 
         try
         {
-            trigger.setCronExpression( buildSettings.getCronExpression() );
+            trigger.setCronExpression( schedule.getCronExpression() );
         }
         catch ( ParseException e )
         {
-            throw new BuildSettingsActivationException( "Error parsing cron expression.",
e );
+            throw new SchedulesActivationException( "Error parsing cron expression.", e );
         }
 
         try
@@ -131,7 +123,7 @@
         }
         catch ( ContinuumSchedulerException e )
         {
-            throw new BuildSettingsActivationException( "Cannot schedule build job.", e );
+            throw new SchedulesActivationException( "Cannot schedule build job.", e );
         }
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
Sun Aug 14 23:57:55 2005
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
-
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id:$
@@ -29,5 +27,4 @@
     void initialize()
         throws ContinuumInitializationException;
 
-    ContinuumBuildSettings getDefaultBuildSettings();
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Sun Aug 14 23:57:55 2005
@@ -16,14 +16,14 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
+import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id:$
+ * @todo use this, reintroduce default project group
  */
 public class DefaultContinuumInitializer
     extends AbstractLogEnabled
@@ -43,17 +43,13 @@
     // Default values for the default build settings
     // ----------------------------------------------------------------------
 
-    public static final String DEFAULT_BUILD_SETTINGS_NAME = "DEFAULT_BUILD_SETTINGS";
+    public static final String DEFAULT_SCHEDULE_NAME = "DEFAULT_BUILD_SETTINGS";
 
     // Cron expression for execution every hour.
     //public static final String DEFAULT_BUILD_SETTINGS_CRON_EXPRESSION = "0 0 * * * ?";
-    public static final String DEFAULT_BUILD_SETTINGS_CRON_EXPRESSION = "0 * * * * ?";
+    public static final String DEFAULT_SCHEDULE_CRON_EXPRESSION = "0 * * * * ?";
 
-    // ----------------------------------------------------------------------
-    // Default project group and build settings
-    // ----------------------------------------------------------------------
-
-    private ContinuumBuildSettings defaultBuildSettings;
+    private Schedule defaultSchedule;
 
     // ----------------------------------------------------------------------
     //  Requirements
@@ -73,36 +69,24 @@
     {
         getLogger().info( "Continuum initializer running ..." );
 
-        defaultBuildSettings = createDefaultBuildSettings();
+        defaultSchedule = createDefaultSchedule();
 
-        try
-        {
-            defaultBuildSettings = store.addBuildSettings( defaultBuildSettings );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw new ContinuumInitializationException( "Error storing default Continuum
build settings.", e );
-        }
-    }
-
-    public ContinuumBuildSettings getDefaultBuildSettings()
-    {
-        return defaultBuildSettings;
+        defaultSchedule = store.addSchedule( defaultSchedule );
     }
 
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildSettings createDefaultBuildSettings()
+    public Schedule createDefaultSchedule()
         throws ContinuumInitializationException
     {
-        ContinuumBuildSettings buildSettings = new ContinuumBuildSettings();
+        Schedule schedule = new Schedule();
 
-        buildSettings.setName( DEFAULT_BUILD_SETTINGS_NAME );
+        schedule.setName( DEFAULT_SCHEDULE_NAME );
 
-        buildSettings.setCronExpression( DEFAULT_BUILD_SETTINGS_CRON_EXPRESSION );
+        schedule.setCronExpression( DEFAULT_SCHEDULE_CRON_EXPRESSION );
 
-        return buildSettings;
+        return schedule;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
Sun Aug 14 23:57:55 2005
@@ -1,5 +1,21 @@
 package org.apache.maven.continuum.scheduler;
 
+/*
+ * Copyright 2004-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.codehaus.plexus.logging.Logger;
 import org.quartz.Job;
 import org.quartz.JobDetail;
@@ -27,8 +43,6 @@
         Logger logger = (Logger) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.LOGGER
);
 
         logger.info( ">>>>>>>>>>>>>>>>>>>>>
Executing build job ..." );
-
-        return;
 
         /*
 

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
Sun Aug 14 23:57:55 2005
@@ -17,7 +17,7 @@
           <role>org.apache.maven.continuum.initialization.ContinuumInitializer</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
+          <role>org.apache.maven.continuum.build.settings.SchedulesActivator</role>
         </requirement>
         <!-- from core -->
         <requirement>
@@ -51,8 +51,8 @@
     </component>
 
     <component>
-      <role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
-      <implementation>org.apache.maven.continuum.build.settings.DefaultBuildSettingsActivator</implementation>
+      <role>org.apache.maven.continuum.build.settings.SchedulesActivator</role>
+      <implementation>org.apache.maven.continuum.build.settings.DefaultSchedulesActivator</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.store.ContinuumStore</role>

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Sun Aug 14 23:57:55 2005
@@ -847,23 +847,5 @@
         </field>
       </fields>
     </class>
-
-    <class>
-      <packageName>org.apache.maven.continuum.project</packageName>
-      <name>ContinuumBuildSettings</name>
-      <version>1.0.0</version>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>cronExpression</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
   </classes>
 </model>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo Sun Aug
14 23:57:55 2005
@@ -59,10 +59,6 @@
         <field name="buildDefinitions"/>
       </fetch-group>
     </class>
-    <class name="ContinuumBuildSettings" detachable="true">
-      <field name="name" persistence-modifier="persistent"/>
-      <field name="cronExpression" persistence-modifier="persistent"/>
-    </class>
   </package>
 
   <!-- Really new stuff, TODO: remove the rest -->

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=232767&r1=232766&r2=232767&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Sun Aug 14 23:57:55 2005
@@ -24,7 +24,6 @@
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.jdo.JdoFactory;
@@ -388,82 +387,6 @@
     {
         updateObject( notifier );
         return notifier;
-    }
-
-    public ContinuumBuildSettings addBuildSettings( ContinuumBuildSettings buildSettings
)
-        throws ContinuumStoreException
-    {
-        return (ContinuumBuildSettings) addObject( buildSettings, BUILD_SETTINGS_DETAIL_FG
);
-    }
-
-    public ContinuumBuildSettings updateBuildSettings( ContinuumBuildSettings buildSettings
)
-        throws ContinuumStoreException
-    {
-        updateObject( buildSettings );
-        return buildSettings;
-    }
-
-    public void removeBuildSettings( String buildSettingsId )
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Object id = pm.newObjectIdInstance( ContinuumBuildSettings.class, buildSettingsId
);
-
-            ContinuumBuildSettings buildSettings = (ContinuumBuildSettings) pm.getObjectById(
id );
-
-            pm.deletePersistent( buildSettings );
-
-            tx.commit();
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
-    public ContinuumBuildSettings getBuildSettings( String buildSettingsId )
-        throws ContinuumStoreException
-    {
-        return (ContinuumBuildSettings) getDetailedObject( ContinuumBuildSettings.class,
buildSettingsId,
-                                                           "build-settings-detail" );
-    }
-
-    public Collection getBuildSettings()
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( ContinuumBuildSettings.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.setOrdering( "name ascending" );
-
-            Collection result = (Collection) query.execute();
-
-            result = pm.detachCopyAll( result );
-
-            tx.commit();
-
-            return result;
-        }
-        finally
-        {
-            rollback( tx );
-        }
     }
 
     private ContinuumProject setProjectState( ContinuumProject project )



Mime
View raw message