continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r208832 - in /maven/continuum/trunk/continuum-core: ./ src/main/java/org/apache/maven/continuum/ src/main/java/org/apache/maven/continuum/core/
Date Sat, 02 Jul 2005 14:27:41 GMT
Author: trygvis
Date: Sat Jul  2 07:27:39 2005
New Revision: 208832

URL: http://svn.apache.org/viewcvs?rev=208832&view=rev
Log:
o Adding Continuum.isBuilding() and ContinuumCore.isBuilding().
o Removing some more unused code.

Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    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

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/pom.xml?rev=208832&r1=208831&r2=208832&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Sat Jul  2 07:27:39 2005
@@ -40,7 +40,7 @@
     <dependency>
       <groupId>plexus</groupId>
       <artifactId>plexus-taskqueue</artifactId>
-      <version>1.0-alpha-1</version>
+      <version>1.0-alpha-2-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>plexus</groupId>

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=208832&r1=208831&r2=208832&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
Sat Jul  2 07:27:39 2005
@@ -120,6 +120,12 @@
         return core.getLatestBuildForProject( id );
     }
 
+    public boolean isBuilding( String id )
+        throws ContinuumException
+    {
+        return core.isBuilding( id );
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

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=208832&r1=208831&r2=208832&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
Sat Jul  2 07:27:39 2005
@@ -67,6 +67,9 @@
     ContinuumBuild getLatestBuildForProject( String id )
         throws ContinuumException;
 
+    boolean isBuilding( String id )
+        throws ContinuumException;
+
     // ----------------------------------------------------------------------
     // ContinuumBuild
     // ----------------------------------------------------------------------

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=208832&r1=208831&r2=208832&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
Sat Jul  2 07:27:39 2005
@@ -19,6 +19,7 @@
 import java.io.File;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
@@ -134,92 +135,33 @@
         }
     }
 
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-/*
-    public Collection addProjectsFromUrl( String url, String executorId )
+    public boolean isBuilding( String id )
         throws ContinuumException
     {
-        URL u;
-
-        try
-        {
-            u = new URL( url );
-        }
-        catch ( MalformedURLException e )
-        {
-            throw logAndCreateException( "Invalid URL.", e );
-        }
-
-        return addProjectsFromUrl( u, executorId );
-    }
-
-    public Collection addProjectsFromUrl( URL url, String executorId )
-        throws ContinuumException
-    {
-        ContinuumProjectBuilder projectBuilder = getProjectBuilder( executorId );
-
-        ContinuumProjectBuildingResult result;
+        List queue;
 
         try
         {
-            result = projectBuilder.buildProjectsFromMetadata( url );
+            queue = buildQueue.getQueueSnapshot();
         }
-        catch ( ContinuumProjectBuilderException e )
+        catch ( TaskQueueException e )
         {
-            throw logAndCreateException( "Error while creating projects from URL.", e );
+            throw new ContinuumException( "Error while getting the queue snapshot." );
         }
 
-        for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
+        for ( Iterator it = queue.iterator(); it.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) it.next();
+            BuildProjectTask task = (BuildProjectTask) it.next();
 
-            validateProject( project );
-        }
-
-        List ids = new ArrayList( result.getProjects().size() );
-
-        // TODO: Update from metadata in the initial checkout?
-
-        for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
-        {
-            ContinuumProject project = (ContinuumProject) it.next();
-
-            project = addProjectAndCheckOutSources( project );
-
-            ids.add( project.getId() );
+            if ( task.getProjectId().equals( id ) )
+            {
+                return true;
+            }
         }
 
-        return ids;
+        return false;
     }
 
-    public String addProjectFromScm( ContinuumProject project )
-        throws ContinuumException
-    {
-        // ----------------------------------------------------------------------
-        // Validate the project
-        // ----------------------------------------------------------------------
-
-        validateProject( project );
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        doTempCheckOut( project );
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        project = addProjectAndCheckOutSources( project );
-
-        updateProjectFromCheckOut( project );
-
-        return project.getId();
-    }
-*/
     public void removeProject( String projectId )
         throws ContinuumException
     {
@@ -232,50 +174,7 @@
             throw logAndCreateException( "Error while removing project.", ex );
         }
     }
-/*
-    public void updateProjectFromScm( String projectId )
-        throws ContinuumException
-    {
-        ContinuumProject project;
-
-        try
-        {
-            project = store.getProject( projectId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while updating project from SCM.", ex );
-        }
-
-        File workingDirectory = new File( project.getWorkingDirectory() );
 
-        if ( !workingDirectory.exists() )
-        {
-            getLogger().warn( "Creating missing working directory for project '" + project.getName()
+ "'." );
-
-            if ( !workingDirectory.exists() )
-            {
-                throw logAndCreateException( "Could not make missing working directory for
" +
-                                             "project '" + project.getName() + "'." );
-            }
-        }
-
-        // ----------------------------------------------------------------------
-        // Update the source code
-        // ----------------------------------------------------------------------
-
-        try
-        {
-            scm.updateProject( project );
-        }
-        catch ( ContinuumScmException e )
-        {
-            throw logAndCreateException( "Error while updating project.", e );
-        }
-
-        updateProjectFromCheckOut( project );
-    }
-*/
     public void updateProject( ContinuumProject project )
         throws ContinuumException
     {



Mime
View raw message