continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r468331 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Date Fri, 27 Oct 2006 09:42:03 GMT
Author: evenisse
Date: Fri Oct 27 02:42:02 2006
New Revision: 468331

URL: http://svn.apache.org/viewvc?view=rev&rev=468331
Log:
Create Default Project Group so Ant/shell projects can be added

Modified:
    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/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=468331&r1=468330&r2=468331
==============================================================================
--- 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
Fri Oct 27 02:42:02 2006
@@ -111,6 +111,8 @@
             createGroups();
 
             createGuestUser();
+
+            createDefaultProjectGroup();
         }
         catch ( ContinuumStoreException e )
         {
@@ -244,6 +246,28 @@
             guest.setGuest( true );
 
             store.addUser( guest );
+        }
+    }
+
+    private void createDefaultProjectGroup()
+        throws ContinuumStoreException
+    {
+        ProjectGroup group;
+        try
+        {
+            group = store.getProjectGroupByGroupId( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID
);
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            group = new ProjectGroup();
+
+            group.setName( "Default Project Group" );
+
+            group.setGroupId( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID );
+
+            group.setDescription( "Contains all projects that do not have a group of their
own" );
+
+            group = store.addProjectGroup( group );
         }
     }
 }



Mime
View raw message