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/05 17:15:32 UTC
svn commit: r230482 - in /maven/continuum/trunk:
continuum-api/src/main/java/org/apache/maven/continuum/
continuum-core/src/main/java/org/apache/maven/continuum/
continuum-core/src/main/java/org/apache/maven/continuum/initialization/
continuum-core/src...
Author: brett
Date: Fri Aug 5 08:15:19 2005
New Revision: 230482
URL: http://svn.apache.org/viewcvs?rev=230482&view=rev
Log:
rollback rev 230478. I'm not ready to go there yet - this is new unwired code, not cruft.
Added:
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/ContinuumInitializer.java
- copied unchanged from r230477, 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
- copied unchanged from r230477, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Modified:
maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.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/ContinuumBuildJob.java
maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.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=230482&r1=230481&r2=230482&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 5 08:15:19 2005
@@ -16,29 +16,32 @@
* limitations under the License.
*/
+import java.util.Collection;
+import java.util.Map;
+import java.util.List;
+
import org.apache.maven.continuum.project.AntProject;
import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumNotifier;
import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumProjectGroup;
-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.ContinuumNotifier;
+import org.apache.maven.continuum.project.ContinuumSchedule;
+import org.apache.maven.continuum.project.ContinuumProjectGroup;
+import org.apache.maven.continuum.project.ContinuumBuildSettings;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.store.ContinuumStore;
import org.codehaus.plexus.util.dag.CycleDetectedException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
*/
-public interface Continuum
+ public interface Continuum
{
String ROLE = Continuum.class.getName();
@@ -93,7 +96,7 @@
void buildProject( String projectId, boolean force )
throws ContinuumException;
- void buildProjectGroup( ContinuumProjectGroup projectGroup )
+ void buildProjectGroup( ContinuumProjectGroup projectGroup, ContinuumBuildSettings buildSettings )
throws ContinuumException;
// ----------------------------------------------------------------------
@@ -167,6 +170,7 @@
void updateShellProject( ShellProject project )
throws ContinuumException;
+
// ----------------------------------------------------------------------
// Notification
// ----------------------------------------------------------------------
@@ -174,7 +178,7 @@
ContinuumNotifier getNotifier( String projectId, String notifierType )
throws ContinuumException;
- void updateNotifier( String projectId, String notifierType, Map configuration )
+ void updateNotifier( String projectId, String notifierType, Map configuration )
throws ContinuumException;
void addNotifier( String projectId, String notifierType, Map configuration )
@@ -187,10 +191,10 @@
// Schedules
// ----------------------------------------------------------------------
- Collection getSchedules()
+ Collection getSchedules()
throws ContinuumException;
- ContinuumSchedule getSchedule( String scheduleId )
+ ContinuumSchedule getSchedule( String scheduleId )
throws ContinuumException;
ContinuumSchedule addSchedule( ContinuumSchedule schedule )
@@ -199,7 +203,7 @@
ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
throws ContinuumException;
- void removeSchedule( String scheduleId )
+ void removeSchedule( String scheduleId )
throws ContinuumException;
// ----------------------------------------------------------------------
@@ -211,4 +215,18 @@
void removeProjectFromSchedule( ContinuumProject project, ContinuumSchedule schedule )
throws ContinuumException;
+
+ // ----------------------------------------------------------------------
+ // Project groups
+ // ----------------------------------------------------------------------
+
+ // ----------------------------------------------------------------------
+ // Build Settings
+ // ----------------------------------------------------------------------
+
+ // ----------------------------------------------------------------------
+ // Defaults
+ // ----------------------------------------------------------------------
+
+ ContinuumBuildSettings getDefaultBuildSettings();
}
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=230482&r1=230481&r2=230482&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 5 08:15:19 2005
@@ -30,8 +30,11 @@
import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
+import org.apache.maven.continuum.initialization.ContinuumInitializationException;
+import org.apache.maven.continuum.initialization.ContinuumInitializer;
import org.apache.maven.continuum.project.AntProject;
import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.project.ContinuumBuildSettings;
import org.apache.maven.continuum.project.ContinuumNotifier;
import org.apache.maven.continuum.project.ContinuumProject;
import org.apache.maven.continuum.project.ContinuumProjectGroup;
@@ -106,6 +109,11 @@
/**
* @plexus.requirement
*/
+ private ContinuumInitializer initializer;
+
+ /**
+ * @plexus.requirement
+ */
private BuildSettingsActivator buildSettingsActivator;
// ----------------------------------------------------------------------
@@ -325,7 +333,7 @@
}
}
- public void buildProjectGroup( ContinuumProjectGroup projectGroup )
+ public void buildProjectGroup( ContinuumProjectGroup projectGroup, ContinuumBuildSettings buildSettings )
throws ContinuumException
{
Set projects = projectGroup.getProjects();
@@ -892,6 +900,8 @@
if ( !configurationService.isInitialized() )
{
+ initializer.initialize();
+
configurationService.setInitialized( true );
}
@@ -909,6 +919,10 @@
{
throw new StartingException( "Error loading the Continuum configuration.", e );
}
+ catch ( ContinuumInitializationException e )
+ {
+ throw new StartingException( "Cannot initializing Continuum for the first time.", e );
+ }
}
public void stop()
@@ -1027,6 +1041,11 @@
{
throw logAndCreateException( "Error while removing project from schedule.", e );
}
+ }
+
+ public ContinuumBuildSettings getDefaultBuildSettings()
+ {
+ return initializer.getDefaultBuildSettings();
}
// ----------------------------------------------------------------------
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=230482&r1=230481&r2=230482&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 Fri Aug 5 08:15:19 2005
@@ -1,9 +1,16 @@
package org.apache.maven.continuum.scheduler;
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.project.ContinuumBuildSettings;
+import org.apache.maven.continuum.project.ContinuumProjectGroup;
import org.codehaus.plexus.logging.Logger;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
+
+import java.util.Iterator;
+import java.util.Set;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
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=230482&r1=230481&r2=230482&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 5 08:15:19 2005
@@ -17,6 +17,9 @@
<role>org.apache.maven.continuum.store.ContinuumStore</role>
</requirement>
<requirement>
+ <role>org.apache.maven.continuum.initialization.ContinuumInitializer</role>
+ </requirement>
+ <requirement>
<role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
</requirement>
<!-- from core -->
@@ -42,6 +45,16 @@
</component>
<component>
+ <role>org.apache.maven.continuum.initialization.ContinuumInitializer</role>
+ <implementation>org.apache.maven.continuum.initialization.DefaultContinuumInitializer</implementation>
+ <requirements>
+ <requirement>
+ <role>org.apache.maven.continuum.store.ContinuumStore</role>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
<role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
<implementation>org.apache.maven.continuum.build.settings.DefaultBuildSettingsActivator</implementation>
<requirements>
@@ -452,62 +465,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
@@ -678,8 +691,7 @@
<component>
<role>org.codehaus.plexus.action.Action</role>
<role-hint>update-project-from-working-directory</role-hint>
- <implementation>
- org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
+ <implementation>org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
<requirements>
<requirement>
<role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>