You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by tr...@apache.org on 2005/06/13 18:45:43 UTC
svn commit: r190423 [1/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/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/core
/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action
/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/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/store
/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum
/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-model/src/main/resources
/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
/maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc
Author: trygvis
Date: Mon Jun 13 09:45:42 2005
New Revision: 190423
URL: http://svn.apache.org/viewcvs?rev=190423&view=rev
Log:
Cleanup and overhaul of Continuum that was possible after the latest JDO and
JPOX changes.
o Removing ContinuumProject.configuration. This had a pretty big impact a few
places but made stuff much cleaner. Removed *lots* of Properties imports :)
o Made the XML-RPC interface deal in terms of MavenOneProject, MavenTwoProject,
AntProject and ShellProject objects instead of ContinuumProject objects.
o Reenabling all integration tests.
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/continuum.py
maven/continuum/trunk/continuum-core-it/continuum_cli.py
maven/continuum/trunk/continuum-core-it/it.py
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/core/ContinuumCore.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.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/execution/maven/m1/MavenOneBuildExecutorTest.java
maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelperTest.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=190423&r1=190422&r2=190423&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 Mon Jun 13 09:45:42 2005
@@ -17,7 +17,6 @@
*/
import java.util.Collection;
-import java.util.Properties;
import org.apache.maven.continuum.project.AntProject;
import org.apache.maven.continuum.project.ContinuumBuild;
@@ -44,9 +43,9 @@
void updateProjectFromScm( String projectId )
throws ContinuumException;
- void updateProjectConfiguration( String projectId,
- Properties configuration )
- throws ContinuumException;
+// void updateProjectConfiguration( String projectId,
+// Properties configuration )
+// throws ContinuumException;
ContinuumProject getProject( String projectId )
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=190423&r1=190422&r2=190423&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 Mon Jun 13 09:45:42 2005
@@ -18,12 +18,10 @@
import java.util.Collection;
import java.util.List;
-import java.util.Properties;
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.MavenTwoProject;
import org.apache.maven.continuum.scm.CheckOutScmResult;
import org.apache.maven.continuum.scm.UpdateScmResult;
@@ -42,18 +40,18 @@
String addProject( ContinuumProject project )
throws ContinuumStoreException;
- /**
- * @deprecated
- */
- String addProject( String name,
- String scmUrl,
- String nagEmailAddress,
- String version,
- String commandLineArguments,
- String executorId,
- String workingDirectory,
- Properties properties )
- throws ContinuumStoreException;
+// /**
+// * @deprecated
+// */
+// String addProject( String name,
+// String scmUrl,
+// String nagEmailAddress,
+// String version,
+// String commandLineArguments,
+// String executorId,
+// String workingDirectory,
+// Properties properties )
+// throws ContinuumStoreException;
void removeProject( String projectId )
throws ContinuumStoreException;
@@ -69,8 +67,8 @@
String commandLineArguments )
throws ContinuumStoreException;
- void updateProjectConfiguration( String projectId, Properties configuration )
- throws ContinuumStoreException;
+// void updateProjectConfiguration( String projectId, Properties configuration )
+// throws ContinuumStoreException;
Collection getAllProjects()
throws ContinuumStoreException;
Modified: maven/continuum/trunk/continuum-core-it/continuum.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum.py?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum.py Mon Jun 13 09:45:42 2005
@@ -28,34 +28,34 @@
raise ex
def decodeState( state ):
- if ( state == 1 ):
- return Continuum.STATE_NEW
- elif ( state == 2 ):
- return Continuum.STATE_OK
- elif ( state == 3 ):
- return Continuum.STATE_FAILED
- elif ( state == 4 ):
- return Continuum.STATE_ERROR
+ if ( state == Continuum.STATE_NEW ):
+ return "new"
+ elif ( state == Continuum.STATE_OK ):
+ return "ok"
+ elif ( state == Continuum.STATE_FAILED ):
+ return "failed"
+ elif ( state == Continuum.STATE_ERROR ):
+ return "error"
# elif ( state == 5 ):
# return Continuum.STATE_BUILD_SIGNALED
- elif ( state == 6 ):
- return Continuum.STATE_BUILDING
- elif ( state == 7 ):
- return Continuum.STATE_CHECKING_OUT
- elif ( state == 8 ):
- return Continuum.STATE_UPDATING
+ elif ( state == Continuum.STATE_BUILDING ):
+ return "building"
+ elif ( state == Continuum.STATE_CHECKING_OUT ):
+ return "checking out"
+ elif ( state == Continuum.STATE_UPDATING ):
+ return "updating"
else:
return "UNKNOWN STATE (" + str( state ) + ")."
class Continuum:
- STATE_NEW = "new"
- STATE_OK = "ok"
- STATE_FAILED = "failed"
- STATE_ERROR = "error"
+ STATE_NEW = 1
+ STATE_OK = 2
+ STATE_FAILED = 3
+ STATE_ERROR = 4
#STATE_BUILD_SIGNALED = "build signaled"
- STATE_BUILDING = "building"
- STATE_CHECKING_OUT = "checking out"
- STATE_UPDATING = "updating"
+ STATE_BUILDING = 6
+ STATE_CHECKING_OUT = 7
+ STATE_UPDATING = 8
def __init__( self, url ):
self.server = xmlrpclib.Server(url, allow_none=True)
@@ -80,20 +80,20 @@
#def updateProjectFromScm( projectId ):
# checkResult( server.continuum.updateProjectFromScm( projectId ) )
- def updateProjectConfiguration( self, projectId, configuration ):
- checkResult( self.server.continuum.updateProjectConfiguration( projectId, configuration ) )
+ #def updateProjectConfiguration( self, projectId, configuration ):
+ # checkResult( self.server.continuum.updateProjectConfiguration( projectId, configuration ) )
def getProject( self, projectId ):
result = checkResult( self.server.continuum.getProject( projectId ) )
- return Project( result[ "project" ] )
+ return self.makeProject( result[ "project" ] )
def getProjects( self ):
result = checkResult( self.server.continuum.getAllProjects() )
projects = []
for project in result[ "projects" ]:
- projects.append( Project( project ) )
+ projects.append( self.makeProject( project ) )
return projects
@@ -168,7 +168,10 @@
def addAntProject( self, antProject ):
result = checkResult( self.server.continuum.addAntProject( antProject ) )
- return result[ "projectId" ]
+ return result[ "projectIds" ]
+
+ def updateAntProject( self, antProject ):
+ checkResult( self.server.continuum.updateAntProject( antProject ) )
####################################################################
# Shell projects
@@ -177,7 +180,28 @@
def addShellProject( self, shellProject ):
result = checkResult( self.server.continuum.addShellProject( shellProject ) )
- return result[ "projectId" ]
+ return result[ "projectIds" ]
+
+ def updateShellProject( self, shellProject ):
+ checkResult( self.server.continuum.updateShellProject( shellProject ) )
+
+ ####################################################################
+ #
+ ####################################################################
+
+ def makeProject( self, map ):
+ executorId = map[ "executorId" ]
+ if ( executorId == "maven2" ):
+ return MavenTwoProject( map )
+ elif ( executorId == "maven-1" ):
+ return MavenOneProject( map )
+ elif ( executorId == "ant" ):
+ return AntProject( map )
+ elif ( executorId == "shell" ):
+ return ShellProject( map )
+ else:
+ raise Exception( "Unknown executor id '" + executorId + "'." );
+
####################################################################
# Domain classes
@@ -190,14 +214,14 @@
if ( map == None ):
return
- map[ "state" ] = decodeState( int( map[ "state" ] ) )
+# map[ "state" ] = decodeState( int( map[ "state" ] ) )
self.id = map[ "id" ]
self.name = map[ "name" ]
self.scmUrl = map[ "scmUrl" ]
self.nagEmailAddress = map[ "nagEmailAddress" ]
self.version = map[ "version" ]
self.workingDirectory = map[ "workingDirectory" ]
- self.state = map[ "state" ]
+ self.state = int( map[ "state" ] )
self.executorId = map[ "executorId" ]
if ( map.has_key( "commandLineArguments" ) ):
@@ -205,7 +229,7 @@
else:
self.commandLineArguments = ""
- self.configuration = map[ "configuration" ]
+# self.configuration = map[ "configuration" ]
if ( map.has_key( "checkOutScmResult" ) ):
self.checkOutScmResult = CheckOutScmResult( map[ "checkOutScmResult" ] )
@@ -224,18 +248,44 @@
s = "id: " + self.id + os.linesep +\
"name: " + self.name + os.linesep +\
"nagEmailAddress: " + self.nagEmailAddress + os.linesep +\
- "state: " + self.state + os.linesep +\
+ "state: " + decodeState( self.state ) + os.linesep +\
"version: " + self.version + os.linesep +\
"executor id: " + self.executorId + os.linesep
- if ( len( self.configuration.keys() ) > 0 ):
- conf = ""
- for key in self.configuration.keys():
- conf += os.linesep + key + "=" + self.configuration[ key ]
- s += conf
+# if ( len( self.configuration.keys() ) > 0 ):
+# conf = ""
+# for key in self.configuration.keys():
+# conf += os.linesep + key + "=" + self.configuration[ key ]
+# s += conf
return s
+class MavenTwoProject( Project ):
+ def __init__( self, map=None ):
+ Project.__init__( self, map )
+
+ if ( map == None ):
+ return
+
+ self.goals = map[ "goals" ]
+
+ def __str__( self ):
+ return Project.__str__( self ) + os.linesep +\
+ "goals: " + self.goals + os.linesep
+
+class MavenOneProject( Project ):
+ def __init__( self, map=None ):
+ Project.__init__( self, map )
+
+ if ( map == None ):
+ return
+
+ self.goals = map[ "goals" ]
+
+ def __str__( self ):
+ return Project.__str__( self ) + os.linesep +\
+ "goals: " + self.goals + os.linesep
+
class AntProject( Project ):
def __init__( self, map=None ):
Project.__init__( self, map )
@@ -251,16 +301,29 @@
"executable: " + self.executable + os.linesep +\
"targets: " + self.targets + os.linesep
+class ShellProject( Project ):
+ def __init__( self, map=None ):
+ Project.__init__( self, map )
+
+ if ( map == None ):
+ return
+
+ self.executable = map[ "executable" ]
+
+ def __str__( self ):
+ return Project.__str__( self ) + os.linesep +\
+ "executable: " + self.executable + os.linesep
+
class Build:
def __init__( self, map ):
- map[ "state" ] = decodeState( int( map[ "state" ] ) )
+ #map[ "state" ] = decodeState( int( map[ "state" ] ) )
map[ "forced" ] = bool( map[ "forced" ] )
map[ "totalTime" ] = int( map[ "endTime" ] )/ 1000 - int( map[ "startTime" ] ) / 1000
map[ "startTime" ] = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime( int( map[ "startTime" ] ) / 1000 ) )
map[ "endTime" ] = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime( int( map[ "endTime" ] ) / 1000 ) )
self.id = map[ "id" ]
- self.state = map[ "state" ]
+ self.state = int( map[ "state" ] )
self.forced = map[ "forced" ]
self.startTime = map[ "startTime" ]
self.endTime = map[ "endTime" ]
@@ -277,17 +340,15 @@
map[ "error" ] = ""
def __str__( self ):
- value = """Id: %(id)s
-State: %(state)s
-Start time: %(startTime)s
-End time: %(endTime)s
-Build time: %(totalTime)ss
-""" % self.map
+ s = "Id: " + self.id + os.linesep +\
+ "State: " + decodeState( self.state ) + os.linesep +\
+ "End time: " + self.endTime + os.linesep +\
+ "Build time: " + self.totalTime + os.linesep
if ( self.error != "" ):
- value += "Error: %(error)s" % self.map
+ s += "Error: %(error)s" % self.map
- return value
+ return s
class BuildResult:
def __init__( self, map ):
Modified: maven/continuum/trunk/continuum-core-it/continuum_cli.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum_cli.py?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum_cli.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum_cli.py Mon Jun 13 09:45:42 2005
@@ -67,13 +67,13 @@
project = continuum.getProject( args[0] )
print "Project details:"
- print """Id: %(id)s
-Name: %(name)s
-Version: %(version)s
-Working directory: %(workingDirectory)s
-State: %(state)s
-Executor type: %(executorId)s
-SCM URL: %(scmUrl)s""" % project.map
+ print "Id: " + project.id
+ print "Name: " + project.name
+ print "Version: " + project.version
+ print "Working directory: " + project.workingDirectory
+ print "State: " + continuum.decodeState( project.state )
+ print "Executor type: " + project.executorId
+ print "SCM URL: " + project.scmUrl
if ( not isEmpty( project.checkOutErrorMessage ) or not isEmpty( project.checkOutErrorException ) ):
print ""
@@ -108,6 +108,7 @@
print "Projects:"
print " Id | State | Executor | Name"
for project in projects:
+ project.state = continuum.decodeState( project.state )
print "%(id)4s | %(state)12s | %(executorId)s | %(name)s" % project.map
def do_removeProject(self,args):
Modified: maven/continuum/trunk/continuum-core-it/it.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it.py?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it.py (original)
+++ maven/continuum/trunk/continuum-core-it/it.py Mon Jun 13 09:45:42 2005
@@ -1,4 +1,4 @@
-from continuum import Continuum, AntProject
+from continuum import Continuum, MavenTwoProject, MavenOneProject, AntProject, ShellProject
import os
import shutil
import sys
@@ -38,7 +38,7 @@
startTime = int( time.time() )
-if 0:
+if 1:
progress( "Initializing Maven 1 CVS project" )
initMaven1Project( maven1Project, "cvs", cvsroot, "maven-1" )
progress( "Adding Maven 1 project" )
@@ -75,7 +75,7 @@
removeProject( continuum, maven1.id );
-if 0:
+if 1:
progress( "Initializing Maven 2 CVS project" )
initMaven2Project( maven2Project, cvsroot, "maven-2" )
progress( "Adding Maven 2 project" )
@@ -90,10 +90,8 @@
progress( "Test that a build without any files changed won't execute the executor" )
expectedSize = len( continuum.getBuildsForProject( maven2.id ) )
- print( "waiting" )
continuum.buildProject( maven2.id, False )
time.sleep( 3.0 )
- print( "waited" )
actualSize = len( continuum.getBuildsForProject( maven2.id ) )
assertEquals( "A build has unexpectedly been executed.", expectedSize, actualSize )
@@ -111,15 +109,15 @@
svnImport( antProject, svnroot, "ant-svn" )
progress( "Adding Ant SVN project" )
- antProject = AntProject()
- antProject.scmUrl = "scm:svn:file://" + svnroot + "/ant-svn"
- antProject.name = "Ant SVN Project"
- antProject.nagEmailAddress = email
- antProject.version = "3.0"
- antProject.commandLineArguments = "-v"
- antProject.executable = "ant"
- antProject.targets = "clean build"
- antSvnId = continuum.addAntProject( antProject )
+ p = AntProject()
+ p.scmUrl = "scm:svn:file://" + svnroot + "/ant-svn"
+ p.name = "Ant SVN Project"
+ p.nagEmailAddress = email
+ p.version = "3.0"
+ p.commandLineArguments = "-v"
+ p.executable = "ant"
+ p.targets = "clean build"
+ antSvnId = getProjectId( continuum.addAntProject( p ) )
waitForSuccessfulCheckOut( continuum, antSvnId );
antSvn = continuum.getProject( antSvnId )
assertProject( antSvnId, "Ant SVN Project", email, continuum.STATE_NEW, "3.0", "-v", "ant", antSvn )
@@ -129,13 +127,22 @@
removeProject( continuum, antSvnId )
-if 0:
+if 1:
progress( "Initializing Ant CVS project" )
initAntProject( antProject )
cvsImport( antProject, cvsroot, "ant-cvs" )
- antCvsId = continuum.addAntProject( "scm:cvs:local:" + basedir + "/cvsroot:ant-cvs", "Ant CVS Project", email, "3.0", "-d",
- { "executable": "ant", "targets" : "clean build"} )
+
+ p = AntProject()
+ p.scmUrl = "scm:cvs:local:" + basedir + "/cvsroot:ant-cvs"
+ p.name = "Ant CVS Project"
+ p.nagEmailAddress = email
+ p.version = "3.0"
+ p.commandLineArguments = "-d"
+ p.executable = "ant"
+ p.targets = "clean build"
+ antCvsId = getProjectId( continuum.addAntProject( p ) )
waitForSuccessfulCheckOut( continuum, antCvsId );
+
antCvs = continuum.getProject( antCvsId )
assertProject( antCvsId, "Ant CVS Project", email, continuum.STATE_NEW, "3.0", "-d", "ant", antCvs )
progress( "Building CVS Ant project" )
@@ -143,16 +150,20 @@
assertSuccessfulAntBuild( continuum, buildId )
removeProject( continuum, antCvsId )
-if 0:
+if 1:
progress( "Initializing Shell CVS project" )
initShellProject( shellProject )
cvsImport( shellProject, cvsroot, "shell" )
progress( "Adding CVS Shell project" )
- shellId = continuum.addShellProject( "scm:cvs:local:" + basedir + "/cvsroot:shell", "Shell Project", email, "3.0", "",
- {
- "executable": "script.sh",
- } )
+ p = ShellProject()
+ p.scmUrl = "scm:cvs:local:" + basedir + "/cvsroot:shell"
+ p.name = "Shell Project"
+ p.nagEmailAddress = email
+ p.version = "3.0"
+ p.commandLineArguments = ""
+ p.executable = "script.sh"
+ shellId = getProjectId( continuum.addShellProject( p ) )
waitForSuccessfulCheckOut( continuum, shellId );
shell = continuum.getProject( shellId )
assertProject( shellId, "Shell Project", email, continuum.STATE_NEW, "3.0", "", "shell", shell )
@@ -177,8 +188,11 @@
output = cvsCommit( coDir )
- continuum.updateProject( shell.id, shell.name, shell.scmUrl, shell.nagEmailAddress, shell.version, "a b" )
+ #continuum.updateProject( shell.id, shell.name, shell.scmUrl, shell.nagEmailAddress, shell.version, "a b" )
shell = continuum.getProject( shell.id )
+ shell.commandLineArguments = "a b";
+ continuum.updateShellProject( shell )
+
buildId = buildProject( continuum, shell.id ).id
assertSuccessfulShellBuild( continuum, buildId, """a
b
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=190423&r1=190422&r2=190423&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 Mon Jun 13 09:45:42 2005
@@ -16,38 +16,37 @@
* limitations under the License.
*/
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
import org.apache.maven.continuum.core.ContinuumCore;
-import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
import org.apache.maven.continuum.core.action.AbstractContinuumAction;
+import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
import org.apache.maven.continuum.core.action.StoreProjectAction;
-import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
-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.project.AntProject;
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.ContinuumProjectState;
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.ContinuumProjectState;
+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.project.builder.ContinuumProjectBuildingResult;
import org.apache.maven.continuum.scm.CheckOutScmResult;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
+import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
+import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
+
+import org.codehaus.plexus.action.ActionManager;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.workflow.WorkflowEngine;
-import org.codehaus.plexus.action.ActionManager;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.Collection;
-import java.util.Properties;
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -129,11 +128,11 @@
core.updateProjectFromScm( projectId );
}
- public void updateProjectConfiguration( String projectId, Properties configuration )
- throws ContinuumException
- {
- core.updateProjectConfiguration( projectId, configuration );
- }
+// public void updateProjectConfiguration( String projectId, Properties configuration )
+// throws ContinuumException
+// {
+// core.updateProjectConfiguration( projectId, configuration );
+// }
public void removeProject( String projectId )
throws ContinuumException
@@ -227,37 +226,27 @@
public String addAntProject( AntProject project )
throws ContinuumException
{
- Properties configuration = new Properties();
+ project.setExecutorId( AntBuildExecutor.ID );
- configuration.setProperty( AntBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
-
- configuration.setProperty( AntBuildExecutor.CONFIGURATION_TARGETS, project.getTargets() );
-
- String projectId = core.addProjectFromScm( project.getScmUrl(),
- AntBuildExecutor.ID,
- project.getName(),
- project.getNagEmailAddress(),
- project.getVersion(),
- project.getCommandLineArguments(),
- configuration );
+ String projectId = core.addProjectFromScm( project );
return projectId;
}
- public AntProject getAntProject( String id )
+ public AntProject getAntProject( String projectId )
throws ContinuumException
{
- ContinuumProject p = getProject( id );
-
- AntProject ap = new AntProject();
-
- copyProject( p, ap );
+// ContinuumProject p = getProject( id );
+//
+// AntProject ap = new AntProject();
+//
+// copyProject( p, ap );
+//
+// ap.setTargets( p.getConfiguration().getProperty( AntBuildExecutor.CONFIGURATION_TARGETS ) );
+//
+// ap.setExecutable( p.getConfiguration().getProperty( AntBuildExecutor.CONFIGURATION_EXECUTABLE ) );
- ap.setTargets( p.getConfiguration().getProperty( AntBuildExecutor.CONFIGURATION_TARGETS ) );
-
- ap.setExecutable( p.getConfiguration().getProperty( AntBuildExecutor.CONFIGURATION_EXECUTABLE ) );
-
- return ap;
+ return (AntProject) core.getProject( projectId );
}
public void updateAntProject( AntProject project )
@@ -265,19 +254,19 @@
{
updateProject( project );
- // ----------------------------------------------------------------------
- // The configuration will be null here because the "executable" and
- // "targets" fields in the AntProject are used to create the
- // configuration. We probably don't even need the configuration.
- // ----------------------------------------------------------------------
-
- Properties configuration = new Properties();
-
- configuration.setProperty( AntBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
-
- configuration.setProperty( AntBuildExecutor.CONFIGURATION_TARGETS, project.getTargets() );
-
- updateProjectConfiguration( project.getId(), configuration );
+// // ----------------------------------------------------------------------
+// // The configuration will be null here because the "executable" and
+// // "targets" fields in the AntProject are used to create the
+// // configuration. We probably don't even need the configuration.
+// // ----------------------------------------------------------------------
+//
+// Properties configuration = new Properties();
+//
+// configuration.setProperty( AntBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
+//
+// configuration.setProperty( AntBuildExecutor.CONFIGURATION_TARGETS, project.getTargets() );
+//
+// updateProjectConfiguration( project.getId(), configuration );
}
// ----------------------------------------------------------------------
@@ -319,6 +308,8 @@
{
ContinuumProject project = (ContinuumProject) i.next();
+ project.setExecutorId( MavenOneBuildExecutor.ID );
+
context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
actionManager.lookup( "validate-project" ).execute( context );
@@ -341,9 +332,11 @@
public String addMavenOneProject( MavenOneProject project )
throws ContinuumException
{
- Properties configuration = new Properties();
+// Properties configuration = new Properties();
+//
+// configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
- configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
+ project.setExecutorId( MavenOneBuildExecutor.ID );
// ----------------------------------------------------------------------
//
@@ -371,18 +364,19 @@
}
}
- public MavenOneProject getMavenOneProject( String id )
+ public MavenOneProject getMavenOneProject( String projectId )
throws ContinuumException
{
- ContinuumProject p = getProject( id );
-
- MavenOneProject mp = new MavenOneProject();
-
- copyProject( p, mp );
-
- mp.setGoals( p.getConfiguration().getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
-
- return mp;
+// ContinuumProject p = getProject( projectId );
+//
+// MavenOneProject mp = new MavenOneProject();
+//
+// copyProject( p, mp );
+//
+// mp.setGoals( p.getConfiguration().getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+//
+// return mp;
+ return (MavenOneProject) core.getProject( projectId );
}
public void updateMavenOneProject( MavenOneProject project )
@@ -390,11 +384,11 @@
{
updateProject( project );
- Properties configuration = new Properties();
-
- configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
-
- updateProjectConfiguration( project.getId(), configuration );
+// Properties configuration = new Properties();
+//
+// configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
+//
+// updateProjectConfiguration( project.getId(), configuration );
}
// ----------------------------------------------------------------------
@@ -444,6 +438,8 @@
{
ContinuumProject project = (ContinuumProject) i.next();
+ project.setExecutorId( MavenTwoBuildExecutor.ID );
+
context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
actionManager.lookup( "validate-project" ).execute( context );
@@ -467,11 +463,13 @@
public String addMavenTwoProject( MavenTwoProject project )
throws ContinuumException
{
- //TODO: these need to go away
-
- Properties configuration = new Properties();
+// //TODO: these need to go away
+//
+// Properties configuration = new Properties();
+//
+// configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
- configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
+ project.setExecutorId( MavenTwoBuildExecutor.ID );
// ----------------------------------------------------------------------
//
@@ -499,18 +497,19 @@
return project.getId();
}
- public MavenTwoProject getMavenTwoProject( String id )
+ public MavenTwoProject getMavenTwoProject( String projectId )
throws ContinuumException
{
- ContinuumProject p = getProject( id );
-
- MavenTwoProject mp = new MavenTwoProject();
-
- copyProject( p, mp );
-
- mp.setGoals( p.getConfiguration().getProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
-
- return mp;
+// ContinuumProject p = getProject( projectId );
+//
+// MavenTwoProject mp = new MavenTwoProject();
+//
+// copyProject( p, mp );
+//
+// mp.setGoals( p.getConfiguration().getProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
+//
+// return mp;
+ return (MavenTwoProject) core.getProject( projectId );
}
public void updateMavenTwoProject( MavenTwoProject project )
@@ -518,45 +517,38 @@
{
updateProject( project );
- Properties configuration = new Properties();
-
- String goals = StringUtils.clean( project.getGoals() );
-
- configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, goals );
-
- updateProjectConfiguration( project.getId(), configuration );
+// Properties configuration = new Properties();
+//
+// String goals = StringUtils.clean( project.getGoals() );
+//
+// configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, goals );
+//
+// updateProjectConfiguration( project.getId(), configuration );
}
public String addShellProject( ShellProject project )
throws ContinuumException
{
- Properties configuration = new Properties();
+ project.setExecutorId( ShellBuildExecutor.ID );
- configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
-
- String projectId = core.addProjectFromScm( project.getScmUrl(),
- ShellBuildExecutor.ID,
- project.getName(),
- project.getNagEmailAddress(),
- project.getVersion(),
- project.getCommandLineArguments(),
- configuration );
+ String projectId = core.addProjectFromScm( project );
return projectId;
}
- public ShellProject getShellProject( String id )
+ public ShellProject getShellProject( String projectId )
throws ContinuumException
{
- ContinuumProject p = getProject( id );
-
- ShellProject sp = new ShellProject();
-
- copyProject( p, sp );
-
- sp.setExecutable( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE ) );
-
- return sp;
+// ContinuumProject p = getProject( id );
+//
+// ShellProject sp = new ShellProject();
+//
+// copyProject( p, sp );
+//
+// sp.setExecutable( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE ) );
+//
+// return sp;
+ return (ShellProject) core.getProject( projectId );
}
public void updateShellProject( ShellProject project )
@@ -564,11 +556,11 @@
{
updateProject( project );
- Properties configuration = new Properties();
-
- configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
-
- updateProjectConfiguration( project.getId(), configuration );
+// Properties configuration = new Properties();
+//
+// configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
+//
+// updateProjectConfiguration( project.getId(), configuration );
}
// ----------------------------------------------------------------------
@@ -586,18 +578,18 @@
project.getCommandLineArguments() );
}
- private void copyProject( ContinuumProject p1, ContinuumProject p2 )
- {
- p2.setId( p1.getId() );
-
- p2.setName( p1.getName() );
-
- p2.setScmUrl( p1.getScmUrl() );
-
- p2.setNagEmailAddress( p1.getNagEmailAddress() );
-
- p2.setVersion( p1.getVersion() );
-
- p2.setExecutorId( p1.getExecutorId() );
- }
+// private void copyProject( ContinuumProject p1, ContinuumProject p2 )
+// {
+// p2.setId( p1.getId() );
+//
+// p2.setName( p1.getName() );
+//
+// p2.setScmUrl( p1.getScmUrl() );
+//
+// p2.setNagEmailAddress( p1.getNagEmailAddress() );
+//
+// p2.setVersion( p1.getVersion() );
+//
+// p2.setExecutorId( p1.getExecutorId() );
+// }
}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java Mon Jun 13 09:45:42 2005
@@ -18,12 +18,8 @@
import java.net.URL;
import java.util.Collection;
-import java.util.Properties;
-import java.io.File;
import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.store.ContinuumStore;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
import org.apache.maven.continuum.project.ContinuumBuild;
@@ -32,6 +28,8 @@
import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
import org.apache.maven.continuum.scm.CheckOutScmResult;
import org.apache.maven.continuum.scm.ContinuumScm;
+import org.apache.maven.continuum.store.ContinuumStore;
+
import org.codehaus.plexus.taskqueue.TaskQueue;
/**
@@ -43,24 +41,13 @@
{
String ROLE = ContinuumCore.class.getName();
- //TODO: an URL converter in OGNL would be nice.
-
Collection addProjectsFromUrl( String url, String projectBuilderId )
throws ContinuumException;
Collection addProjectsFromUrl( URL url, String projectBuilderId )
throws ContinuumException;
- /**
- * @deprecated
- */
- String addProjectFromScm( String scmUrl,
- String executorId,
- String projectName,
- String nagEmailAddress,
- String version,
- String commandLineArugments,
- Properties configuration )
+ String addProjectFromScm( ContinuumProject project )
throws ContinuumException;
void removeProject( String projectId )
@@ -77,8 +64,8 @@
String commandLineArguments )
throws ContinuumException;
- void updateProjectConfiguration( String projectId, Properties configuration )
- throws ContinuumException;
+// void updateProjectConfiguration( String projectId, Properties configuration )
+// throws ContinuumException;
ContinuumProject getProject( String projectId )
throws ContinuumException;
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java Mon Jun 13 09:45:42 2005
@@ -24,7 +24,6 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.buildqueue.BuildProjectTask;
@@ -202,7 +201,7 @@
{
ContinuumProject project = (ContinuumProject) it.next();
- project = addProjectAndCheckOutSources( project, project.getExecutorId() );
+ project = addProjectAndCheckOutSources( project );
ids.add( project.getId() );
}
@@ -210,36 +209,10 @@
return ids;
}
- public String addProjectFromScm( String scmUrl,
- String executorId,
- String projectName,
- String nagEmailAddress,
- String version,
- String commandLineArugments,
- Properties configuration )
+ public String addProjectFromScm( ContinuumProject project )
throws ContinuumException
{
// ----------------------------------------------------------------------
- // Create the stub project
- // ----------------------------------------------------------------------
-
- ContinuumProject project = new ContinuumProject();
-
- project.setScmUrl( scmUrl );
-
- project.setExecutorId( executorId );
-
- project.setName( projectName );
-
- project.setNagEmailAddress( nagEmailAddress );
-
- project.setVersion( version );
-
- project.setCommandLineArguments( commandLineArugments );
-
- project.setConfiguration( configuration );
-
- // ----------------------------------------------------------------------
// Validate the project
// ----------------------------------------------------------------------
@@ -255,7 +228,7 @@
//
// ----------------------------------------------------------------------
- project = addProjectAndCheckOutSources( project, executorId );
+ project = addProjectAndCheckOutSources( project );
updateProjectFromCheckOut( project );
@@ -330,18 +303,18 @@
}
}
- public void updateProjectConfiguration( String projectId, Properties configuration )
- throws ContinuumException
- {
- try
- {
- store.updateProjectConfiguration( projectId, configuration );
- }
- catch ( ContinuumStoreException ex )
- {
- throw logAndCreateException( "Error while updating project configuration.", ex );
- }
- }
+// public void updateProjectConfiguration( String projectId, Properties configuration )
+// throws ContinuumException
+// {
+// try
+// {
+// store.updateProjectConfiguration( projectId, configuration );
+// }
+// catch ( ContinuumStoreException ex )
+// {
+// throw logAndCreateException( "Error while updating project configuration.", ex );
+// }
+// }
public void removeProject( String projectId )
throws ContinuumException
@@ -514,22 +487,23 @@
throw logAndCreateException( "No such executor with id '" + project.getExecutorId() + "'." );
}
- try
- {
- if ( store.getProjectByName( project.getName() ) != null )
- {
- throw new ContinuumException( "A project with the name '" + project.getName() + "' already exist." );
- }
-
-// if ( getProjectByScmUrl( scmUrl ) != null )
+ // TODO: Reenable
+// try
+// {
+// if ( store.getProjectByName( project.getName() ) != null )
// {
-// throw new ContinuumStoreException( "A project with the scm url '" + scmUrl + "' already exist." );
+// throw new ContinuumException( "A project with the name '" + project.getName() + "' already exist." );
// }
- }
- catch ( ContinuumStoreException e )
- {
- throw new ContinuumException( "Error while validating the project.", e );
- }
+//
+//// if ( getProjectByScmUrl( scmUrl ) != null )
+//// {
+//// throw new ContinuumStoreException( "A project with the scm url '" + scmUrl + "' already exist." );
+//// }
+// }
+// catch ( ContinuumStoreException e )
+// {
+// throw new ContinuumException( "Error while validating the project.", e );
+// }
// ----------------------------------------------------------------------
// Validate each field
@@ -538,7 +512,7 @@
project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
}
- private ContinuumProject addProjectAndCheckOutSources( ContinuumProject project, String executorId )
+ private ContinuumProject addProjectAndCheckOutSources( ContinuumProject project )
throws ContinuumException
{
String projectId;
@@ -551,14 +525,15 @@
// Store the project
// ----------------------------------------------------------------------
- projectId = store.addProject( project.getName(),
- project.getScmUrl(),
- project.getNagEmailAddress(),
- project.getVersion(),
- project.getCommandLineArguments(),
- executorId,
- null,
- project.getConfiguration() );
+// projectId = store.addProject( project.getName(),
+// project.getScmUrl(),
+// project.getNagEmailAddress(),
+// project.getVersion(),
+// project.getCommandLineArguments(),
+// executorId,
+// null,
+// project.getConfiguration() );
+ projectId = store.addProject( project );
// ----------------------------------------------------------------------
// Set the working directory
@@ -673,7 +648,7 @@
project.getVersion(),
project.getCommandLineArguments() );
- store.updateProjectConfiguration( id, project.getConfiguration() );
+// store.updateProjectConfiguration( id, project.getConfiguration() );
}
catch ( ContinuumStoreException e )
{
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Mon Jun 13 09:45:42 2005
@@ -17,7 +17,6 @@
*/
import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java Mon Jun 13 09:45:42 2005
@@ -26,6 +26,7 @@
import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.AntProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
@@ -56,16 +57,21 @@
// ContinuumBuilder Implementation
// ----------------------------------------------------------------------
- public ContinuumBuildResult build( ContinuumProject project )
+ public ContinuumBuildResult build( ContinuumProject p )
throws ContinuumBuildExecutorException
{
- File workingDirectory = new File( project.getWorkingDirectory() );
+ AntProject project = (AntProject) p;
- Properties configuration = project.getConfiguration();
+ File workingDirectory = new File( project.getWorkingDirectory() );
- String executable = getConfiguration( configuration, CONFIGURATION_EXECUTABLE );
+// Properties configuration = project.getConfiguration();
+//
+// String executable = getConfiguration( configuration, CONFIGURATION_EXECUTABLE );
+//
+// String targets = getConfiguration( configuration, CONFIGURATION_TARGETS );
+ String executable = project.getExecutable();
- String targets = getConfiguration( configuration, CONFIGURATION_TARGETS );
+ String targets = project.getTargets();
ExecutionResult executionResult;
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java Mon Jun 13 09:45:42 2005
@@ -18,9 +18,8 @@
import java.io.File;
import java.io.FileReader;
-import java.util.Properties;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenOneProject;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.StringUtils;
@@ -39,7 +38,7 @@
// MavenOneMetadataHelper Implementation
// ----------------------------------------------------------------------
- public void mapMetadata( File metadata, ContinuumProject project )
+ public void mapMetadata( File metadata, MavenOneProject project )
throws MavenOneMetadataHelperException
{
Xpp3Dom mavenProject;
@@ -128,11 +127,15 @@
}
// Goals
- Properties configuration = new Properties();
-
- if ( StringUtils.isEmpty( configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) ) )
+// Properties configuration = new Properties();
+//
+// if ( StringUtils.isEmpty( configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) ) )
+// {
+// configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
+// }
+ if ( StringUtils.isEmpty( project.getGoals() ) )
{
- configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
+ project.setGoals( "clean:clean jar:install" );
}
// ----------------------------------------------------------------------
@@ -147,7 +150,7 @@
project.setVersion( version );
- project.setConfiguration( configuration );
+// project.setConfiguration( configuration );
}
// ----------------------------------------------------------------------
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java Mon Jun 13 09:45:42 2005
@@ -17,7 +17,6 @@
*/
import java.io.File;
-import java.util.Properties;
import org.apache.maven.continuum.execution.AbstractBuildExecutor;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
@@ -26,6 +25,7 @@
import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenOneProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
@@ -52,16 +52,18 @@
// Builder Implementation
// ----------------------------------------------------------------------
- public ContinuumBuildResult build( ContinuumProject project )
+ public ContinuumBuildResult build( ContinuumProject p )
throws ContinuumBuildExecutorException
{
- Properties configuration = project.getConfiguration();
+ MavenOneProject project = (MavenOneProject) p;
File workingDirectory = new File( project.getWorkingDirectory() );
- String goals = getConfiguration( configuration, CONFIGURATION_GOALS );
+// Properties configuration = project.getConfiguration();
+//
+// String goals = getConfiguration( configuration, CONFIGURATION_GOALS );
- String commandLine = project.getCommandLineArguments() + " " + goals;
+ String commandLine = project.getCommandLineArguments() + " " + project.getGoals();
ExecutionResult executionResult;
@@ -103,7 +105,7 @@
try
{
- metadataHelper.mapMetadata( projectXmlFile, project );
+ metadataHelper.mapMetadata( projectXmlFile, (MavenOneProject) project );
}
catch ( MavenOneMetadataHelperException e )
{
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java Mon Jun 13 09:45:42 2005
@@ -19,15 +19,16 @@
import java.io.File;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenOneProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
- * @version $Id:$
+ * @version $Id$
*/
public interface MavenOneMetadataHelper
{
String ROLE = MavenOneMetadataHelper.class.getName();
- void mapMetadata( File metadata, ContinuumProject project )
+ void mapMetadata( File metadata, MavenOneProject project )
throws MavenOneMetadataHelperException;
}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java Mon Jun 13 09:45:42 2005
@@ -19,18 +19,17 @@
import java.io.File;
import java.util.Collections;
import java.util.Iterator;
-import java.util.Properties;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.continuum.project.ContinuumProject;
import org.apache.maven.continuum.project.ContinuumDeveloper;
+import org.apache.maven.continuum.project.MavenTwoProject;
import org.apache.maven.model.CiManagement;
+import org.apache.maven.model.Developer;
import org.apache.maven.model.Notifier;
import org.apache.maven.model.Repository;
import org.apache.maven.model.Scm;
-import org.apache.maven.model.Developer;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.settings.MavenSettingsBuilder;
@@ -67,13 +66,13 @@
// MavenBuilderHelper Implementation
// ----------------------------------------------------------------------
- public void mapMetadataToProject( File metadata, ContinuumProject continuumProject )
+ public void mapMetadataToProject( File metadata, MavenTwoProject continuumProject )
throws MavenBuilderHelperException
{
mapMavenProjectToContinuumProject( getMavenProject( metadata ), continuumProject );
}
- public void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject )
+ public void mapMavenProjectToContinuumProject( MavenProject mavenProject, MavenTwoProject continuumProject )
{
continuumProject.setNagEmailAddress( getNagEmailAddress( mavenProject ) );
@@ -88,11 +87,15 @@
continuumProject.setCommandLineArguments( "-N" );
}
- Properties configuration = continuumProject.getConfiguration();
-
- if ( StringUtils.isEmpty( configuration.getProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) ) )
+// Properties configuration = continuumProject.getConfiguration();
+//
+// if ( StringUtils.isEmpty( configuration.getProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) ) )
+// {
+// configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean install" );
+// }
+ if ( StringUtils.isEmpty( continuumProject.getGoals() ) )
{
- configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean install" );
+ continuumProject.setGoals( "clean:clean install" );
}
// ----------------------------------------------------------------------
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java Mon Jun 13 09:45:42 2005
@@ -19,21 +19,22 @@
import java.io.File;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenTwoProject;
import org.apache.maven.project.MavenProject;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: MavenBuilderHelper.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
*/
public interface MavenBuilderHelper
{
String ROLE = MavenBuilderHelper.class.getName();
- void mapMetadataToProject( File metadata, ContinuumProject project )
+ void mapMetadataToProject( File metadata, MavenTwoProject project )
throws MavenBuilderHelperException;
MavenProject getMavenProject( File file )
throws MavenBuilderHelperException;
- void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject );
+ void mapMavenProjectToContinuumProject( MavenProject mavenProject, MavenTwoProject continuumProject );
}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java Mon Jun 13 09:45:42 2005
@@ -25,6 +25,7 @@
import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenTwoProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
@@ -59,17 +60,18 @@
// ContinuumBuilder Implementation
// ----------------------------------------------------------------------
- public ContinuumBuildResult build( ContinuumProject project )
+ public ContinuumBuildResult build( ContinuumProject p )
throws ContinuumBuildExecutorException
{
+ MavenTwoProject project = (MavenTwoProject) p;
+
File workingDirectory = new File( project.getWorkingDirectory() );
ExecutionResult executionResult;
try
{
- String arguments = project.getCommandLineArguments() + " " +
- getConfiguration( project.getConfiguration(), CONFIGURATION_GOALS );
+ String arguments = project.getCommandLineArguments() + " " + project.getGoals();
executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
executable,
@@ -102,7 +104,7 @@
try
{
- builderHelper.mapMetadataToProject( f, project );
+ builderHelper.mapMetadataToProject( f, (MavenTwoProject) project );
}
catch ( MavenBuilderHelperException e )
{
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java Mon Jun 13 09:45:42 2005
@@ -23,8 +23,7 @@
import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
-
-import org.codehaus.plexus.util.cli.Commandline;
+import org.apache.maven.continuum.project.ShellProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
@@ -53,14 +52,17 @@
// ContinuumBuilder implementation
// ----------------------------------------------------------------------
- public synchronized ContinuumBuildResult build( ContinuumProject project )
+ public synchronized ContinuumBuildResult build( ContinuumProject p )
throws ContinuumBuildExecutorException
{
+ ShellProject project = (ShellProject) p;
+
File workingDirectory = new File( project.getWorkingDirectory() );
ExecutionResult executionResult;
- String executable = getConfiguration( project.getConfiguration(), CONFIGURATION_EXECUTABLE );
+// String executable = getConfiguration( project.getConfiguration(), CONFIGURATION_EXECUTABLE );
+ String executable = project.getExecutable();
if ( executable.charAt( 0 ) != '/' &&
executable.charAt( 0 ) != '\\' )
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java Mon Jun 13 09:45:42 2005
@@ -21,7 +21,6 @@
import java.util.Date;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
@@ -101,41 +100,41 @@
return project.getId();
}
- public String addProject( String name,
- String scmUrl,
- String nagEmailAddress,
- String version,
- String commandLineArguments,
- String executorId,
- String workingDirectory,
- Properties configuration )
- throws ContinuumStoreException
- {
- ContinuumProject project = new ContinuumProject();
-
- project.setName( name );
- project.setScmUrl( scmUrl );
- project.setNagEmailAddress( nagEmailAddress );
- project.setVersion( version );
- project.setCommandLineArguments( commandLineArguments );
- project.setExecutorId( executorId );
- project.setWorkingDirectory( workingDirectory );
- project.setState( ContinuumProjectState.CHECKING_OUT );
- project.setConfiguration( configuration );
-
- try
- {
- Object id = store.addContinuumProject( project );
-
- project = store.getContinuumProjectByJdoId( id, true );
- }
- catch ( Exception e )
- {
- throw new ContinuumStoreException( "Error while adding a project.", e );
- }
-
- return project.getId();
- }
+// public String addProject( String name,
+// String scmUrl,
+// String nagEmailAddress,
+// String version,
+// String commandLineArguments,
+// String executorId,
+// String workingDirectory,
+// Properties configuration )
+// throws ContinuumStoreException
+// {
+// ContinuumProject project = new ContinuumProject();
+//
+// project.setName( name );
+// project.setScmUrl( scmUrl );
+// project.setNagEmailAddress( nagEmailAddress );
+// project.setVersion( version );
+// project.setCommandLineArguments( commandLineArguments );
+// project.setExecutorId( executorId );
+// project.setWorkingDirectory( workingDirectory );
+// project.setState( ContinuumProjectState.CHECKING_OUT );
+// project.setConfiguration( configuration );
+//
+// try
+// {
+// Object id = store.addContinuumProject( project );
+//
+// project = store.getContinuumProjectByJdoId( id, true );
+// }
+// catch ( Exception e )
+// {
+// throw new ContinuumStoreException( "Error while adding a project.", e );
+// }
+//
+// return project.getId();
+// }
public void removeProject( String projectId )
throws ContinuumStoreException
@@ -273,28 +272,28 @@
}
}
- public void updateProjectConfiguration( String projectId, Properties configuration )
- throws ContinuumStoreException
- {
- try
- {
- store.begin();
-
- ContinuumProject project = store.getContinuumProject( projectId, false );
-
- projectStateGuard.assertUpdatable( project );
-
- project.setConfiguration( configuration );
-
- store.commit();
- }
- catch ( Exception e )
- {
- rollback( store );
-
- throw new ContinuumStoreException( "Error while updating project configuration.", e );
- }
- }
+// public void updateProjectConfiguration( String projectId, Properties configuration )
+// throws ContinuumStoreException
+// {
+// try
+// {
+// store.begin();
+//
+// ContinuumProject project = store.getContinuumProject( projectId, false );
+//
+// projectStateGuard.assertUpdatable( project );
+//
+// project.setConfiguration( configuration );
+//
+// store.commit();
+// }
+// catch ( Exception e )
+// {
+// rollback( store );
+//
+// throw new ContinuumStoreException( "Error while updating project configuration.", e );
+// }
+// }
public Collection getAllProjects()
throws ContinuumStoreException
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=190423&r1=190422&r2=190423&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 Mon Jun 13 09:45:42 2005
@@ -51,7 +51,7 @@
lookup( TaskQueueExecutor.ROLE, "check-out-project" );
}
- public void testUpdateProject()
+ public void testUpdateMavenTwoProject()
throws Exception
{
Continuum continuum = (Continuum) lookup( Continuum.ROLE );
@@ -82,7 +82,7 @@
continuum.updateMavenTwoProject( project );
- project = (MavenTwoProject) store.getProject( project.getId() );
+ project = continuum.getMavenTwoProject( project.getId() );
assertNotNull( "The command line arguments are null.", project.getCommandLineArguments() );
}
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java Mon Jun 13 09:45:42 2005
@@ -17,10 +17,8 @@
*/
import java.io.File;
-import java.util.Properties;
import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.project.ContinuumProject;
import org.apache.maven.continuum.project.MavenOneProject;
import org.codehaus.plexus.PlexusTestCase;
@@ -59,7 +57,7 @@
// Make the "existing" project
// ----------------------------------------------------------------------
- ContinuumProject project = new MavenOneProject();
+ MavenOneProject project = new MavenOneProject();
project.setName( "Maven" );
@@ -69,9 +67,11 @@
project.setVersion( "1.1-SNAPSHOT" );
- Properties expectedConfiguration = new Properties();
+ project.setGoals( "clean:clean jar:install" );
- expectedConfiguration.put( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
+// Properties expectedConfiguration = new Properties();
+//
+// expectedConfiguration.put( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
// ----------------------------------------------------------------------
//
@@ -93,12 +93,13 @@
assertEquals( "1.1-SNAPSHOT", project.getVersion() );
- Properties configuration = project.getConfiguration();
-
- assertNotNull( configuration );
-
- assertEquals( 1, configuration.size() );
-
- assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+// Properties configuration = project.getConfiguration();
+//
+// assertNotNull( configuration );
+//
+// assertEquals( 1, configuration.size() );
+//
+// assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+ assertEquals( "clean:clean jar:install", project.getGoals() );
}
}
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java Mon Jun 13 09:45:42 2005
@@ -16,10 +16,7 @@
* limitations under the License.
*/
-import java.util.Properties;
-
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenOneProject;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -43,7 +40,7 @@
assertEquals( 1, result.getProjects().size() );
- ContinuumProject project = ( ContinuumProject ) result.getProjects().get( 0 );
+ MavenOneProject project = (MavenOneProject) result.getProjects().get( 0 );
assertNotNull( project );
@@ -55,12 +52,13 @@
assertEquals( "1.1-SNAPSHOT", project.getVersion() );
- Properties configuration = project.getConfiguration();
-
- assertNotNull( configuration );
-
- assertEquals( 1, configuration.size() );
-
- assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+// Properties configuration = project.getConfiguration();
+//
+// assertNotNull( configuration );
+//
+// assertEquals( 1, configuration.size() );
+//
+// assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+ assertEquals( "clean:clean jar:install", project.getGoals() );
}
}
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=190423&r1=190422&r2=190423&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Mon Jun 13 09:45:42 2005
@@ -22,7 +22,6 @@
import java.util.Iterator;
import java.util.Map;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
import org.apache.maven.continuum.project.MavenTwoProject;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -122,9 +121,10 @@
assertTrue( project.getScmUrl().startsWith( scmUrl ) );
- assertEquals( 1, project.getConfiguration().size() );
-
- assertEquals( "clean:clean install",
- project.getConfiguration().get( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
+// assertEquals( 1, project.getConfiguration().size() );
+//
+// assertEquals( "clean:clean install",
+// project.getConfiguration().get( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
+ assertEquals( "clean:clean install", project.getGoals() );
}
}