Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 55357 invoked from network); 22 May 2005 10:42:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 May 2005 10:42:57 -0000 Received: (qmail 5473 invoked by uid 500); 22 May 2005 10:42:56 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 5437 invoked by uid 500); 22 May 2005 10:42:56 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 5423 invoked by uid 99); 22 May 2005 10:42:56 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 22 May 2005 03:42:53 -0700 Received: (qmail 55319 invoked by uid 65534); 22 May 2005 10:42:51 -0000 Message-ID: <20050522104251.55317.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r171299 [2/2] - /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core-it /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test-projects/project1 /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1 /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-model/src/main/resources /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc Date: Sun, 22 May 2005 10:42:46 -0000 To: continuum-commits@maven.apache.org From: trygvis@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/mav= en/continuum/store/ModelloJPoxContinuumStoreTest.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src= /test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.j= ava?rev=3D171299&r1=3D171298&r2=3D171299&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/con= tinuum/store/ModelloJPoxContinuumStoreTest.java (original) +++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/con= tinuum/store/ModelloJPoxContinuumStoreTest.java Sun May 22 03:42:43 2005 @@ -168,20 +168,36 @@ String scmUrl =3D "scm:local:src/test/repo"; String nagEmailAddress =3D "foo@bar.com"; String version =3D "1.0"; + String commandLineArguments =3D "a b"; String builderId =3D "maven2"; String workingDirectory =3D "/tmp"; Properties configuration =3D new Properties(); =20 configuration.setProperty( "foo", "bar" ); =20 - String projectId =3D store.addProject( name, scmUrl, nagEmailAddre= ss, version, builderId, workingDirectory, configuration ); + String projectId =3D store.addProject( name, + scmUrl, + nagEmailAddress, + version, + commandLineArguments, + builderId, + workingDirectory, + configuration ); =20 assertNotNull( "The project id is null.", projectId ); =20 ContinuumProject project =3D store.getProject( projectId ); =20 - assertProjectEquals( projectId, name, scmUrl, nagEmailAddress, ver= sion, builderId, workingDirectory, - configuration, project ); + assertProjectEquals( projectId, + name, + scmUrl, + nagEmailAddress, + version, + commandLineArguments, + builderId, + workingDirectory, + configuration, + project ); } =20 public void testGetNonExistingProject() @@ -210,6 +226,7 @@ String scmUrl =3D "scm:local:jalla"; String nagEmailAddress =3D "foo@bar.com"; String version =3D "1.0"; + String commandLineArguments =3D ""; String builderId =3D "maven2"; String workingDirectory =3D "/tmp"; Properties properties =3D new Properties(); @@ -218,6 +235,7 @@ scmUrl, nagEmailAddress, version, + commandLineArguments, builderId, workingDirectory, properties ); @@ -256,14 +274,28 @@ String scmUrl2 =3D "scm url 2"; String nagEmailAddress2 =3D "2@bar"; String version2 =3D "v2"; + String commandLineArguments2 =3D ""; Properties properties2 =3D new Properties(); =20 - store.updateProject( projectId, name2, scmUrl2, nagEmailAddress2, = version2 ); + store.updateProject( projectId, + name2, + scmUrl2, + nagEmailAddress2, + version2, + commandLineArguments2 ); =20 project =3D store.getProject( projectId ); =20 - assertProjectEquals( projectId, name2, scmUrl2, nagEmailAddress2, = version2, builderId, workingDirectory, - properties2, project ); + assertProjectEquals( projectId, + name2, + scmUrl2, + nagEmailAddress2, + version2, + commandLineArguments2, + builderId, + workingDirectory, + properties2, + project ); =20 // ---------------------------------------------------------------= ------- // @@ -296,6 +328,7 @@ String scmUrl1 =3D "scm:local:src/test/repo/foo"; String nagEmailAddress1 =3D "foo@bar.com"; String version1 =3D "1.0"; + String commandLineArguments1 =3D ""; String builderId1 =3D "maven2"; String workingDirectory1 =3D "/tmp"; Properties configuration1 =3D new Properties(); @@ -304,6 +337,7 @@ scmUrl1, nagEmailAddress1, version1, + commandLineArguments1, builderId1, workingDirectory1, configuration1 ); @@ -312,11 +346,19 @@ String scmUrl2 =3D "scm:local:src/test/repo/bar"; String nagEmailAddress2 =3D "foo@bar.com"; String version2 =3D "1.0"; + String commandLineArguments2 =3D ""; String builderId2 =3D "maven2"; String workingDirectory2 =3D "/tmp"; Properties configuration2 =3D new Properties(); =20 - String id2 =3D store.addProject( name2, scmUrl2, nagEmailAddress2,= version2, builderId2, workingDirectory2, configuration2 ); + String id2 =3D store.addProject( name2, + scmUrl2, + nagEmailAddress2, + version2, + commandLineArguments2, + builderId2, + workingDirectory2, + configuration2 ); =20 Map projects =3D new HashMap(); =20 @@ -333,13 +375,29 @@ =20 ContinuumProject project1 =3D (ContinuumProject) projects.get( nam= e1 ); =20 - assertProjectEquals( id1, name1, scmUrl1, nagEmailAddress1, versio= n1, builderId1, workingDirectory1, - configuration1, project1 ); + assertProjectEquals( id1, + name1, + scmUrl1, + nagEmailAddress1, + version1, + commandLineArguments1, + builderId1, + workingDirectory1, + configuration1, + project1 ); =20 ContinuumProject project2 =3D (ContinuumProject) projects.get( nam= e2 ); =20 - assertProjectEquals( id2, name2, scmUrl2, nagEmailAddress2, versio= n2, builderId2, workingDirectory2, - configuration2, project2 ); + assertProjectEquals( id2, + name2, + scmUrl2, + nagEmailAddress2, + version2, + commandLineArguments2, + builderId2, + workingDirectory2, + configuration2, + project2 ); } =20 public void testUpdateProjectConfiguration() @@ -402,50 +460,6 @@ store.removeProject( projectId ); } =20 - public void xtestAddDuplicateProject() - throws Exception - { - ContinuumStore store =3D (ContinuumStore) lookup( ContinuumStore.R= OLE ); - - // ---------------------------------------------------------------= ------- - // Test projects with duplicate names - // ---------------------------------------------------------------= ------- - - String projectId =3D addProject( "trygve", "trygve-foo" ); - - assertEquals( projectId, store.getProjectByName( "trygve" ).getId(= ) ); - - try - { - addProject( "trygve", "trygve-bar" ); - - fail( "Expected a exception" ); - } - catch( ContinuumStoreException e ) - { - assertTrue( e.getMessage().indexOf( "project with the name" ) = !=3D -1 ); - } - - ContinuumProject project =3D makeStubProject( "brett", "brett-bar"= ); - - addProject( project ); - - assertNotNull( store.getProjectByScmUrl( "brett-bar" ) ); - - try - { - project.setName( "jason" ); - - addProject( project ); - - fail( "Expected a exception" ); - } - catch ( ContinuumStoreException e ) - { - assertTrue( e.getMessage().indexOf( "project with the scm url"= ) !=3D -1 ); - } - } - // -------------------------------------------------------------------= --- // Build // -------------------------------------------------------------------= --- @@ -716,6 +730,7 @@ project.getScmUrl(), project.getNagEmailAddress(), project.getVersion(), + project.getCommandLineArguments(), project.getExecutorId(), project.getWorkingDirectory(), project.getConfiguration() ); @@ -738,6 +753,7 @@ String scmUrl, String nagEmailAddress, String version, + String commandLineArguments, String executorId, String workingDirectory, Properties configuration ) @@ -747,6 +763,7 @@ scmUrl, nagEmailAddress, version, + commandLineArguments, executorId, workingDirectory, configuration ); @@ -785,7 +802,16 @@ assertNull( state ); } =20 - private void assertProjectEquals( String projectId, String name, Strin= g scmUrl, String nagEmailAddress, String version, String builderId, String = workingDirectory, Properties configuration, ContinuumProject project ) + private void assertProjectEquals( String projectId, + String name, + String scmUrl, + String nagEmailAddress, + String version, + String commandLineArguments, + String builderId, + String workingDirectory, + Properties configuration, + ContinuumProject project ) { assertEquals( "project.id", projectId, project.getId() ); =20 @@ -796,6 +822,8 @@ assertEquals( "project.nagEmailAddress", nagEmailAddress, project.= getNagEmailAddress() ); =20 assertEquals( "project.version", version, project.getVersion() ); + + assertEquals( "project.commandLineArguments", commandLineArguments= , project.getCommandLineArguments() ); =20 assertEquals( "project.executorId", builderId, project.getExecutor= Id() ); =20 Added: maven/continuum/trunk/continuum-core/src/test/resources/org/apache/m= aven/continuum/core/ContinuumCoreTest.xml URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src= /test/resources/org/apache/maven/continuum/core/ContinuumCoreTest.xml?rev= =3D171299&view=3Dauto =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- maven/continuum/trunk/continuum-core/src/test/resources/org/apache/mave= n/continuum/core/ContinuumCoreTest.xml (added) +++ maven/continuum/trunk/continuum-core/src/test/resources/org/apache/mave= n/continuum/core/ContinuumCoreTest.xml Sun May 22 03:42:43 2005 @@ -0,0 +1,44 @@ + + + + org.codehaus.plexus.jdo.JdoFactory + org.codehaus.plexus.jdo.DefaultJdoFactory + + + + javax.jdo.PersistenceManagerFactoryClass + org.jpox.PersistenceManagerFactoryImpl + + + javax.jdo.option.ConnectionDriverName + org.hsqldb.jdbcDriver + + + javax.jdo.option.ConnectionURL + jdbc:hsqldb:. + + + javax.jdo.option.ConnectionUserName + sa + + + javax.jdo.option.ConnectionPassword + + + + org.jpox.autoCreateSchema + true + + + org.jpox.autoStartMechanism + SchemaTable + + + org.jpox.autoStartMechanismMode + Quiet + + + + + + Propchange: maven/continuum/trunk/continuum-core/src/test/resources/org/apa= che/maven/continuum/core/ContinuumCoreTest.xml ---------------------------------------------------------------------------= --- svn:eol-style =3D native Propchange: maven/continuum/trunk/continuum-core/src/test/resources/org/apa= che/maven/continuum/core/ContinuumCoreTest.xml ---------------------------------------------------------------------------= --- svn:keywords =3D Id Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuu= m=2Emdo URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/sr= c/main/resources/continuum.mdo?rev=3D171299&r1=3D171298&r2=3D171299&view=3D= diff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo = (original) +++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo = Sun May 22 03:42:43 2005 @@ -104,6 +104,13 @@ 1.0.0 String + + + + commandLineArguments + 1.0.0 + String + =20 @@ -158,11 +165,6 @@ executable - 1.0.0 - String - - - arguments 1.0.0 String Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/m= aven/continuum/xmlrpc/ContinuumXmlRpc.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/s= rc/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=3D1= 71299&r1=3D171298&r2=3D171299&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/c= ontinuum/xmlrpc/ContinuumXmlRpc.java (original) +++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/c= ontinuum/xmlrpc/ContinuumXmlRpc.java Sun May 22 03:42:43 2005 @@ -20,7 +20,7 @@ =20 /** * @author Trygve Laugstøl - * @version $Id: ContinuumXmlRpc.java,v 1.3 2005/04/07 23:16:27 trygvis Ex= p $ + * @version $Id$ */ public interface ContinuumXmlRpc { @@ -32,9 +32,15 @@ =20 Hashtable getProject( String projectId ); =20 - Hashtable updateProjectFromScm( String projectId ); + Hashtable updateProject( String projectId, + String name, + String scmUrl, + String nagEmailAddress, + String version, + String commandLineArguments ); =20 - Hashtable updateProjectConfiguration( String projectId, Hashtable conf= iguration ); + Hashtable updateProjectConfiguration( String projectId, + Hashtable configuration ); =20 Hashtable getAllProjects(); =20 @@ -44,9 +50,12 @@ // Build handling // -------------------------------------------------------------------= --- =20 - Hashtable buildProject( String projectId, boolean force ); + Hashtable buildProject( String projectId, + boolean force ); =20 - Hashtable getBuildsForProject( String projectId, int start, int end ); + Hashtable getBuildsForProject( String projectId, + int start, + int end ); =20 Hashtable getBuild( String buildId ); =20 @@ -73,6 +82,7 @@ String projectName, String nagEmailAddress, String version, + String commandLineArguments, Hashtable configuration ); =20 // -------------------------------------------------------------------= --- @@ -83,5 +93,6 @@ String projectName, String nagEmailAddress, String version, + String commandLineArguments, Hashtable configuration ); } Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/m= aven/continuum/xmlrpc/DefaultContinuumXmlRpc.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/s= rc/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?= rev=3D171299&r1=3D171298&r2=3D171299&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/c= ontinuum/xmlrpc/DefaultContinuumXmlRpc.java (original) +++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/c= ontinuum/xmlrpc/DefaultContinuumXmlRpc.java Sun May 22 03:42:43 2005 @@ -28,22 +28,30 @@ import java.util.Vector; =20 import org.apache.maven.continuum.Continuum; +import org.apache.maven.continuum.ContinuumException; import org.apache.maven.continuum.core.ContinuumCore; import org.apache.maven.continuum.execution.ant.AntBuildExecutor; import org.apache.maven.continuum.execution.shell.ShellBuildExecutor; +import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor; +import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor; import org.apache.maven.continuum.project.ContinuumBuild; import org.apache.maven.continuum.project.ContinuumBuildResult; import org.apache.maven.continuum.project.ContinuumProject; +import org.apache.maven.continuum.project.MavenOneProject; +import org.apache.maven.continuum.project.ShellProject; +import org.apache.maven.continuum.project.AntProject; +import org.apache.maven.continuum.project.MavenTwoProject; import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumP= rojectBuilder; import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumP= rojectBuilder; import org.apache.maven.continuum.scm.CheckOutScmResult; import org.apache.maven.continuum.scm.UpdateScmResult; =20 import org.codehaus.plexus.logging.AbstractLogEnabled; +import org.codehaus.plexus.util.StringUtils; =20 /** * @author Trygve Laugstøl - * @version $Id: DefaultContinuumXmlRpc.java,v 1.3 2005/04/04 15:25:13 try= gvis Exp $ + * @version $Id$ */ public class DefaultContinuumXmlRpc extends AbstractLogEnabled @@ -72,7 +80,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.addMavenOneProject():= url: '" + url + "'.", e ); + return handleException( "ContinuumXmlRpc.addMavenOneProject()", + "URL: '" + url + "'.", e ); } } =20 @@ -90,7 +99,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.addMavenTwoProject():= url: '" + url + "'.", e ); + return handleException( "ContinuumXmlRpc.addMavenTwoProject()", + "URL: '" + url + "'.", e ); } } =20 @@ -102,9 +112,16 @@ String projectName, String nagEmailAddress, String version, + String commandLineArguments, Hashtable configuration ) { - return addProjectFromScm( scmUrl, AntBuildExecutor.ID, projectName= , nagEmailAddress, version, configuration ); + return addProjectFromScm( scmUrl, + AntBuildExecutor.ID, + projectName, + nagEmailAddress, + version, + commandLineArguments, + configuration ); } =20 // -------------------------------------------------------------------= --- @@ -115,9 +132,16 @@ String projectName, String nagEmailAddress, String version, + String commandLineArguments, Hashtable configuration ) { - return addProjectFromScm( scmUrl, ShellBuildExecutor.ID, projectNa= me, nagEmailAddress, version, configuration ); + return addProjectFromScm( scmUrl, + ShellBuildExecutor.ID, + projectName, + nagEmailAddress, + version, + commandLineArguments, + configuration ); } =20 // -------------------------------------------------------------------= --- @@ -129,6 +153,7 @@ String projectName, String nagEmailAddress, String version, + String commandLineArguments, Hashtable configuration ) { try @@ -147,13 +172,14 @@ projectName, nagEmailAddress, version, + commandLineArgument= s, configurationProper= ties ); =20 return makeHashtable( "projectId", projectId ); } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.addProjectFromScm()."= , e ); + return handleException( "ContinuumXmlRpc.addProjectFromScm()",= null, e ); } } =20 @@ -193,7 +219,81 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.getProject(): project= id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.getProject()", + "Project id: '" + projectId + "'.", e = ); + } + } + + public Hashtable updateProject( String projectId, + String name, + String scmUrl, + String nagEmailAddress, + String version, + String commandLineArguments ) + { + try + { + ContinuumProject project =3D continuum.getProject( projectId ); + + if ( project.getExecutorId().equals( MavenOneBuildExecutor.ID = ) ) + { + project =3D continuum.getMavenOneProject( projectId ); + } + else if ( project.getExecutorId().equals( MavenTwoBuildExecuto= r=2EID ) ) + { + project =3D continuum.getMavenTwoProject( projectId ); + } + else if ( project.getExecutorId().equals( AntBuildExecutor.ID = ) ) + { + project =3D continuum.getAntProject( projectId ); + } + else if ( project.getExecutorId().equals( ShellBuildExecutor.I= D ) ) + { + project =3D continuum.getShellProject( projectId ); + } + + project.setName( name ); + + project.setScmUrl( scmUrl ); + + project.setNagEmailAddress( nagEmailAddress ); + + project.setVersion( version ); + + project.setCommandLineArguments( commandLineArguments ); + + // -----------------------------------------------------------= ----------- + // + // -----------------------------------------------------------= ----------- + + if ( project instanceof MavenOneProject ) + { + continuum.updateMavenOneProject( (MavenOneProject) project= ); + } + else if ( project instanceof MavenTwoProject ) + { + continuum.updateMavenTwoProject( (MavenTwoProject) project= ); + } + else if ( project instanceof AntProject ) + { + continuum.updateAntProject( (AntProject) project ); + } + else if ( project instanceof ShellProject ) + { + continuum.updateShellProject( (ShellProject) project ); + } + else + { + return handleException( "ContinuumXmlRpc.updateProject()", + "Project id: '" + projectId + "'."= , new ContinuumException( "Unknown project type: " + project.getClass().get= Name() ) ); + } + + return makeHashtable(); + } + catch ( Throwable e ) + { + return handleException( "ContinuumXmlRpc.updateProject()", + "Project id: '" + projectId + "'.", e = ); } } =20 @@ -207,11 +307,13 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.updateProjectFromScm(= ): Project id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.updateProjectFromScm(= )", + "Project id: '" + projectId + "'.", e = ); } } =20 - public Hashtable updateProjectConfiguration( String projectId, Hashtab= le configuration ) + public Hashtable updateProjectConfiguration( String projectId, + Hashtable configuration ) { try { @@ -230,7 +332,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.updateProjectConfigur= ation(): Project id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.updateProjectConfigur= ation()", + "Project id: '" + projectId + "'.", e = ); } } =20 @@ -251,7 +354,7 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.getAllProjects().", e= ); + return handleException( "ContinuumXmlRpc.getAllProjects()", nu= ll, e ); } } =20 @@ -265,7 +368,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.removeProject(). Proj= ect id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.removeProject()", + "Project id: '" + projectId + "'.", e = ); } } =20 @@ -283,7 +387,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.buildProject(): proje= ct id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.buildProject()", + "Project id: '" + projectId + "'.", e = ); } } =20 @@ -320,7 +425,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.getBuildsForProject()= : id: '" + projectId + "'.", e ); + return handleException( "ContinuumXmlRpc.getBuildsForProject()= ", + "Project id: '" + projectId + "'.", e = ); } } =20 @@ -348,7 +454,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.getBuild(): id: '" + = buildId + "'.", e ); + return handleException( "ContinuumXmlRpc.getBuild()", + "Build id: '" + buildId + "'.", e ); } } =20 @@ -366,7 +473,8 @@ } catch ( Throwable e ) { - return handleException( "ContinuumXmlRpc.getBuildResult(): id:= '" + buildId + "'.", e ); + return handleException( "ContinuumXmlRpc.getBuildResult()", + "Build id: '" + buildId + "'.", e ); } } =20 @@ -392,7 +500,7 @@ return hashtable; } =20 - private Hashtable handleException( String method, Throwable throwable ) + private Hashtable handleException( String method, String message, Thro= wable throwable ) { Hashtable hashtable =3D new Hashtable(); =20 @@ -407,7 +515,14 @@ hashtable.put( "message", "" ); } =20 - hashtable.put( "method", method ); + if ( StringUtils.isEmpty( message ) ) + { + hashtable.put( "method", method ); + } + else + { + hashtable.put( "method", method + ": " + message ); + } =20 hashtable.put( "stackTrace", getExceptionStackTrace( throwable ) ); =20