continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r440957 - in /maven/continuum/branches/continuum-acegi: ./ continuum-core/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/ap...
Date Thu, 07 Sep 2006 03:04:13 GMT
Author: joakime
Date: Wed Sep  6 20:04:11 2006
New Revision: 440957

URL: http://svn.apache.org/viewvc?view=rev&rev=440957
Log:
Merge from continuum/trunk@438596 thru continuum/trunk@440537 into branches/continuum-acegi.

Added:
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/pom.xml
      - copied unchanged from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/pom.xml
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/timeout/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/timeout/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/timeout/TimeoutTest.java
      - copied unchanged from r440942, maven/continuum/trunk/continuum-core/src/test-projects/timeout/src/test/java/org/apache/maven/continuum/testprojects/timeout/TimeoutTest.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
      - copied unchanged from r440942, maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/org/apache/maven/continuum/buildcontroller/
      - copied from r440942, maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/buildcontroller/
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.xml
      - copied unchanged from r440942, maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.xml
    maven/continuum/branches/continuum-acegi/continuum-store/src/test/resources/
      - copied from r440942, maven/continuum/trunk/continuum-store/src/test/resources/
    maven/continuum/branches/continuum-acegi/continuum-store/src/test/resources/log4j.xml
      - copied unchanged from r440942, maven/continuum/trunk/continuum-store/src/test/resources/log4j.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/confirmBuildDefinitionRemoval.jsp
      - copied unchanged from r440942, maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmBuildDefinitionRemoval.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp
      - copied unchanged from r440942, maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmGroupRemoval.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp
      - copied unchanged from r440942, maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp
Removed:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/deleteBuildDefinition.jsp
Modified:
    maven/continuum/branches/continuum-acegi/continuum-core/pom.xml
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/pom.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResults.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
    maven/continuum/branches/continuum-acegi/pom.xml

Modified: maven/continuum/branches/continuum-acegi/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/pom.xml?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/pom.xml (original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/pom.xml Wed Sep  6 20:04:11 2006
@@ -134,7 +134,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-taskqueue</artifactId>
-      <version>1.0-alpha-3</version>
+      <version>1.0-alpha-4-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>jpox</groupId>

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Sep  6 20:04:11 2006
@@ -2218,7 +2218,10 @@
 
     private void closeStore()
     {
-        store.closeStore();
+        if ( store != null )
+        {
+            store.closeStore();
+        }
     }
 
     public void stop()
@@ -2237,7 +2240,10 @@
 
         try
         {
-            configurationService.store();
+            if ( configurationService != null )
+            {
+                configurationService.store();
+            }
         }
         catch ( ConfigurationStoringException e )
         {
@@ -2531,9 +2537,13 @@
 
     private void stopMessage()
     {
-        getLogger().info( "Stopping Continuum." );
+        // Yes dorothy, this can happen!
+        if ( getLogger() != null )
+        {
+            getLogger().info( "Stopping Continuum." );
 
-        getLogger().info( "Continuum stopped." );
+            getLogger().info( "Continuum stopped." );
+        }
     }
 
     private String getVersion()

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Wed Sep  6 20:04:11 2006
@@ -74,8 +74,10 @@
     // ----------------------------------------------------------------------
 
     /**
+     * @param projectId
+     * @param buildDefinitionId
+     * @param trigger
      * @throws TaskExecutionException
-     * @todo structure of this method is a bit of a mess (too much exception/finally code)
      */
     public void build( int projectId, int buildDefinitionId, int trigger )
         throws TaskExecutionException
@@ -150,8 +152,7 @@
     }
 
     /**
-     * Checks if the build should be marked as ERROR and notifies
-     * the end of the build.
+     * Checks if the build should be marked as ERROR and notifies the end of the build.
      *
      * @param context
      * @throws TaskExecutionException
@@ -187,17 +188,25 @@
     {
         BuildResult build = context.getBuildResult();
 
-        build.setError( error );
-
-        try
+        if ( build == null )
         {
-            store.updateBuildResult( build );
-
-            build = store.getBuildResult( build.getId() );
+            build = makeAndStoreBuildResult( context, error );
         }
-        catch ( ContinuumStoreException e )
+        else
         {
-            throw new TaskExecutionException( "Error updating build result", e );
+
+            build.setError( error );
+
+            try
+            {
+                store.updateBuildResult( build );
+
+                build = store.getBuildResult( build.getId() );
+            }
+            catch ( ContinuumStoreException e )
+            {
+                throw new TaskExecutionException( "Error updating build result", e );
+            }
         }
 
         context.getProject().setState( build.getState() );
@@ -292,8 +301,7 @@
 
         actionContext.put( AbstractContinuumAction.KEY_TRIGGER, new Integer( trigger ) );
 
-        actionContext
-            .put( AbstractContinuumAction.KEY_FIRST_RUN, Boolean.valueOf( context.getOldBuildResult()
== null ) );
+        actionContext.put( AbstractContinuumAction.KEY_FIRST_RUN, Boolean.valueOf( context.getOldBuildResult()
== null ) );
 
         return context;
     }
@@ -305,8 +313,8 @@
 
         performAction( "check-working-directory", buildContext );
 
-        boolean workingDirectoryExists = AbstractContinuumAction
-            .getBoolean( actionContext, AbstractContinuumAction.KEY_WORKING_DIRECTORY_EXISTS
);
+        boolean workingDirectoryExists = AbstractContinuumAction.getBoolean( actionContext,
+                                                                             AbstractContinuumAction.KEY_WORKING_DIRECTORY_EXISTS
);
 
         ScmResult scmResult;
 
@@ -320,8 +328,8 @@
         {
             Project project = (Project) actionContext.get( AbstractContinuumAction.KEY_PROJECT
);
 
-            actionContext.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY, workingDirectoryService
-                .getWorkingDirectory( project ).getAbsolutePath() );
+            actionContext.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY,
+                               workingDirectoryService.getWorkingDirectory( project ).getAbsolutePath()
);
 
             performAction( "checkout-project", buildContext );
 
@@ -391,9 +399,9 @@
     private boolean shouldBuild( BuildContext context )
         throws TaskExecutionException
     {
-        //oldBuildResult != null &&
-        //        List changes, Project project, int trigger )
-        //        scmResult.getChanges(), project, trigger ) )
+        // oldBuildResult != null &&
+        // List changes, Project project, int trigger )
+        // scmResult.getChanges(), project, trigger ) )
 
         boolean allChangesUnknown = checkAllChangesUnknown( context.getScmResult().getChanges()
);
 
@@ -506,8 +514,8 @@
     private BuildResult makeAndStoreBuildResult( BuildContext context, String error )
         throws TaskExecutionException
     {
-        //        Project project, ScmResult scmResult, long startTime, int trigger )
-        //        project, scmResult, startTime, trigger );
+        // Project project, ScmResult scmResult, long startTime, int trigger )
+        // project, scmResult, startTime, trigger );
 
         BuildResult build = new BuildResult();
 
@@ -585,7 +593,7 @@
     }
 
     /**
-     *  Merges scm results so we'll have all changes since last execution of current build
definition
+     * Merges scm results so we'll have all changes since last execution of current build
definition
      */
     private void mergeScmResults( BuildContext context )
     {

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
Wed Sep  6 20:04:11 2006
@@ -33,6 +33,8 @@
 
     private int trigger;
 
+    private long maxExecutionTime;
+
     public BuildProjectTask( int projectId, int buildDefinitionId, int trigger )
     {
         this.projectId = projectId;
@@ -62,5 +64,15 @@
     public int getTrigger()
     {
         return trigger;
+    }
+
+    public void setMaxExecutionTime( long maxExecutionTime )
+    {
+        this.maxExecutionTime = maxExecutionTime;
+    }
+
+    public long getMaxExecutionTime()
+    {
+        return maxExecutionTime;
     }
 }

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
Wed Sep  6 20:04:11 2006
@@ -19,10 +19,10 @@
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -45,8 +45,19 @@
     // TaskViabilityEvaluator Implementation
     // ----------------------------------------------------------------------
 
-    public List evaluate( List tasks )
-        throws TaskQueueException
+    /**
+     * Removes duplicate tasks from the list. A duplicate task is one with the same
+     * build definition and that's scheduled within the required build interval.
+     *
+     * <p>
+     * &forall; <sub>t1, t2 &isin; tasks</sub> [ t1 &ne; t2 &and;
t2.buildDefinition = t2.buildDefinition]:
+     *  if ( t2.timestamp - t1.timestamp < requiredBuildInterval ) remove( t2 ).
+     * </p>
+     *
+     * @param tasks A list of queued tasks to evaluate
+     * @return a list of tasks with duplicates removed
+     */
+    public Collection evaluate( Collection tasks )
     {
         // ----------------------------------------------------------------------
         // This code makes a Map with Lists with one list per project. For each

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Wed Sep  6 20:04:11 2006
@@ -27,6 +27,7 @@
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
@@ -190,7 +191,7 @@
 
             getLogger().info( "Exit code: " + result.getExitCode() );
 
-            return new ContinuumBuildExecutionResult( "", result.getExitCode() );
+            return new ContinuumBuildExecutionResult( FileUtils.fileRead( output ), result.getExitCode()
);
         }
         catch ( Exception e )
         {

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
Wed Sep  6 20:04:11 2006
@@ -47,4 +47,9 @@
     {
         return workingDirectory;
     }
+
+    public long getMaxExecutionTime()
+    {
+        return 0;
+    }
 }

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Wed Sep  6 20:04:11 2006
@@ -233,6 +233,56 @@
 
     }
 
+    public void testCreateProjectWithoutModules()
+        throws Exception
+    {
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID
);
+
+        URL url = getClass().getClassLoader().getResource( "projects/continuum/continuum-core/pom.xml"
);
+
+        // Eat System.out
+        PrintStream ps = System.out;
+
+        ContinuumProjectBuildingResult result;
+
+        try
+        {
+            System.setOut( new PrintStream( new ByteArrayOutputStream() ) );
+
+            result = projectBuilder.buildProjectsFromMetadata( url, null, null );
+        }
+        finally
+        {
+            System.setOut( ps );
+        }
+
+        assertNotNull( result );
+
+        assertNotNull( result.getErrors() );
+
+        assertEquals( 0, result.getErrors().size() );
+
+        assertNotNull( result.getProjectGroups() );
+
+        assertEquals( 1, result.getProjectGroups().size() );
+
+        ProjectGroup projectGroup = (ProjectGroup) result.getProjectGroups().get( 0 );
+
+        assertEquals( "projectGroup.groupId", "org.apache.maven.continuum", projectGroup.getGroupId()
);
+
+        assertEquals( "projectGroup.name", "Continuum Core", projectGroup.getName() );
+
+        assertNotNull( result.getProjects() );
+
+        assertEquals( 1, result.getProjects().size() );
+
+        assertNotNull( projectGroup.getProjects() );
+
+        assertEquals( 0, projectGroup.getProjects().size() );
+    }
+
+
     private void assertDependency( String dep, String proj, Map projects )
     {
         Project p = (Project) projects.get( proj );
@@ -272,7 +322,7 @@
 
         assertEquals( name, project.getName() );
 
-        String scmUrl = "scm:svn:http://svn.apache.org/repos/asf/maven/continuum/tags";
+        String scmUrl = "scm:svn:http://svn.apache.org/repos/asf/maven/continuum/";
 
         assertTrue( project.getScmUrl().startsWith( scmUrl ) );
     }

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
Wed Sep  6 20:04:11 2006
@@ -3,7 +3,7 @@
   <parent>
     <artifactId>continuum-parent</artifactId>
     <groupId>org.apache.maven.continuum</groupId>
-    <version>1.0.3</version>
+    <version>1.1-SNAPSHOT</version>
   </parent>
   <artifactId>continuum-core</artifactId>
   <name>Continuum Core</name>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/pom.xml?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/pom.xml (original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/pom.xml Wed Sep  6 20:04:11
2006
@@ -150,6 +150,10 @@
       <artifactId>maven-user-webapp</artifactId>
       <type>war</type>
     </dependency>
+    <dependency> <!-- added since depMgt doesn't override imported dependencies
-->
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven.shared.user</groupId>
       <artifactId>maven-user-controller</artifactId>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Wed Sep  6 20:04:11 2006
@@ -38,7 +38,6 @@
 public class BuildDefinitionAction
     extends ContinuumActionSupport
 {
-    public static final String CONFIRM = "confirm";
 
     private int buildDefinitionId;
 
@@ -98,9 +97,8 @@
      * @return action result
      */
     public String input()
+        throws ContinuumException
     {
-        try
-        {
         if ( executor == null )
         {
             if ( projectId != 0 )
@@ -111,39 +109,23 @@
             {
                 Project project = (Project) getContinuum().getProjectGroup( projectGroupId
).getProjects().get( 0 );
                 executor = project.getExecutorId();
-
             }
-
-        }
-        }
-        catch ( ContinuumException e )
-        {
-            addActionError( "error determining executor type" );
-            return ERROR;
         }
 
         if ( buildDefinitionId != 0 )
         {
-            try
-            {
-                BuildDefinition buildDefinition = getContinuum().getBuildDefinition( buildDefinitionId
);
-                goals = buildDefinition.getGoals();
-                arguments = buildDefinition.getArguments();
-                buildFile = buildDefinition.getBuildFile();
-                defaultBuildDefinition = buildDefinition.isDefaultForProject();
-
-            }
-            catch ( ContinuumException ce )
-            {
-                addActionError( "error getting build id" );
-                return ERROR;
-            }
+            BuildDefinition buildDefinition = getContinuum().getBuildDefinition( buildDefinitionId
);
+            goals = buildDefinition.getGoals();
+            arguments = buildDefinition.getArguments();
+            buildFile = buildDefinition.getBuildFile();
+            defaultBuildDefinition = buildDefinition.isDefaultForProject();
         }
 
         return INPUT;
     }
 
     public String saveToProject()
+        throws ContinuumException
     {
 
         try
@@ -162,17 +144,12 @@
             addActionError( cae.getMessage() );
             return INPUT;
         }
-        catch ( ContinuumException ce )
-        {
-            getLogger().info("error saving project build definition", ce);
-            addActionError( "error saving project build definition" );
-            return ERROR;
-        }
 
         return SUCCESS;
     }
 
     public String saveToGroup()
+        throws ContinuumException
     {
         try
         {
@@ -190,55 +167,33 @@
             addActionError( cae.getMessage() );
             return INPUT;
         }
-        catch ( ContinuumException ce )
-        {
-            getLogger().info("error saving group build definition", ce);
-            addActionError( "error saving group build definition" );
-            return ERROR;
-        }
 
         return SUCCESS;
     }
 
     public String removeFromProject()
+        throws ContinuumException
     {
         if ( confirmed )
         {
-            try
-            {
-                getContinuum().removeBuildDefinitionFromProject( projectId, buildDefinitionId
);
+            getContinuum().removeBuildDefinitionFromProject( projectId, buildDefinitionId
);
 
-                return SUCCESS;
-            }
-            catch ( ContinuumException ce )
-            {
-                getLogger().info("error removing build definition from project", ce);
-                addActionError( "error removing build definition from project" );
-                return ERROR;
-            }
+            return SUCCESS;
         }
         else
-        {
+        {            
             return CONFIRM;
         }
     }
 
     public String removeFromProjectGroup()
+        throws ContinuumException
     {
         if ( confirmed )
         {
-            try
-            {
-                getContinuum().removeBuildDefinitionFromProject( projectGroupId, buildDefinitionId
);
+            getContinuum().removeBuildDefinitionFromProject( projectGroupId, buildDefinitionId
);
 
-                return SUCCESS;
-            }
-            catch ( ContinuumException ce )
-            {
-                getLogger().info("error removing build definition from project group", ce);
-                addActionError( "error removing build definition from project group" );
-                return ERROR;
-            }
+            return SUCCESS;
         }
         else
         {

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
Wed Sep  6 20:04:11 2006
@@ -19,6 +19,7 @@
 
 import com.opensymphony.xwork.Preparable;
 import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 /**
@@ -32,6 +33,8 @@
     implements Preparable
 {
 
+    public static final String CONFIRM = "confirm";
+
     /**
      * @plexus.requirement role-hint="acegi"
      */
@@ -40,7 +43,13 @@
     public void prepare()
         throws Exception
     {
-        // do nothing
+        getLogger().info("checking the continuum configuration");
+
+        if ( !continuum.getConfiguration().isInitialized() )
+        {
+            throw new ContinuumInitializationException( "continuum not initialized" );
+        }
+
     }
 
     public Continuum getContinuum()

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Wed Sep  6 20:04:11 2006
@@ -39,63 +39,51 @@
     private boolean confirmed;
 
     public String summary()
+        throws ContinuumException
     {
-        try
-        {
-            projectGroup = getContinuum().getProjectGroup( projectGroupId );
-        }
-        catch ( ContinuumException e)
-        {
-            addActionError( "unable to retrieve project group" );
-            return ERROR;
-        }
+        projectGroup = getContinuum().getProjectGroup( projectGroupId );
 
         return SUCCESS;
     }
 
     public String members()
+        throws ContinuumException
     {
         return summary();
     }
 
     public String buildDefinitions()
+        throws ContinuumException
     {
         return summary();
     }
 
     public String notifiers()
+        throws ContinuumException
     {
         return summary();
     }
 
     public String remove()
+        throws ContinuumException
     {
         //todo add confirm page like removing build definition
-        try
+        if ( confirmed )
         {
             getContinuum().removeProjectGroup( projectGroupId );
         }
-        catch ( ContinuumException e )
+        else
         {
-            addActionError( "unable to remove project group" );
-            return ERROR;
+            return CONFIRM;
         }
 
         return SUCCESS;
     }
 
     public String build()
+        throws ContinuumException
     {
-        try
-        {
-            getContinuum().buildProjectGroup( projectGroupId );
-        }
-        catch ( ContinuumException e )
-        {
-            addActionError( "unable to initiate build of project group" );
-            getLogger().warn( "unable to initiate build of project group " + projectGroupId
);
-            return ERROR;
-        }
+        getContinuum().buildProjectGroup( projectGroupId );
 
         return SUCCESS;
     }

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Wed Sep  6 20:04:11 2006
@@ -45,6 +45,8 @@
 
     private Schedule schedule;
 
+    private boolean confirmed;
+
     public String summary()
         throws ContinuumException
     {
@@ -123,12 +125,28 @@
         }
     }
 
+    public String confirm()
+        throws ContinuumException
+    {
+        schedule = getContinuum().getSchedule( id );
+
+        return SUCCESS;
+    }
+
     public String remove()
         throws ContinuumException
     {
-       getContinuum().removeSchedule( id );
+        if ( confirmed )
+        {
+            getContinuum().removeSchedule( id );
+        }
+        else
+        {
+            schedule = getContinuum().getSchedule( id );
+            return CONFIRM;
+        }
 
-       return SUCCESS; 
+        return SUCCESS;
     }
 
     public Collection getSchedules()
@@ -204,5 +222,15 @@
     public void setSchedule( Schedule schedule )
     {
         this.schedule = schedule;
+    }
+
+    public boolean isConfirmed()
+    {
+        return confirmed;
+    }
+
+    public void setConfirmed( boolean confirmed )
+    {
+        this.confirmed = confirmed;
     }
 }

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml
Wed Sep  6 20:04:11 2006
@@ -120,8 +120,8 @@
     </action>
 
     <action name="removeGroupBuildDefinition" class="buildDefinition" method="removeFromGroup">
-      <result name="confirm">deleteBuildDefinition.jsp</result>
-      <result name="success" type="chain">projectGroupView</result>
+      <result name="confirm">confirmBuildDefinitionRemoval.jsp</result>
+      <result name="success" type="chain">projectGroupBuildDefinition</result>
     </action>
 
 
@@ -149,6 +149,7 @@
     </action>
 
     <action name="removeProjectGroup" class="projectGroup" method="remove">
+      <result name="confirm">confirmGroupRemoval.jsp</result>
       <result name="success" type="chain">groupSummary</result>
     </action>
 
@@ -239,6 +240,7 @@
       <result name="success" type="chain">schedules</result>
     </action>
     <action name="removeSchedule" class="schedule" method="remove">
+      <result name="confirm">confirmScheduleRemoval.jsp</result>
       <result name="success" type="chain">schedules</result>
     </action>
 

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResults.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResults.jsp?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResults.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/buildResults.jsp
Wed Sep  6 20:04:11 2006
@@ -12,7 +12,11 @@
           <p style="border-top: 1px solid transparent; border-bottom: 1px solid #DFDEDE;">
             <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;
text-decoration: none;" href="<ww:url value="/projectView.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>"><ww:text
name="info"/></a>
             <b style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;"><ww:text
name="builds"/></b>
-            <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;
text-decoration: none;" href="<ww:url value="/workingCopy.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>"><ww:text
name="workingCopy"/></a>
+            <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;
text-decoration: none;"
+              href='<ww:url action="workingCopy"><ww:param name="projectId" value="projectId"/></ww:url>'
+            >
+              <ww:text name="workingCopy"/>
+            </a>
           </p>
         </div>
 

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/groupSummary.jsp
Wed Sep  6 20:04:11 2006
@@ -1,6 +1,7 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
+<%@ taglib uri="continuum" prefix="c1" %>
 <html>
 <ww:i18n name="localization.Continuum">
   <head>
@@ -25,7 +26,8 @@
         <ww:param name="projectGroupId" value="%{'${group.id}'}"/>
       </ww:url>
 
-      <table border="2" cellspacing="2" cellpadding="3" width="100%">
+      <div class="body">
+      <table border="2" cellspacing="2" cellpadding="3" width="100%">        
         <tr>
           <td>Name:</td>
           <td><ww:a href="%{projectGroupSummaryUrl}">${group.name}</ww:a></td>
@@ -75,6 +77,7 @@
       </table>
       <hr/>
       <p/>
+        </div>
     </c:forEach>
   </div>
   </body>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupSummary.jsp?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
Wed Sep  6 20:04:11 2006
@@ -22,7 +22,7 @@
             <ww:param name="projectGroupId" value="projectGroupId"/>
           </ww:url>
           <ww:url id="removeProjectGroupUrl" action="removeProjectGroup">
-            <ww:param name="projectGroupId" value="projectGroupId"/>
+            <ww:param name="projectGroupId" value="projectGroupId"/>           
             <ww:param name="confirmed" value="false"/>
           </ww:url>
           <ww:a href="%{buildProjectGroupUrl}">Build</ww:a>&nbsp;<ww:a
href="%{removeProjectGroupUrl}">Remove</ww:a>

Modified: maven/continuum/branches/continuum-acegi/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/pom.xml?view=diff&rev=440957&r1=440956&r2=440957
==============================================================================
--- maven/continuum/branches/continuum-acegi/pom.xml (original)
+++ maven/continuum/branches/continuum-acegi/pom.xml Wed Sep  6 20:04:11 2006
@@ -333,7 +333,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>1.2</version>
+        <version>1.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>



Mime
View raw message