You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by br...@apache.org on 2005/08/12 12:09:34 UTC

svn commit: r232255 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core-it/src/test/java/org/apache/maven/continuum/it/ continuum-core/src/mai...

Author: brett
Date: Fri Aug 12 03:09:09 2005
New Revision: 232255

URL: http://svn.apache.org/viewcvs?rev=232255&view=rev
Log:
remove the old scheduler

Removed:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/AbstractContinuumTrigger.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/ContinuumTrigger.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/quartz/QuartzAlarmClockTrigger.java
    maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml
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-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.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/scheduler/ContinuumScheduler.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/DefaultContinuumScheduler.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-plexus-application/src/conf/application.xml
    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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -22,7 +22,6 @@
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
@@ -183,18 +182,6 @@
     // ----------------------------------------------------------------------
     // Schedules
     // ----------------------------------------------------------------------
-
-    Collection getSchedules()
-        throws ContinuumException;
-
-    ContinuumSchedule getSchedule( String scheduleId )
-        throws ContinuumException;
-
-    ContinuumSchedule addSchedule( ContinuumSchedule schedule )
-        throws ContinuumException;
-
-    ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
-        throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Project scheduling

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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -27,7 +27,6 @@
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 
 import java.io.File;
 import java.util.Collection;
@@ -94,18 +93,6 @@
         throws ContinuumStoreException;
 
     ProjectNotifier storeNotifier( ProjectNotifier notifier )
-        throws ContinuumStoreException;
-
-    ContinuumSchedule addSchedule( ContinuumSchedule schedule )
-        throws ContinuumStoreException;
-
-    ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
-        throws ContinuumStoreException;
-
-    Collection getSchedules()
-        throws ContinuumStoreException;
-
-    ContinuumSchedule getSchedule( String scheduleId )
         throws ContinuumStoreException;
 
     ContinuumBuildSettings addBuildSettings( ContinuumBuildSettings buildSettings )

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java?rev=232255&r1=232254&r2=232255&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java Fri Aug 12 03:09:09 2005
@@ -23,7 +23,6 @@
 import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
@@ -342,24 +341,6 @@
     // ----------------------------------------------------------------------
     // Schedules
     // ----------------------------------------------------------------------
-
-    public ContinuumSchedule getSchedule( String scheduleId )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ContinuumSchedule addSchedule( ContinuumSchedule schedule )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
 
     // ----------------------------------------------------------------------
     //

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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -39,14 +39,12 @@
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
-import org.apache.maven.continuum.scheduler.ContinuumScheduler;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
@@ -92,11 +90,6 @@
     /**
      * @plexus.requirement
      */
-    private ContinuumScheduler scheduler;
-
-    /**
-     * @plexus.requirement
-     */
     private ConfigurationService configurationService;
 
     /**
@@ -842,66 +835,6 @@
 
         stopMessage();
     }
-
-    // ----------------------------------------------------------------------
-    // Build Scheduling
-    // ----------------------------------------------------------------------
-
-    public ContinuumSchedule getSchedule( String scheduleId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getSchedule( scheduleId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting schedule '" + scheduleId + "'.", ex );
-        }
-    }
-
-    public Collection getSchedules()
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getSchedules();
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting schedules.", ex );
-        }
-    }
-
-    public ContinuumSchedule addSchedule( ContinuumSchedule schedule )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.addSchedule( schedule );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while removing schedule.", ex );
-        }
-    }
-
-    public ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.updateSchedule( schedule );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while removing schedule.", ex );
-        }
-    }
-
-    // ----------------------------------------------------------------------
-    // Project scheduling
-    // ----------------------------------------------------------------------
 
     public ContinuumBuildSettings getDefaultBuildSettings()
     {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumScheduler.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumScheduler.java?rev=232255&r1=232254&r2=232255&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumScheduler.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumScheduler.java Fri Aug 12 03:09:09 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.quartz.JobDetail;
 import org.quartz.JobListener;
 import org.quartz.Trigger;
@@ -16,6 +32,4 @@
 
     void addGlobalTriggerListener( TriggerListener listener );
 
-    boolean jobExists( String jobGroup, String jobName )
-        throws ContinuumSchedulerException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/DefaultContinuumScheduler.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/DefaultContinuumScheduler.java?rev=232255&r1=232254&r2=232255&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/DefaultContinuumScheduler.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/DefaultContinuumScheduler.java Fri Aug 12 03:09:09 2005
@@ -1,7 +1,22 @@
 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.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -14,21 +29,15 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
-import org.quartz.CronTrigger;
-import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
 import org.quartz.JobListener;
-import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
 import org.quartz.SchedulerFactory;
 import org.quartz.Trigger;
 import org.quartz.TriggerListener;
-import org.quartz.Job;
 import org.quartz.impl.StdScheduler;
 import org.quartz.impl.StdSchedulerFactory;
 
-import java.text.ParseException;
-import java.util.Date;
 import java.util.Properties;
 
 public class DefaultContinuumScheduler
@@ -45,14 +54,14 @@
     //
     // ----------------------------------------------------------------------
 
-    public boolean jobExists( String jobName, String jobGroup )
+    private boolean jobExists( String jobName, String jobGroup )
         throws ContinuumSchedulerException
     {
         String[] jobNames;
 
         try
         {
-             jobNames = scheduler.getJobNames( jobGroup );
+            jobNames = scheduler.getJobNames( jobGroup );
         }
         catch ( SchedulerException e )
         {
@@ -72,76 +81,13 @@
         return false;
     }
 
-    /**
-     * Create job detail for a build job. The detail contains a map of objects that can be utilized
-     * by the executing job.
-     */
-    protected JobDetail createJobDetail( ContinuumSchedule schedule )
-    {
-        JobDetail jobDetail = new JobDetail( schedule.getName(), Scheduler.DEFAULT_GROUP, ContinuumBuildJob.class );
-
-        jobDetail.setJobDataMap( createJobDataMap( schedule ) );
-
-        return jobDetail;
-    }
-
-    /**
-     * Create Job data map for a build job. The map of objects created can be utilized by
-     * the executing job.
-     */
-    protected JobDataMap createJobDataMap( ContinuumSchedule schedule )
-    {
-        JobDataMap dataMap = new JobDataMap();
-
-        dataMap.put( ContinuumSchedulerConstants.CONTINUUM, continuum );
-
-        dataMap.put( ContinuumSchedulerConstants.LOGGER, getLogger() );
-
-        dataMap.put( ContinuumSchedulerConstants.SCHEDULE, schedule );
-
-        return dataMap;
-    }
-
-    /**
-     * Create the trigger for the build job.
-     *
-     * @param schedule
-     * @return
-     * @throws ContinuumSchedulerException
-     */
-    protected Trigger createTrigger( ContinuumSchedule schedule )
-        throws ContinuumSchedulerException
-    {
-        CronTrigger trigger = new CronTrigger();
-
-        trigger.setName( schedule.getName() );
-
-        trigger.setGroup( Scheduler.DEFAULT_GROUP );
-
-        Date startTime = new Date( System.currentTimeMillis() + schedule.getDelay() * 1000 );
-
-        trigger.setStartTime( startTime );
-
-        trigger.setNextFireTime( startTime );
-
-        try
-        {
-            trigger.setCronExpression( schedule.getCronExpression() );
-        }
-        catch ( ParseException e )
-        {
-            throw new ContinuumSchedulerException( "Error parsing cron expression.", e );
-        }
-
-        return trigger;
-    }
-
     public void scheduleJob( JobDetail jobDetail, Trigger trigger )
         throws ContinuumSchedulerException
     {
-        if ( jobExists( jobDetail.getName(), jobDetail.getGroup()) )
+        if ( jobExists( jobDetail.getName(), jobDetail.getGroup() ) )
         {
-            getLogger().warn( "Will not schedule this job as a job {" + jobDetail.getName() + ":" + jobDetail.getGroup() + "} already exists." );
+            getLogger().warn( "Will not schedule this job as a job {" + jobDetail.getName() + ":" +
+                jobDetail.getGroup() + "} already exists." );
 
             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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -8,9 +8,6 @@
           <role>org.codehaus.plexus.action.ActionManager</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
-        </requirement>
-        <requirement>
           <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
         </requirement>
         <requirement>
@@ -151,23 +148,6 @@
       </requirements>
     </component>
 
-    <!-- Triggers -->
-
-    <component>
-      <role>org.apache.maven.continuum.trigger.ContinuumTrigger</role>
-      <role-hint>alarm-clock</role-hint>
-      <implementation>org.apache.maven.continuum.trigger.alarmclock.AlarmClockTrigger</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.Continuum</role>
-        </requirement>
-      </requirements>
-      <configuration>
-        <interval>60000</interval>
-        <delay>3000</delay>
-      </configuration>
-    </component>
-
     <!-- ConnectionConsumer -->
     <component>
       <role>org.apache.maven.continuum.network.ConnectionConsumer</role>
@@ -465,62 +445,62 @@
      | JDO
      |
      |-->
-<!--
-    <component>
-      <role>org.codehaus.plexus.jdo.JdoFactory</role>
-      <implementation>org.codehaus.plexus.jdo.DefaultJdoFactory</implementation>
-      <configuration>
-        <properties>
-          <property>
-            <name>javax.jdo.PersistenceManagerFactoryClass</name>
-            <value>org.jpox.PersistenceManagerFactoryImpl</value>
-          </property>
-          <property>
-            <name>javax.jdo.option.ConnectionDriverName</name>
-            <value>org.hsqldb.jdbcDriver</value>
-          </property>
-          <property>
-            <name>javax.jdo.option.ConnectionURL</name>
-            <value>jdbc:hsqldb:faen</value>
-          </property>
-          <property>
-            <name>javax.jdo.option.ConnectionUserName</name>
-            <value>sa</value>
-          </property>
-          <property>
-            <name>javax.jdo.option.ConnectionPassword</name>
-            <value></value>
-          </property>
-          <property>
-            <name>org.jpox.transactionIsolation</name>
-            <value>READ_UNCOMMITTED</value>
-          </property>
-          <property>
-            <name>org.jpox.poid.transactionIsolation</name>
-            <value>READ_UNCOMMITTED</value>
-          </property>
-          <property>
-            <name>org.jpox.autoStartMechanism</name>
-            <value>SchemaTable</value>
-          </property>
-          <property>
-            <name>org.jpox.autoCreateSchema</name>
-            <value>true</value>
-          </property>
-          <property>
-            <name>org.jpox.autoStartMechanismMode</name>
-            <value>Quiet</value>
-          </property>
-          <!- - TODO: check if we need this on
-                    <property>
-                      <name>javax.jdo.option.Multithreaded</name>
-                      <value>true</value>
-                    </property>
-          - ->
-        </properties>
-      </configuration>
-    </component>
--->
+    <!--
+        <component>
+          <role>org.codehaus.plexus.jdo.JdoFactory</role>
+          <implementation>org.codehaus.plexus.jdo.DefaultJdoFactory</implementation>
+          <configuration>
+            <properties>
+              <property>
+                <name>javax.jdo.PersistenceManagerFactoryClass</name>
+                <value>org.jpox.PersistenceManagerFactoryImpl</value>
+              </property>
+              <property>
+                <name>javax.jdo.option.ConnectionDriverName</name>
+                <value>org.hsqldb.jdbcDriver</value>
+              </property>
+              <property>
+                <name>javax.jdo.option.ConnectionURL</name>
+                <value>jdbc:hsqldb:faen</value>
+              </property>
+              <property>
+                <name>javax.jdo.option.ConnectionUserName</name>
+                <value>sa</value>
+              </property>
+              <property>
+                <name>javax.jdo.option.ConnectionPassword</name>
+                <value></value>
+              </property>
+              <property>
+                <name>org.jpox.transactionIsolation</name>
+                <value>READ_UNCOMMITTED</value>
+              </property>
+              <property>
+                <name>org.jpox.poid.transactionIsolation</name>
+                <value>READ_UNCOMMITTED</value>
+              </property>
+              <property>
+                <name>org.jpox.autoStartMechanism</name>
+                <value>SchemaTable</value>
+              </property>
+              <property>
+                <name>org.jpox.autoCreateSchema</name>
+                <value>true</value>
+              </property>
+              <property>
+                <name>org.jpox.autoStartMechanismMode</name>
+                <value>Quiet</value>
+              </property>
+              <!- - TODO: check if we need this on
+                        <property>
+                          <name>javax.jdo.option.Multithreaded</name>
+                          <value>true</value>
+                        </property>
+              - ->
+            </properties>
+          </configuration>
+        </component>
+    -->
     <!--
      |
      | Velocity
@@ -691,7 +671,8 @@
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-project-from-working-directory</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
+      <implementation>
+        org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>

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=232255&r1=232254&r2=232255&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Fri Aug 12 03:09:09 2005
@@ -841,35 +841,6 @@
 
     <class stash.storable="true">
       <packageName>org.apache.maven.continuum.project</packageName>
-      <name>ContinuumSchedule</name>
-      <version>1.0.0</version>
-      <description><![CDATA[
-          Schedule for a project.
-        ]]></description>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>delay</name>
-          <description><![CDATA[
-              Delay in seconds.
-            ]]></description>
-          <version>1.0.0</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>cronExpression</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
-
-    <class stash.storable="true">
-      <packageName>org.apache.maven.continuum.project</packageName>
       <name>MavenTwoProject</name>
       <version>1.0.0</version>
       <superClass>ContinuumProject</superClass>

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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -54,12 +54,6 @@
       </fetch-group>
     </class>
 
-    <class name="ContinuumSchedule" detachable="true">
-      <field name="name" persistence-modifier="persistent"/>
-      <field name="delay" persistence-modifier="persistent"/>
-      <field name="cronExpression" persistence-modifier="persistent"/>
-    </class>
-
     <class name="MavenTwoProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
            detachable="true">
       <inheritance strategy="new-table"/>

Modified: maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml?rev=232255&r1=232254&r2=232255&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml (original)
+++ maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml Fri Aug 12 03:09:09 2005
@@ -4,12 +4,6 @@
     <component>
       <role>org.apache.maven.continuum.Continuum</role>
     </component>
-    <!--
-    <component>
-      <role>org.apache.maven.continuum.trigger.ContinuumTrigger</role>
-      <role-hint>quartz-alarm-clock</role-hint>
-    </component>
-    -->
     <component>
       <role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
       <role-hint>build-project</role-hint>
@@ -214,58 +208,6 @@
     <component>
       <role>org.codehaus.plexus.msn.MsnClient</role>
       <implementation>org.codehaus.plexus.msn.DefaultMsnClient</implementation>
-    </component>
-
-    <!--
-    | The alarm trigger
-    |-->
-    <component>
-      <role>org.apache.maven.continuum.trigger.ContinuumTrigger</role>
-      <role-hint>alarm-clock</role-hint>
-      <implementation>org.apache.maven.continuum.trigger.alarmclock.AlarmClockTrigger</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.Continuum</role>
-        </requirement>
-      </requirements>
-      <configuration>
-        <!--
-        | The interval in number of seconds between scheduling the projects.
-        | The default value is one hour.
-        |-->
-        <interval>3600</interval>
-        <!--
-        | The delay to wait after startup.
-        | The default value is one hour.
-        |-->
-        <delay>3600</delay>
-      </configuration>
-    </component>
-
-    <component>
-      <role>org.apache.maven.continuum.trigger.ContinuumTrigger</role>
-      <role-hint>quartz-alarm-clock</role-hint>
-      <implementation>org.apache.maven.continuum.trigger.quartz.QuartzAlarmClockTrigger</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.Continuum</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
-        </requirement>
-      </requirements>
-      <configuration>
-        <!--
-        | The interval in number of seconds between scheduling the projects.
-        | The default value is one hour.
-        |-->
-        <interval>3600</interval>
-        <!--
-        | The delay to wait after startup.
-        | The default value is one hour.
-        |-->
-        <delay>3600</delay>
-      </configuration>
     </component>
 
     <component>

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=232255&r1=232254&r2=232255&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 Fri Aug 12 03:09:09 2005
@@ -28,7 +28,6 @@
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.apache.maven.continuum.project.ContinuumSchedule;
 import org.codehaus.plexus.jdo.JdoFactory;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
@@ -151,26 +150,6 @@
         {
             tx.begin();
 
-            // ----------------------------------------------------------------------
-            // Work around for bug with M:N relationships. We must persist the list
-            // of schedules or they don't get saved.
-            // ----------------------------------------------------------------------
-
-//            if ( project.getSchedules() != null && project.getSchedules().size() > 0 )
-//            {
-//                pm.attachCopyAll( project.getSchedules(), true );
-//            }
-//
-//            if ( project.getProjectGroup() != null )
-//            {
-//                pm.attachCopy( project.getProjectGroup(), true );
-//            }
-//
-//            if ( project.getScmResult() != null )
-//            {
-//                pm.attachCopy( project.getScmResult(), true );
-//            }
-
             pm.attachCopy( project, true );
 
             tx.commit();
@@ -353,79 +332,6 @@
         }
     }
 
-    public ContinuumSchedule addSchedule( ContinuumSchedule schedule )
-        throws ContinuumStoreException
-    {
-        return (ContinuumSchedule) addObject( schedule, SCHEDULE_DETAIL_FG );
-    }
-
-    public ContinuumSchedule getSchedule( String projectId )
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            ContinuumSchedule schedule = getContinuumSchedule( pm, projectId, true );
-
-            schedule = (ContinuumSchedule) pm.detachCopy( schedule );
-
-            tx.commit();
-
-            return schedule;
-        }
-        catch ( JDOObjectNotFoundException e )
-        {
-            throw new ContinuumObjectNotFoundException( ContinuumProject.class.getName(), projectId );
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
-    public Collection getSchedules()
-        throws ContinuumStoreException
-    {
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( ContinuumSchedule.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 );
-        }
-    }
-
-    public ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
-        throws ContinuumStoreException
-    {
-        updateObject( schedule );
-        return schedule;
-    }
-
     public ContinuumBuild addBuild( String projectId, ContinuumBuild build )
         throws ContinuumStoreException
     {
@@ -704,18 +610,6 @@
         Object id = pm.newObjectIdInstance( ContinuumBuild.class, buildId );
 
         return (ContinuumBuild) pm.getObjectById( id );
-    }
-
-    private ContinuumSchedule getContinuumSchedule( PersistenceManager pm, String projectId, boolean details )
-    {
-        if ( details )
-        {
-            pm.getFetchPlan().addGroup( "schedule-detail" );
-        }
-
-        Object id = pm.newObjectIdInstance( ContinuumSchedule.class, projectId );
-
-        return (ContinuumSchedule) pm.getObjectById( id );
     }
 
     private Object addObject( Object object, String detailedFetchGroup )