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 07:15:48 UTC
svn commit: r232207 - 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: Thu Aug 11 22:15:21 2005
New Revision: 232207
URL: http://svn.apache.org/viewcvs?rev=232207&view=rev
Log:
remove some unused fields to push towards new model
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/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/ContinuumXmlRpcClient.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
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-model/src/main/resources/continuum.mdo
maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -16,32 +16,30 @@
* 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.ContinuumBuildSettings;
+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();
@@ -170,7 +168,6 @@
void updateShellProject( ShellProject project )
throws ContinuumException;
-
// ----------------------------------------------------------------------
// Notification
// ----------------------------------------------------------------------
@@ -178,7 +175,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 )
@@ -191,19 +188,16 @@
// Schedules
// ----------------------------------------------------------------------
- Collection getSchedules()
+ Collection getSchedules()
throws ContinuumException;
- ContinuumSchedule getSchedule( String scheduleId )
+ ContinuumSchedule getSchedule( String scheduleId )
throws ContinuumException;
ContinuumSchedule addSchedule( ContinuumSchedule schedule )
throws ContinuumException;
ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
- throws ContinuumException;
-
- void removeSchedule( String scheduleId )
throws ContinuumException;
// ----------------------------------------------------------------------
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -103,9 +103,6 @@
ContinuumSchedule updateSchedule( ContinuumSchedule schedule )
throws ContinuumStoreException;
- void removeSchedule( String scheduleId )
- throws ContinuumStoreException;
-
Collection getSchedules()
throws ContinuumStoreException;
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -454,8 +454,7 @@
ContinuumProject project = getContinuum().getProject( projectId );
- while ( project.getScmResult() == null &&
- project.getCheckOutErrorMessage() == null & project.getCheckOutErrorException() == null )
+ while ( project.getCheckoutResult() == null )
{
if ( System.currentTimeMillis() - start > timeout )
{
@@ -477,18 +476,22 @@
String message = "The check out was not successful for project #" + project.getId() + ": ";
- if ( project.getScmResult() == null )
+ if ( project.getCheckoutResult() == null )
{
+/* TODO
print( "check out error message: " + project.getCheckOutErrorMessage() );
print( "check out error exception: " );
print( project.getCheckOutErrorException() );
+*/
fail( "project.scmResult == null" );
}
+/* TODO
assertEquals( message + "Checkout error message != null", null, project.getCheckOutErrorMessage() );
assertEquals( message + "Checkout error exception != null", null, project.getCheckOutErrorException() );
- assertTrue( message + "scmResult.success != true", project.getScmResult().isSuccess() );
+*/
+ assertTrue( message + "scmResult.success != true", project.getCheckoutResult().isSuccess() );
}
public ContinuumBuild waitForBuild( String buildId )
@@ -531,9 +534,9 @@
public void assertCheckedOutFiles( ContinuumProject project, String[] expectedCheckedOutFiles )
{
- assertNotNull( "project.scmResult", project.getScmResult() );
+ assertNotNull( "project.scmResult", project.getCheckoutResult() );
- ScmResult scmResult = project.getScmResult();
+ ScmResult scmResult = project.getCheckoutResult();
List actualCheckedOutFiles = scmResult.getFiles();
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -16,18 +16,17 @@
* limitations under the License.
*/
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.maven.continuum.project.AntProject;
-import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumNotifier;
import org.apache.maven.continuum.Continuum;
import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
-
+import org.apache.maven.continuum.project.AntProject;
+import org.apache.maven.continuum.project.ContinuumNotifier;
+import org.apache.maven.continuum.project.ContinuumProject;
import org.codehaus.plexus.util.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
@@ -140,21 +139,13 @@
File buildXml = new File( root, "build.xml" );
- FileUtils.fileWrite( buildXml.getAbsolutePath(),
- "<project default=\"foo\">\n" +
- " <target name=\"build\">\n" +
- " <property name=\"classes\" value=\"target/classes\"/>\n" +
- " <mkdir dir=\"${classes}\"/>\n" +
- " <javac srcdir=\"src/main/java\" destdir=\"${classes}\"/>\n" +
- " </target>\n" +
- " <target name=\"clean\">\n" +
- " <delete dir=\"${classes}\"/>\n" +
- " </target>\n" +
- "</project>" );
+ FileUtils.fileWrite( buildXml.getAbsolutePath(), "<project default=\"foo\">\n" + " <target name=\"build\">\n" +
+ " <property name=\"classes\" value=\"target/classes\"/>\n" + " <mkdir dir=\"${classes}\"/>\n" +
+ " <javac srcdir=\"src/main/java\" destdir=\"${classes}\"/>\n" + " </target>\n" +
+ " <target name=\"clean\">\n" + " <delete dir=\"${classes}\"/>\n" + " </target>\n" + "</project>" );
assertTrue( new File( root, "src/main/java" ).mkdirs() );
- FileUtils.fileWrite( new File( root, "src/main/java/Foo.java" ).getAbsolutePath(),
- "class Foo { }" );
+ FileUtils.fileWrite( new File( root, "src/main/java/Foo.java" ).getAbsolutePath(), "class Foo { }" );
}
}
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -16,36 +16,35 @@
* limitations under the License.
*/
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.List;
-import java.net.MalformedURLException;
-import java.io.IOException;
-import java.beans.IntrospectionException;
-import java.lang.reflect.InvocationTargetException;
-
import org.apache.maven.continuum.Continuum;
import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.scm.ScmResult;
-import org.apache.maven.continuum.xmlrpc.XmlRpcHelper;
-import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.MavenTwoProject;
-import org.apache.maven.continuum.project.MavenOneProject;
import org.apache.maven.continuum.project.AntProject;
-import org.apache.maven.continuum.project.ShellProject;
+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.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.xmlrpc.XmlRpcClientLite;
+import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.xmlrpc.XmlRpcHelper;
import org.apache.xmlrpc.XmlRpcClient;
+import org.apache.xmlrpc.XmlRpcClientLite;
import org.apache.xmlrpc.XmlRpcException;
-
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.dag.CycleDetectedException;
+import java.beans.IntrospectionException;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
@@ -118,9 +117,7 @@
public Collection getAllProjects( int start, int end )
throws ContinuumException
{
- return (Collection) invoke( "getProjects",
- new Object[]{},
- ContinuumProject.class );
+ return (Collection) invoke( "getProjects", new Object[]{}, ContinuumProject.class );
}
public List getProjectsInBuildOrder()
@@ -248,10 +245,8 @@
public ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl )
throws ContinuumException
{
- return (ContinuumProjectBuildingResult)
- invoke( "addMavenOneProject",
- new Object[]{ metadataUrl, },
- ContinuumProjectBuildingResult.class );
+ return (ContinuumProjectBuildingResult) invoke( "addMavenOneProject", new Object[]{metadataUrl,},
+ ContinuumProjectBuildingResult.class );
}
public String addMavenOneProject( MavenOneProject mavenOneProject )
@@ -366,12 +361,6 @@
throw new UnsupportedOperationException();
}
- public void removeSchedule( String scheduleId )
- throws ContinuumException
- {
- throw new UnsupportedOperationException();
- }
-
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
@@ -383,7 +372,7 @@
for ( int i = 0; i < arguments.length; i++ )
{
- Object argument = arguments[ i ];
+ Object argument = arguments[i];
vector.add( argument );
}
@@ -414,10 +403,8 @@
String stackTrace = (String) returnValue.get( "stackTrace" );
throw new ContinuumException( "Error while calling the remote method '" + method + "'. " + EOL +
- "Result code: " + result + EOL +
- "Remote method: " + remoteMethod + EOL +
- "Message: " + message + "." + EOL +
- "Stack trace: " + stackTrace );
+ "Result code: " + result + EOL + "Remote method: " + remoteMethod + EOL + "Message: " + message + "." +
+ EOL + "Stack trace: " + stackTrace );
}
System.err.println( "return value: " + returnValue );
@@ -431,12 +418,12 @@
catch ( InstantiationException e )
{
throw new ContinuumException( "Could not instantiate the return type '" + returnType.getName() + "'. " +
- "Make sure this type has a empy public constructor.", e );
+ "Make sure this type has a empy public constructor.", e );
}
catch ( IllegalAccessException e )
{
throw new ContinuumException( "Could not instantiate the return type '" + returnType.getName() + "'. " +
- "Make sure this type has a empy public constructor.", e );
+ "Make sure this type has a empy public constructor.", e );
}
try
@@ -445,21 +432,18 @@
}
catch ( IntrospectionException e )
{
- throw new ContinuumException( "Error while building the return object. " +
- "XMLRPC return value type: " + returnValue.getClass().getName() + ". " +
- "Method return type: " + returnType.getName() + ".", e );
+ throw new ContinuumException( "Error while building the return object. " + "XMLRPC return value type: " +
+ returnValue.getClass().getName() + ". " + "Method return type: " + returnType.getName() + ".", e );
}
catch ( IllegalAccessException e )
{
- throw new ContinuumException( "Error while building the return object. " +
- "XMLRPC return value type: " + returnValue.getClass().getName() + ". " +
- "Method return type: " + returnType.getName() + ".", e );
+ throw new ContinuumException( "Error while building the return object. " + "XMLRPC return value type: " +
+ returnValue.getClass().getName() + ". " + "Method return type: " + returnType.getName() + ".", e );
}
catch ( InvocationTargetException e )
{
- throw new ContinuumException( "Error while building the return object. " +
- "XMLRPC return value type: " + returnValue.getClass().getName() + ". " +
- "Method return type: " + returnType.getName() + ".", e );
+ throw new ContinuumException( "Error while building the return object. " + "XMLRPC return value type: " +
+ returnValue.getClass().getName() + ". " + "Method return type: " + returnType.getName() + ".", e );
}
return object;
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java Thu Aug 11 22:15:21 2005
@@ -80,14 +80,14 @@
//
// ----------------------------------------------------------------------
- private void readModules( URL url,
- ContinuumProjectBuildingResult result,
- boolean groupPom )
+ private void readModules( URL url, ContinuumProjectBuildingResult result, boolean groupPom )
{
MavenProject mavenProject;
try
{
+ // TODO: this isn't finding parents due to relocating to the URL
+ // TODO: the whole modules resolution is funky
mavenProject = builderHelper.getMavenProject( createMetadataFile( url ) );
}
catch ( MavenBuilderHelperException e )
@@ -219,7 +219,7 @@
IssueManagement issueManagement = mavenProject.getIssueManagement();
- if( issueManagement != null )
+ if ( issueManagement != null )
{
issueManagementUrl = issueManagement.getUrl();
}
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java Thu Aug 11 22:15:21 2005
@@ -25,8 +25,8 @@
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.Map;
import java.util.List;
+import java.util.Map;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Thu Aug 11 22:15:21 2005
@@ -18,8 +18,6 @@
import org.apache.maven.continuum.AbstractContinuumTest;
import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumProjectState;
import org.apache.maven.continuum.store.ContinuumStore;
/**
@@ -37,8 +35,9 @@
ContinuumStore store = getStore();
- Project project = AbstractContinuumTest.addProject( store, "Notification Dispatcher Test Project" );
+ Project project = addProject( store, "Notification Dispatcher Test Project" );
+/* TODO
ContinuumBuild build = new ContinuumBuild();
build.setStartTime( System.currentTimeMillis() );
build.setState( ContinuumProjectState.BUILDING );
@@ -46,7 +45,7 @@
build = store.addBuild( Integer.toString( project.getId() ), build );
- // TODO
-// notificationDispatcher.buildComplete( project, build );
+ notificationDispatcher.buildComplete( project, build );
+*/
}
}
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=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Thu Aug 11 22:15:21 2005
@@ -89,6 +89,11 @@
<type>String</type>
</field>
<field>
+ <name>executorId</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ </field>
+ <field>
<name>name</name>
<version>1.0.0+</version>
<type>String</type>
@@ -113,10 +118,16 @@
<version>1.0.0+</version>
<type>String</type>
</field>
+ <!-- TODO: should these 3 just be queried from the builds list? -->
<field>
<name>state</name>
<version>1.0.0+</version>
<type>int</type>
+ </field>
+ <field>
+ <name>latestBuildId</name>
+ <version>1.0.0</version>
+ <type>String</type>
</field>
<field>
<name>buildNumber</name>
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -17,19 +17,14 @@
<field name="name" persistence-modifier="persistent"/>
<field name="scmUrl" persistence-modifier="persistent"/>
<field name="version" persistence-modifier="persistent"/>
- <field name="path" persistence-modifier="persistent"/>
<field name="state" persistence-modifier="none"/>
<field name="executorId" persistence-modifier="persistent"/>
<field name="latestBuildId" persistence-modifier="persistent"/>
<field name="buildNumber" persistence-modifier="persistent"/>
- <field name="scmResult" persistence-modifier="persistent" default-fetch-group="true" dependent="true"/>
- <field name="checkOutErrorMessage" persistence-modifier="persistent"/>
- <field name="checkOutErrorException" persistence-modifier="persistent"/>
- <field name="commandLineArguments" persistence-modifier="persistent"/>
+ <field name="checkoutResult" persistence-modifier="persistent" default-fetch-group="true" dependent="true"/>
<field name="url" persistence-modifier="persistent"/>
<field name="artifactId" persistence-modifier="persistent"/>
<field name="groupId" persistence-modifier="persistent"/>
- <field name="testOutputDirectory" persistence-modifier="persistent"/>
<!-- Collections -->
<field name="builds" persistence-modifier="persistent">
<collection element-type="ContinuumBuild" dependent-element="true"/>
@@ -43,21 +38,15 @@
<field name="dependencies" persistence-modifier="persistent">
<collection element-type="ContinuumDependency" dependent-element="true"/>
</field>
- <!-- Schedules exist on their own, so we don't want cascading deletes affect them. -->
- <field name="schedules" persistence-modifier="persistent" table="project_schedules">
- <collection element-type="ContinuumSchedule"/>
- <join/>
- </field>
<field name="projectGroup" persistence-modifier="persistent"/>
<fetch-group name="project-detail">
- <field name="scmResult"/>
+ <field name="checkoutResult"/>
<field name="builds"/>
<field name="developers"/>
<field name="notifiers"/>
<field name="dependencies"/>
- <field name="schedules"/>
<field name="projectGroup"/>
</fetch-group>
</class>
@@ -101,21 +90,24 @@
</class>
<class name="MavenTwoProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
detachable="true">
- <inheritance strategy="new-table" />
+ <inheritance strategy="new-table"/>
+ <field name="commandLineArguments" persistence-modifier="persistent"/>
<field name="goals" persistence-modifier="persistent">
<column name="M2_GOALS"/>
</field>
</class>
<class name="MavenOneProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
detachable="true">
- <inheritance strategy="new-table" />
+ <inheritance strategy="new-table"/>
+ <field name="commandLineArguments" persistence-modifier="persistent"/>
<field name="goals" persistence-modifier="persistent">
<column name="M1_GOALS"/>
</field>
</class>
<class name="AntProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
detachable="true">
- <inheritance strategy="new-table" />
+ <inheritance strategy="new-table"/>
+ <field name="commandLineArguments" persistence-modifier="persistent"/>
<field name="executable" persistence-modifier="persistent">
<column name="ANT_EXECUTABLE"/>
</field>
@@ -123,7 +115,8 @@
</class>
<class name="ShellProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
detachable="true">
- <inheritance strategy="new-table" />
+ <inheritance strategy="new-table"/>
+ <field name="commandLineArguments" persistence-modifier="persistent"/>
<field name="executable" persistence-modifier="persistent">
<column name="SHELL_EXECUTABLE"/>
</field>
Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Thu Aug 11 22:15:21 2005
@@ -43,11 +43,6 @@
<version>1.0.0</version>
<type>String</type>
</field>
- <field>
- <name>path</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
<field stash.storable="false">
<name>state</name>
<version>1.0.0</version>
@@ -77,30 +72,13 @@
</association>
</field>
<field>
- <name>scmResult</name>
+ <name>checkoutResult</name>
<version>1.0.0</version>
<association>
<type>ScmResult</type>
</association>
</field>
<field>
- <name>checkOutErrorMessage</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
- <name>checkOutErrorException</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <!-- TODO: Move to the executor configuration. -->
- <!-- TODO: Uh, oh, and rename FooProject to FooExecutorConfiguration -->
- <field>
- <name>commandLineArguments</name>
- <version>1.0.0</version>
- <type>String</type>
- </field>
- <field>
<name>url</name>
<version>1.0.0</version>
<type>String</type>
@@ -116,16 +94,6 @@
<type>String</type>
</field>
<field>
- <name>testOutputDirectory</name>
- <version>1.0.0</version>
- <description><![CDATA[
- The directory where test output is generated. This value is relative to the project's
- working directory and is typically contained somewhere within the working directory. In
- m2's case it would be target/surefire-reports.
- ]]></description>
- <type>String</type>
- </field>
- <field>
<name>developers</name>
<version>1.0.0</version>
<association stash.part="true">
@@ -150,15 +118,6 @@
</association>
</field>
<field>
- <name>schedules</name>
- <version>1.0.0</version>
- <type>Set</type>
- <association stash.part="false">
- <type>ContinuumSchedule</type>
- <multiplicity>*</multiplicity>
- </association>
- </field>
- <field>
<name>projectGroup</name>
<version>1.0.0</version>
<type>Set</type>
@@ -313,6 +272,11 @@
<version>1.0.0</version>
<type>String</type>
</field>
+ <field>
+ <name>commandLineArguments</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ </field>
</fields>
</class>
@@ -326,6 +290,11 @@
<version>1.0.0</version>
<type>String</type>
</field>
+ <field>
+ <name>commandLineArguments</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ </field>
</fields>
</class>
@@ -344,6 +313,11 @@
<version>1.0.0</version>
<type>String</type>
</field>
+ <field>
+ <name>commandLineArguments</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ </field>
</fields>
</class>
@@ -354,6 +328,11 @@
<fields>
<field>
<name>executable</name>
+ <version>1.0.0</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>commandLineArguments</name>
<version>1.0.0</version>
<type>String</type>
</field>
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=232207&r1=232206&r2=232207&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 Thu Aug 11 22:15:21 2005
@@ -127,26 +127,6 @@
ContinuumProject project = (ContinuumProject) pm.getObjectById( id );
- // ----------------------------------------------------------------------
- // We need to remove this project reference from any schedule in the
- // system. So grab the list of schedules this project belongs to
- // then iterate through the collection of schedules removing the
- // reference to this project. This seems like a bit much but the
- // only thing that works.
- // ----------------------------------------------------------------------
-
- if ( project.getSchedules() != null && project.getSchedules().size() > 0 )
- {
- Set schedules = project.getSchedules();
-
- for ( Iterator i = schedules.iterator(); i.hasNext(); )
- {
- ContinuumSchedule schedule = (ContinuumSchedule) i.next();
-
- schedule.getProjects().remove( project );
- }
- }
-
if ( project.getProjectGroup() != null )
{
ContinuumProjectGroup pg = project.getProjectGroup();
@@ -167,24 +147,6 @@
public ContinuumProject updateProject( ContinuumProject project )
throws ContinuumStoreException
{
- String checkoutErrorMessage = project.getCheckOutErrorMessage();
-
- String checkoutErrorException = project.getCheckOutErrorException();
-
- if ( checkoutErrorMessage != null && checkoutErrorMessage.length() > 255 )
- {
- project.setCheckOutErrorMessage( checkoutErrorMessage.substring( 0, 255 ) );
- }
-
- if ( checkoutErrorException != null && checkoutErrorException.length() > 255 )
- {
- project.setCheckOutErrorException( checkoutErrorException.substring( 0, 255 ) );
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
@@ -374,7 +336,7 @@
ContinuumProject project = getContinuumProject( pm, projectId, false );
- ScmResult scmResult = project.getScmResult();
+ ScmResult scmResult = project.getCheckoutResult();
if ( scmResult == null )
{
@@ -466,51 +428,6 @@
{
updateObject( schedule );
return schedule;
- }
-
- public void removeSchedule( String scheduleId )
- throws ContinuumStoreException
- {
- PersistenceManager pm = pmf.getPersistenceManager();
-
- Transaction tx = pm.currentTransaction();
-
- try
- {
- tx.begin();
-
- Object id = pm.newObjectIdInstance( ContinuumSchedule.class, scheduleId );
-
- ContinuumSchedule schedule = (ContinuumSchedule) pm.getObjectById( id );
-
- // ----------------------------------------------------------------------
- // We need to remove this schedule reference from any project in the
- // system. So grab the list of projects this schedule belongs to
- // then iterate through the collection of projects removing the
- // reference to this schedule. This seems like a bit much but the
- // only thing that works.
- // ----------------------------------------------------------------------
-
- if ( schedule.getProjects() != null && schedule.getProjects().size() > 0 )
- {
- Set projects = schedule.getProjects();
-
- for ( Iterator i = projects.iterator(); i.hasNext(); )
- {
- ContinuumProject project = (ContinuumProject) i.next();
-
- project.getSchedules().remove( schedule );
- }
- }
-
- pm.deletePersistent( schedule );
-
- tx.commit();
- }
- finally
- {
- rollback( tx );
- }
}
public ContinuumBuild addBuild( String projectId, ContinuumBuild build )
Modified: maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java (original)
+++ maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java Thu Aug 11 22:15:21 2005
@@ -29,7 +29,6 @@
import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
import org.codehaus.plexus.jdo.JdoFactory;
-import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
import java.util.ArrayList;
@@ -47,7 +46,7 @@
* When adding projects using addProject( project ) the project will be
* put in this group. All project has to belong to a group.
*/
- private static ProjectGroup defaultProjectGroup;
+ private ProjectGroup defaultProjectGroup;
private ContinuumStore store;
@@ -63,6 +62,17 @@
setUpConfigurationService( (ConfigurationService) lookup( ConfigurationService.ROLE ) );
getStore();
+
+ ProjectGroup projectGroup = new ProjectGroup();
+
+ projectGroup.setName( "Test Project Group" );
+
+ projectGroup.setGroupId( "foo.test" );
+
+ projectGroup.setDescription(
+ "This is the default group that all projects will be " + "added to when using addProject()." );
+
+ defaultProjectGroup = store.addProjectGroup( projectGroup );
}
public static void setUpConfigurationService( ConfigurationService configurationService )
@@ -75,22 +85,8 @@
configurationService.setWorkingDirectory( getTestFile( "target/working-directory" ) );
}
- public static ProjectGroup getDefaultProjectGroup( ContinuumStore store )
+ protected ProjectGroup getDefaultProjectGroup()
{
- if ( defaultProjectGroup == null )
- {
- ProjectGroup projectGroup = new ProjectGroup();
-
- projectGroup.setName( "Test Project Group" );
-
- projectGroup.setGroupId( "foo.test" );
-
- projectGroup.setDescription(
- "This is the default group that all projects will be " + "added to when using addProject()." );
-
- defaultProjectGroup = store.addProjectGroup( projectGroup );
- }
-
return defaultProjectGroup;
}
@@ -240,27 +236,10 @@
// Public utility methods
// ----------------------------------------------------------------------
- public static Project addProject( ContinuumStore store, Project project )
+ public Project addProject( ContinuumStore store, Project project )
throws Exception
{
- if ( project.getProjectGroup() == null )
- {
- project.setProjectGroup( getDefaultProjectGroup( store ) );
- }
-
- assertNotNull( "project group == null", project.getProjectGroup() );
-
- assertTrue( "!JDOHelper.isDetached( project.getProjectGroup() )",
- JDOHelper.isDetached( project.getProjectGroup() ) );
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- getDefaultProjectGroup( store ).addProject( project );
- store.updateProjectGroup( getDefaultProjectGroup( store ) );
-
- assertNotNull( "project group == null", project.getProjectGroup() );
+ ProjectGroup defaultProjectGroup = getDefaultProjectGroup();
// ----------------------------------------------------------------------
//
@@ -274,33 +253,27 @@
scmResult.setProviderMessage( "providerMessage" );
+ project.setCheckoutResult( scmResult );
+
+ defaultProjectGroup.addProject( project );
+ store.updateProjectGroup( defaultProjectGroup );
+
+ project = store.getProject( project.getId() );
+ assertNotNull( "project group == null", project.getProjectGroup() );
+
return project;
}
- public static Project addProject( ContinuumStore store, String name )
+ public Project addProject( ContinuumStore store, String name )
throws Exception
{
return addProject( store, makeStubProject( name ) );
}
- public static Project addProject( ContinuumStore store, String name, String nagEmailAddress, String version )
+ public Project addProject( ContinuumStore store, String name, String nagEmailAddress, String version )
throws Exception
{
- Project project = makeProject( name, nagEmailAddress, version );
-
- ProjectGroup defaultProjectGroup = getDefaultProjectGroup( store );
- defaultProjectGroup.addProject( project );
- store.updateProjectGroup( defaultProjectGroup );
-
- ScmResult scmResult = new ScmResult();
-
- scmResult.setSuccess( true );
-
- setCheckoutDone( store, project, scmResult );
-
- assertNotNull( project );
-
- return project;
+ return addProject( store, makeProject( name, nagEmailAddress, version ) );
}
public static void setCheckoutDone( ContinuumStore store, Project project, ScmResult scmResult )
Modified: maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java?rev=232207&r1=232206&r2=232207&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java Thu Aug 11 22:15:21 2005
@@ -47,7 +47,7 @@
Project project = makeStubProject( "My Project" );
- ProjectGroup projectGroup = getDefaultProjectGroup( store );
+ ProjectGroup projectGroup = getDefaultProjectGroup();
projectGroup.addProject( project );