continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r475453 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum: ./ build/settings/ core/action/ initialization/
Date Wed, 15 Nov 2006 22:02:49 GMT
Author: jmcconnell
Date: Wed Nov 15 14:02:48 2006
New Revision: 475453

URL: http://svn.apache.org/viewvc?view=rev&rev=475453
Log:
resolved some issues with component linkage from the switch I made yesterday to using the
plexus-maven-plugin.  turns out a couple of the components really needed to have their role-hint='default'
removed.  Also uncovered an action that I missed somehow, and it is setup right now.  removed
some private methods from the initializer as well that aren't used anymore while I was sorting
through what was not working right.

Modified:
    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/build/settings/DefaultSchedulesActivator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=475453&r1=475452&r2=475453
==============================================================================
--- 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
Wed Nov 15 14:02:48 2006
@@ -91,7 +91,6 @@
  *
  * @plexus.component
  *   role="org.apache.maven.continuum.Continuum"
- *   role-hint="default"
  */
 public class DefaultContinuum
     extends AbstractLogEnabled

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?view=diff&rev=475453&r1=475452&r2=475453
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
Wed Nov 15 14:02:48 2006
@@ -42,7 +42,6 @@
  *
  * @plexus.component
  *   role="org.apache.maven.continuum.build.settings.SchedulesActivator"
- *   role-hint="default"
  */
 public class DefaultSchedulesActivator
     extends AbstractLogEnabled
@@ -172,7 +171,7 @@
         {
             scheduler.scheduleJob( jobDetail, trigger );
 
-            getLogger().info( trigger.getNextFireTime() + "" );
+            getLogger().info( trigger.getName() + ": next fire time ->" + trigger.getNextFireTime()
);
         }
         catch ( SchedulerException e )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?view=diff&rev=475453&r1=475452&r2=475453
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
Wed Nov 15 14:02:48 2006
@@ -28,14 +28,28 @@
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
+ *
+ * @plexus.component
+ *  role="org.codehaus.plexus.action.Action"
+ *  role-hint="update-working-directory-from-scm"
+
  */
 public class UpdateWorkingDirectoryFromScmContinuumAction
     extends AbstractContinuumAction
 {
+    /**
+     * @plexus.requirement
+     */
     private ContinuumNotificationDispatcher notifier;
 
+    /**
+     * @plexus.requirement
+     */
     private ContinuumScm scm;
 
+    /**
+     * @plexus.requirement
+     */
     private ContinuumStore store;
 
     public void execute( Map context )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?view=diff&rev=475453&r1=475452&r2=475453
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Wed Nov 15 14:02:48 2006
@@ -19,20 +19,13 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.system.ContinuumUser;
-import org.apache.maven.continuum.model.system.Permission;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
-import org.apache.maven.continuum.model.system.UserGroup;
-import org.apache.maven.continuum.security.ContinuumSecurity;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.jpox.SchemaTool;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
@@ -109,13 +102,6 @@
                 store.addSchedule( defaultSchedule );
             }
 
-            // Permission
-            createPermissions();
-
-            createGroups();
-
-            createGuestUser();
-
             createDefaultProjectGroup();
         }
         catch ( ContinuumStoreException e )
@@ -143,115 +129,6 @@
         return schedule;
     }
 
-    private void createPermissions()
-        throws ContinuumStoreException
-    {
-        createPermission( "addProject", "Add Projects" );
-
-        createPermission( "editProject", "Edit Projects" );
-
-        createPermission( "deleteProject", "Delete Projects" );
-
-        createPermission( "buildProject", "Build Projects" );
-
-        createPermission( "showProject", "Show Projects" );
-
-        createPermission( "addBuildDefinitionToProject", "Add Build Definitions" );
-
-        createPermission( "editBuildDefinition", "Edit Build Definitions" );
-
-        createPermission( "deleteBuildDefinition", "Delete Build Definitions" );
-
-        createPermission( "addNotifier", "Add Notifiers" );
-
-        createPermission( "editNotifier", "Edit Notifiers" );
-
-        createPermission( "deleteNotifier", "Delete Notifiers" );
-
-        createPermission( "manageConfiguration", "Manage Continuum Configuration" );
-
-        createPermission( "manageSchedule", "Manage Schedules" );
-
-        createPermission( "manageUsers", "Manage Users/Groups" );
-    }
-
-    private Permission createPermission( String name, String description )
-        throws ContinuumStoreException
-    {
-        Permission perm = store.getPermission( name );
-
-        if ( perm == null )
-        {
-            perm = new Permission();
-
-            perm.setName( name );
-
-            perm.setDescription( description );
-
-            perm = store.addPermission( perm );
-        }
-
-        return perm;
-    }
-
-    private void createGroups()
-        throws ContinuumStoreException
-    {
-        // Continuum Administrator
-        if ( store.getUserGroup( ContinuumSecurity.ADMIN_GROUP_NAME ) == null )
-        {
-            List adminPermissions = store.getPermissions();
-
-            UserGroup adminGroup = new UserGroup();
-
-            adminGroup.setName( ContinuumSecurity.ADMIN_GROUP_NAME );
-
-            adminGroup.setDescription( "Continuum Admin Group" );
-
-            adminGroup.setPermissions( adminPermissions );
-
-            store.addUserGroup( adminGroup );
-        }
-
-        // Continuum Guest
-        if ( store.getUserGroup( ContinuumSecurity.GUEST_GROUP_NAME ) == null )
-        {
-            UserGroup guestGroup = new UserGroup();
-
-            guestGroup.setName( ContinuumSecurity.GUEST_GROUP_NAME );
-
-            guestGroup.setDescription( "Continuum Guest Group" );
-
-            List guestPermissions = new ArrayList();
-
-            guestPermissions.add( store.getPermission( "buildProject" ) );
-
-            guestPermissions.add( store.getPermission( "showProject" ) );
-
-            guestGroup.setPermissions( guestPermissions );
-
-            store.addUserGroup( guestGroup );
-        }
-    }
-
-    private void createGuestUser()
-        throws ContinuumStoreException
-    {
-        if ( store.getGuestUser() == null )
-        {
-            ContinuumUser guest = new ContinuumUser();
-
-            guest.setUsername( "guest" );
-
-            guest.setFullName( "Anonymous User" );
-
-            guest.setGroup( store.getUserGroup( ContinuumSecurity.GUEST_GROUP_NAME ) );
-
-            guest.setGuest( true );
-
-            store.addUser( guest );
-        }
-    }
 
     private void createDefaultProjectGroup()
         throws ContinuumStoreException



Mime
View raw message