continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r681492 [2/2] - in /continuum/trunk: ./ continuum-api/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/purge/controller/ continuum-api/src/main/java/org/apache/continuum/purge/executo...
Date Thu, 31 Jul 2008 21:02:51 GMT
Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java (original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java Thu Jul 31 14:02:48 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
@@ -65,6 +66,8 @@
     private ProfileManager profileManager;
 
     private PlexusContainer container;
+    
+    private LocalRepository repository;
 
     public void execute( ReleaseProjectTask task )
         throws TaskExecutionException
@@ -77,7 +80,9 @@
         descriptor.setUseReleaseProfile( performTask.isUseReleaseProfile() );
         descriptor.setPerformGoals( performTask.getGoals() );
         descriptor.setCheckoutDirectory( performTask.getBuildDirectory().getAbsolutePath() );
-
+        
+        repository = performTask.getLocalRepository();
+        
         List reactorProjects = getReactorProjects( performTask );
 
         ReleaseResult result = releaseManager.performWithResult( descriptor, settings, reactorProjects, listener );
@@ -206,8 +211,16 @@
 
     private ArtifactRepository getLocalRepository()
     {
-        return new DefaultArtifactRepository( "local-repository", "file://" + settings.getLocalRepository(),
-                                              new DefaultRepositoryLayout() );
+        if ( repository == null )
+        {
+            return new DefaultArtifactRepository( "local-repository", "file://" + settings.getLocalRepository(),
+                                                  new DefaultRepositoryLayout() );
+        }
+        else
+        {
+            return new DefaultArtifactRepository( repository.getName(), "file://" + repository.getLocation(),
+                                                  new DefaultRepositoryLayout() );
+        }
     }
 
     private ProfileManager getProfileManager( Settings settings )

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/PerformReleaseProjectTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/PerformReleaseProjectTask.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/PerformReleaseProjectTask.java (original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/tasks/PerformReleaseProjectTask.java Thu Jul 31 14:02:48 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.shared.release.ReleaseManagerListener;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
 
@@ -35,16 +36,25 @@
     private String goals;
 
     private boolean useReleaseProfile = true;
+    
+    private LocalRepository localRepository;
 
     public PerformReleaseProjectTask( String releaseId, ReleaseDescriptor descriptor, File buildDirectory, String goals,
                                       boolean useReleaseProfile, ReleaseManagerListener listener )
     {
+        this( releaseId, descriptor, buildDirectory, goals, useReleaseProfile, listener, null );
+    }
+
+    public PerformReleaseProjectTask( String releaseId, ReleaseDescriptor descriptor, File buildDirectory, String goals,
+                                      boolean useReleaseProfile, ReleaseManagerListener listener, LocalRepository repository )
+    {
         super( releaseId, descriptor, listener );
         setBuildDirectory( buildDirectory );
         setGoals( goals );
         setUseReleaseProfile( useReleaseProfile );
+        setLocalRepository( repository );
     }
-
+    
     public String getGoals()
     {
         return goals;
@@ -74,4 +84,14 @@
     {
         this.buildDirectory = buildDirectory;
     }
+    
+    public LocalRepository getLocalRepository()
+    {
+        return localRepository;
+    }
+    
+    public void setLocalRepository( LocalRepository localRepository )
+    {
+        this.localRepository = localRepository;
+    }
 }

Modified: continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java (original)
+++ continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java Thu Jul 31 14:02:48 2008
@@ -117,4 +117,8 @@
     public static final String CONTINUUM_MANAGE_QUEUES = "continuum-manage-queues";
     
     public static final String CONTINUUM_VIEW_QUEUES = "continuum-view-queues";
+    
+    public static final String CONTINUUM_MANAGE_REPOSITORIES = "continuum-manage-repositories";
+    
+    public static final String CONTINUUM_MANAGE_PURGING = "continuum-manage-purging";
 }

Modified: continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml (original)
+++ continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml Thu Jul 31 14:02:48 2008
@@ -155,6 +155,16 @@
   		      <name>continuum-manage-profiles</name>
   		      <description>Continuum Manage Installations</description>
   		    </operation>        
+  		    <operation>
+  		      <id>continuum-manage-repositories</id>
+  		      <name>continuum-manage-repositories</name>
+  		      <description>Continuum Manage Repositories</description>
+  		    </operation>
+  		    <operation>
+  		      <id>continuum-manage-purging</id>
+  		      <name>continuum-manage-purging</name>
+  		      <description>Continuum Manage Purging</description>
+  		    </operation>
   		  </operations>
   		  <roles>
   		    <role>
@@ -181,6 +191,8 @@
   		        <childRole>continuum-manage-schedules</childRole>
   		        <childRole>continuum-manage-build-templates</childRole>
   		        <childRole>continuum-manage-queues</childRole>
+  		        <childRole>continuum-manage-repositories</childRole>
+  		        <childRole>continuum-manage-purging</childRole>
   		      </childRoles>
   		    </role>
   		    <role>
@@ -341,6 +353,36 @@
 		        </permission>
   		      </permissions>
   		    </role>   
+  		    <role>
+  		      <id>continuum-manage-repositories</id>
+  		      <name>continuum-manage-repositories</name>
+  		      <assignable>true</assignable>
+  		      <permanent>true</permanent>
+  		      <permissions>
+  		        <permission>
+  		          <id>continuum-manage-repositories</id>
+  		          <name>Manage Continuum Local Repositories</name>
+  		          <permanent>true</permanent>
+  		          <operation>continuum-manage-repositories</operation>
+  		          <resource>global</resource>
+  		        </permission>
+  		      </permissions>
+  		    </role>
+  		    <role>
+  		      <id>continuum-manage-purging</id>
+  		      <name>continuum-manage-purging</name>
+  		      <assignable>true</assignable>
+  		      <permanent>true</permanent>
+  		      <permissions>
+  		        <permission>
+  		          <id>continuum-manage-purging</id>
+  		          <name>Manage Continuum Purging</name>
+  		          <permanent>true</permanent>
+  		          <operation>continuum-manage-purging</operation>
+  		          <resource>global</resource>
+  		        </permission>
+  		      </permissions>
+  		    </role>
   		  </roles>
   		  <templates>
   		  	<template>
@@ -366,6 +408,18 @@
   		          <operation>user-management-role-grant</operation>
   		          <resource>${resource}</resource>
   		        </permission>
+  		        <permission>
+  		          <id>continuum-manage-repositories</id>
+  		          <name>Manage Continuum Local Repositories</name>
+  		          <operation>continuum-manage-repositories</operation>
+  		          <resource>global</resource>
+  		        </permission>
+  		        <permission>
+  		          <id>continuum-manage-purging</id>
+  		          <name>Manage Continuum Purging</name>
+  		          <operation>continuum-manage-purging</operation>
+  		          <resource>global</resource>
+  		        </permission>
   		  	  </permissions>
   		  	  <childTemplates>
   		  	  	<childTemplate>project-developer</childTemplate>

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java (original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java Thu Jul 31 14:02:48 2008
@@ -37,6 +37,10 @@
 import javax.jdo.Query;
 import javax.jdo.Transaction;
 
+import org.apache.continuum.model.repository.AbstractPurgeConfiguration;
+import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
@@ -102,6 +106,8 @@
 
     private static final String BUILD_TEMPLATE_BUILD_DEFINITIONS = "build-template-build-definitions";
 
+    private static final String LOCALREPOSITORY_PURGE_CONFIGS = "localrepository-purge-configs";
+    
     // ----------------------------------------------------------------------
     // ContinuumStore Implementation
     // ----------------------------------------------------------------------
@@ -2002,7 +2008,424 @@
             return (SystemConfiguration) systemConfs.get( 0 );
         }
     }
+    
+    public LocalRepository addLocalRepository( LocalRepository repository )
+        throws ContinuumStoreException
+    {
+        return ( LocalRepository ) addObject( repository );
+    }
+    
+    public void updateLocalRepository( LocalRepository repository )
+        throws ContinuumStoreException
+    {
+        updateObject( repository );
+    }
+    
+    public void removeLocalRepository( LocalRepository repository )
+        throws ContinuumStoreException
+    {
+        removeObject( repository );
+    }
+    
+    public List<LocalRepository> getAllLocalRepositories()
+    {
+        return getAllObjectsDetached( LocalRepository.class );
+    }
+    
+    public List<LocalRepository> getLocalRepositoriesByLayout( String layout )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( LocalRepository.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareImports( "import java.lang.String" );
+            
+            query.declareParameters( "String layout" );
+    
+            query.setFilter( "this.layout == layout" );
+    
+            List result = (List) query.execute( layout );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public LocalRepository getLocalRepository( int repositoryId )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException
+    {
+        return (LocalRepository) getObjectById( LocalRepository.class, repositoryId );
+    }
+    
+    public LocalRepository getLocalRepositoryByName( String name )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException
+    {
+        PersistenceManager pm = getPersistenceManager();
+    
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( LocalRepository.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareImports( "import java.lang.String" );
+    
+            query.declareParameters( "String name" );
+    
+            query.setFilter( "this.name == name" );
+    
+            Collection result = (Collection) query.execute( name );
+    
+            if ( result.size() == 0 )
+            {
+                tx.commit();
+    
+                return null;
+            }
+    
+            Object object = pm.detachCopy( result.iterator().next() );
+    
+            tx.commit();
+    
+            return (LocalRepository) object;
+        }
+        finally
+        {
+            rollback( tx );
+        }
+    }
+    
+    public LocalRepository getLocalRepositoryByLocation( String location )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException
+    {
+        PersistenceManager pm = getPersistenceManager();
+    
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( LocalRepository.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareImports( "import java.lang.String" );
+    
+            query.declareParameters( "String location" );
+    
+            query.setFilter( "this.location == location" );
+    
+            Collection result = (Collection) query.execute( location );
+    
+            if ( result.size() == 0 )
+            {
+                tx.commit();
+    
+                return null;
+            }
+    
+            Object object = pm.detachCopy( result.iterator().next() );
+    
+            tx.commit();
+    
+            return (LocalRepository) object;
+        }
+        finally
+        {
+            rollback( tx );
+        }
+    }
+    
+    public List<RepositoryPurgeConfiguration> getAllRepositoryPurgeConfigurations()
+    {
+        return getAllObjectsDetached( RepositoryPurgeConfiguration.class );
+    }
+    
+    public List<RepositoryPurgeConfiguration> getRepositoryPurgeConfigurationsBySchedule( int scheduleId )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( RepositoryPurgeConfiguration.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareParameters( "int scheduleId" );
+    
+            query.setFilter( "this.schedule.id == scheduleId" );
+    
+            List result = (List) query.execute( new Integer( scheduleId ) );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public List<RepositoryPurgeConfiguration> getRepositoryPurgeConfigurationsByLocalRepository( int repositoryId )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( RepositoryPurgeConfiguration.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareParameters( "int repositoryId" );
+    
+            query.setFilter( "this.repository.id == repositoryId" );
+    
+            List result = (List) query.execute( new Integer( repositoryId ) );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public RepositoryPurgeConfiguration getRepositoryPurgeConfiguration( int configurationId )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException
+    {
+        return (RepositoryPurgeConfiguration) getObjectById( RepositoryPurgeConfiguration.class, configurationId );
+    }
+    
+    public RepositoryPurgeConfiguration addRepositoryPurgeConfiguration( RepositoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        return (RepositoryPurgeConfiguration) addObject( purgeConfiguration );
+    }
+    
+    public void updateRepositoryPurgeConfiguration( RepositoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        updateObject( purgeConfiguration );
+    }
+    
+    public void removeRepositoryPurgeConfiguration( RepositoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        removeObject( purgeConfiguration );
+    }
+    
+    public List<DirectoryPurgeConfiguration> getAllDirectoryPurgeConfigurations()
+    {
+        return getAllObjectsDetached( DirectoryPurgeConfiguration.class );
+    }
+    
+    public List<DirectoryPurgeConfiguration> getDirectoryPurgeConfigurationsBySchedule( int scheduleId )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( DirectoryPurgeConfiguration.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareParameters( "int scheduleId" );
+    
+            query.setFilter( "this.schedule.id == scheduleId" );
+    
+            List result = (List) query.execute( new Integer( scheduleId ) );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public List<DirectoryPurgeConfiguration> getDirectoryPurgeConfigurationsByLocation( String location )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( DirectoryPurgeConfiguration.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareImports( "import java.lang.String" );
+            
+            query.declareParameters( "String location" );
+    
+            query.setFilter( "this.location == location" );
+    
+            List result = (List) query.execute( location );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public List<DirectoryPurgeConfiguration> getDirectoryPurgeConfigurationsByType( String type )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( DirectoryPurgeConfiguration.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareImports( "import java.lang.String" );
+            
+            query.declareParameters( "String type" );
+    
+            query.setFilter( "this.directoryType == type" );
+    
+            List result = (List) query.execute( type );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public DirectoryPurgeConfiguration getDirectoryPurgeConfiguration( int configurationId )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException
+    {
+        return (DirectoryPurgeConfiguration) getObjectById( DirectoryPurgeConfiguration.class, configurationId );
+    }
+    
+    public DirectoryPurgeConfiguration addDirectoryPurgeConfiguration( DirectoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        return (DirectoryPurgeConfiguration) addObject( purgeConfiguration );
+    }
+    
+    public void updateDirectoryPurgeConfiguration( DirectoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        updateObject( purgeConfiguration );
+    }
+    
+    public void removeDirectoryPurgeConfiguration( DirectoryPurgeConfiguration purgeConfiguration )
+        throws ContinuumStoreException
+    {
+        removeObject( purgeConfiguration );
+    }
+    
+    public List<BuildDefinition> getBuildDefinitionsBySchedule( int scheduleId )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( BuildDefinition.class, true );
+    
+            Query query = pm.newQuery( extent );
+    
+            query.declareParameters( "int scheduleId" );
+    
+            query.setFilter( "this.schedule.id == scheduleId" );
+    
+            List result = (List) query.execute( new Integer( scheduleId ) );
+    
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+    
+            rollback( tx );
+        }
+    }
+    
+    public List<ProjectGroup> getProjectGroupByRepository( int repositoryId )
+    {
+        PersistenceManager pm = getPersistenceManager();
+        
+        Transaction tx = pm.currentTransaction();
+    
+        try
+        {
+            tx.begin();
+    
+            Extent extent = pm.getExtent( ProjectGroup.class, true );
+    
+            Query query = pm.newQuery( extent );
 
+            query.declareParameters( "int repositoryId" );
+    
+            query.setFilter( "this.localRepository.id == repositoryId" );
+    
+            List result = (List) query.execute( new Integer( repositoryId ) );
+            
+            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
+        }
+        finally
+        {
+            tx.commit();
+            
+            rollback( tx );
+        }
+    }
+    
     private PersistenceManager getPersistenceManager()
     {
         return getPersistenceManager( getContinuumPersistenceManagerFactory() );
@@ -2040,6 +2463,9 @@
         PlexusJdoUtils.removeAll( getPersistenceManager(), ProjectGroup.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), Project.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), BuildDefinition.class );
+        PlexusJdoUtils.removeAll( getPersistenceManager(), RepositoryPurgeConfiguration.class );
+        PlexusJdoUtils.removeAll( getPersistenceManager(), LocalRepository.class );
+        PlexusJdoUtils.removeAll( getPersistenceManager(), DirectoryPurgeConfiguration.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), Schedule.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), Profile.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), Installation.class );

Modified: continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java (original)
+++ continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java Thu Jul 31 14:02:48 2008
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -85,6 +88,20 @@
     protected BuildResult testBuildResult3;
 
     protected ScmResult testCheckoutResult1;
+    
+    protected LocalRepository testLocalRepository1;
+    
+    protected LocalRepository testLocalRepository2;
+    
+    protected LocalRepository testLocalRepository3;
+    
+    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration1;
+    
+    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration2;
+    
+    protected RepositoryPurgeConfiguration testRepoPurgeConfiguration3;
+    
+    protected DirectoryPurgeConfiguration testDirectoryPurgeConfig;
 
     private ProjectNotifier testGroupNotifier1;
 
@@ -130,10 +147,54 @@
         throws Exception
     {
         // Setting up test data
+        testLocalRepository1 = createTestLocalRepository( "name1", "location1", "layout1" );
+        
+        LocalRepository localRepository1 = createTestLocalRepository( testLocalRepository1 );
+        if ( addToStore )
+        {
+            localRepository1 = store.addLocalRepository( localRepository1 );
+            testLocalRepository1.setId( localRepository1.getId() );
+        }
+        else
+        {
+            localRepository1.setId( 1 );
+            testLocalRepository1.setId( 1 );
+        }
+        
+        testLocalRepository2 = createTestLocalRepository( "name2", "location2", "layout2" );
+        
+        LocalRepository localRepository2 = createTestLocalRepository( testLocalRepository2 );
+        if ( addToStore )
+        {
+            localRepository2 = store.addLocalRepository( localRepository2 );
+            testLocalRepository2.setId( localRepository2.getId() );
+        }
+        else
+        {
+            localRepository2.setId( 2 );
+            testLocalRepository2.setId( 2 );
+        }
+        
+        testLocalRepository3 = createTestLocalRepository( "name3", "location3", "layout3" );
+        
+        LocalRepository localRepository3 = createTestLocalRepository( testLocalRepository3 );
+        if ( addToStore )
+        {
+            localRepository3 = store.addLocalRepository( localRepository3 );
+            testLocalRepository3.setId( localRepository3.getId() );
+        }
+        else
+        {
+            localRepository3.setId( 3 );
+            testLocalRepository3.setId( 3 );
+        }
+        
         defaultProjectGroup =
-            createTestProjectGroup( "Default Group", "The Default Group", "org.apache.maven.test.default" );
+            createTestProjectGroup( "Default Group", "The Default Group", "org.apache.maven.test.default",
+                                    localRepository1);
 
-        testProjectGroup2 = createTestProjectGroup( "test group 2", "test group 2 desc", "test group 2 groupId" );
+        testProjectGroup2 = createTestProjectGroup( "test group 2", "test group 2 desc", "test group 2 groupId",
+                                                    localRepository2);
 
         testProject1 = createTestProject( "artifactId1", 1, "description1", defaultProjectGroup.getGroupId(), "name1",
                                           "scmUrl1", 1, "url1", "version1", "workingDirectory1" );
@@ -300,6 +361,46 @@
             profile3.setId( 3 );
         }
 
+        testRepoPurgeConfiguration1 = createTestRepositoryPurgeConfiguration( true, 5, 50, false, schedule2, true, localRepository1 );
+        if ( addToStore )
+        {
+            testRepoPurgeConfiguration1 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration1 );
+        }
+        else
+        {
+            testRepoPurgeConfiguration1.setId( 1 );
+        }
+        
+        testRepoPurgeConfiguration2 = createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule1, true, localRepository2 );
+        if ( addToStore )
+        {
+            testRepoPurgeConfiguration2 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration2 );
+        }
+        else
+        {
+            testRepoPurgeConfiguration2.setId( 2 );
+        }
+        
+        testRepoPurgeConfiguration3 = createTestRepositoryPurgeConfiguration( false, 10, 200, true, schedule2, true, localRepository1 );
+        if ( addToStore )
+        {
+            testRepoPurgeConfiguration3 = store.addRepositoryPurgeConfiguration( testRepoPurgeConfiguration3 );
+        }
+        else
+        {
+            testRepoPurgeConfiguration3.setId( 3 );
+        }
+        
+        testDirectoryPurgeConfig = createTestDirectoryPurgeConfiguration( "location1", "directoryType1", true, 10, 50, schedule2, true );
+        if ( addToStore )
+        {
+            testDirectoryPurgeConfig = store.addDirectoryPurgeConfiguration( testDirectoryPurgeConfig );
+        }
+        else
+        {
+            testDirectoryPurgeConfig.setId( 1 );
+        }
+        
         BuildDefinition testGroupBuildDefinition1 =
             createTestBuildDefinition( "arguments1", "buildFile1", "goals1", profile1, schedule2, false, false );
         BuildDefinition testGroupBuildDefinition2 =
@@ -840,15 +941,18 @@
 
     protected static ProjectGroup createTestProjectGroup( ProjectGroup group )
     {
-        return createTestProjectGroup( group.getName(), group.getDescription(), group.getGroupId() );
+        return createTestProjectGroup( group.getName(), group.getDescription(), group.getGroupId(), 
+                                       group.getLocalRepository() );
     }
 
-    protected static ProjectGroup createTestProjectGroup( String name, String description, String groupId )
+    protected static ProjectGroup createTestProjectGroup( String name, String description, String groupId, 
+                                                          LocalRepository repository )
     {
         ProjectGroup group = new ProjectGroup();
         group.setName( name );
         group.setDescription( description );
         group.setGroupId( groupId );
+        group.setLocalRepository( repository );
         return group;
     }
 
@@ -1105,6 +1209,98 @@
         return developer;
     }
 
+    protected static LocalRepository createTestLocalRepository( LocalRepository repository )
+    {
+        return createTestLocalRepository( repository.getName(), repository.getLocation(), repository.getLayout() );
+    }
+    
+    protected static LocalRepository createTestLocalRepository( String name, String location, String layout )
+    {
+        LocalRepository repository = new LocalRepository();
+        repository.setName( name );
+        repository.setLocation( location );
+        repository.setLayout( layout );
+        return repository;
+    }
+    
+    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration( RepositoryPurgeConfiguration purgeConfig )
+    {
+        return createTestRepositoryPurgeConfiguration( purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(), purgeConfig.getDaysOlder(),
+                                             purgeConfig.isDeleteReleasedSnapshots(), purgeConfig.getSchedule(), purgeConfig.isEnabled(), purgeConfig.getRepository() );
+    }
+    
+    protected static RepositoryPurgeConfiguration createTestRepositoryPurgeConfiguration( boolean deleteAllArtifacts, int retentionCount, int daysOlder, 
+                                                                      boolean deleteReleasedSnapshots, Schedule schedule, boolean enabled, LocalRepository repository )
+    {
+        RepositoryPurgeConfiguration purgeConfig = new RepositoryPurgeConfiguration();
+        purgeConfig.setDeleteAll( deleteAllArtifacts );
+        purgeConfig.setEnabled( enabled );
+        purgeConfig.setRetentionCount( retentionCount );
+        purgeConfig.setDaysOlder( daysOlder );
+        purgeConfig.setDeleteReleasedSnapshots( deleteReleasedSnapshots );
+        purgeConfig.setSchedule( schedule );
+        purgeConfig.setRepository( repository );
+        return purgeConfig;
+    }
+    
+    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration( DirectoryPurgeConfiguration purgeConfig )
+    {
+        return createTestDirectoryPurgeConfiguration( purgeConfig.getLocation(), purgeConfig.getDirectoryType(), purgeConfig.isDeleteAll(), purgeConfig.getRetentionCount(),
+                                                      purgeConfig.getDaysOlder(), purgeConfig.getSchedule(), purgeConfig.isEnabled() );
+    }
+    
+    protected static DirectoryPurgeConfiguration createTestDirectoryPurgeConfiguration( String location, String directoryType, boolean deleteAllDirectories, 
+                                                                                        int retentionCount, int daysOlder, Schedule schedule, boolean enabled )
+    {
+        DirectoryPurgeConfiguration purgeConfig = new DirectoryPurgeConfiguration();
+        purgeConfig.setDaysOlder( daysOlder );
+        purgeConfig.setDeleteAll( deleteAllDirectories );
+        purgeConfig.setDirectoryType( directoryType );
+        purgeConfig.setEnabled( enabled );
+        purgeConfig.setLocation( location );
+        purgeConfig.setRetentionCount( retentionCount );
+        purgeConfig.setSchedule( schedule );
+        return purgeConfig;
+    }
+    
+    protected static void assertLocalRepositoryEquals( LocalRepository expectedRepository, LocalRepository actualRepository )
+    {
+        assertEquals( expectedRepository, actualRepository );
+        if ( expectedRepository != null )
+        {
+            assertNotSame( expectedRepository, actualRepository );
+            assertEquals( "compare local repository - id", expectedRepository.getId(), actualRepository.getId() );
+            assertEquals( "compare local repository - name", expectedRepository.getName(), actualRepository.getName() );
+            assertEquals( "compare local repository - location", expectedRepository.getLocation(), 
+                          actualRepository.getLocation() );
+            assertEquals( "compare local repository - layout", expectedRepository.getLayout(), actualRepository.getLayout() );
+        }
+    }
+    
+    protected static void assertRepositoryPurgeConfigurationEquals( RepositoryPurgeConfiguration expectedConfig, RepositoryPurgeConfiguration actualConfig )
+    {
+        assertEquals( "compare repository purge configuration - id", expectedConfig.getId(), actualConfig.getId() );
+        assertEquals( "compare repository purge configuration - deleteAll", expectedConfig.isDeleteAll(), actualConfig.isDeleteAll() );
+        assertEquals( "compare repository purge configuration - retentionCount", expectedConfig.getRetentionCount(), 
+                      actualConfig.getRetentionCount() );
+        assertEquals( "compare repository purge configuration - daysOlder", expectedConfig.getDaysOlder(), actualConfig.getDaysOlder() );
+        assertEquals( "compare repository purge configuration - deleteReleasedSnapshots", expectedConfig.isDeleteReleasedSnapshots(), 
+                      actualConfig.isDeleteReleasedSnapshots() );
+        assertEquals( "compare repository purge configuration - enabled", expectedConfig.isEnabled(), actualConfig.isEnabled() );
+    }
+    
+    protected static void assertDirectoryPurgeConfigurationEquals( DirectoryPurgeConfiguration expectedConfig, DirectoryPurgeConfiguration actualConfig )
+    {
+        assertEquals( "compare directory purge configuration - id", expectedConfig.getId(), actualConfig.getId() );
+        assertEquals( "compare directory purge configuration - location", expectedConfig.getLocation(), actualConfig.getLocation() );
+        assertEquals( "compare directory purge configuration - directoryType", expectedConfig.getDirectoryType(), actualConfig.getDirectoryType() );
+        assertEquals( "compare directory purge configuration - deleteAll", expectedConfig.isDeleteAll(), actualConfig.isDeleteAll() );
+        assertEquals( "compare directory purge configuration - retentionCount", expectedConfig.getRetentionCount(), 
+                      actualConfig.getRetentionCount() );
+        assertEquals( "compare directory purge configuration - daysOlder", expectedConfig.getDaysOlder(), actualConfig.getDaysOlder() );
+        assertEquals( "compare directory purge configuration - enabled", expectedConfig.isEnabled(), actualConfig.isEnabled() );
+    }
+    
     /**
      * Setup JDO Factory
      *

Modified: continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java (original)
+++ continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java Thu Jul 31 14:02:48 2008
@@ -24,9 +24,13 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.jdo.JDODetachedFieldAccessException;
 
+import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
+import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -69,7 +73,8 @@
         String name = "testAddProjectGroup";
         String description = "testAddProjectGroup description";
         String groupId = "org.apache.maven.continuum.test";
-        ProjectGroup group = createTestProjectGroup( name, description, groupId );
+        LocalRepository repository = store.getLocalRepository( testLocalRepository3.getId() );
+        ProjectGroup group = createTestProjectGroup( name, description, groupId, repository );
 
         ProjectGroup copy = createTestProjectGroup( group );
         store.addProjectGroup( group );
@@ -77,6 +82,7 @@
 
         ProjectGroup retrievedGroup = store.getProjectGroup( group.getId() );
         assertProjectGroupEquals( copy, retrievedGroup );
+        assertLocalRepositoryEquals( testLocalRepository3, retrievedGroup.getLocalRepository() );
     }
 
     public void testGetProjectGroup()
@@ -84,6 +90,7 @@
     {
         ProjectGroup retrievedGroup = store.getProjectGroupWithProjects( defaultProjectGroup.getId() );
         assertProjectGroupEquals( defaultProjectGroup, retrievedGroup );
+        assertLocalRepositoryEquals( testLocalRepository1, retrievedGroup.getLocalRepository() );
 
         List projects = retrievedGroup.getProjects();
         assertEquals( "Check number of projects", 2, projects.size() );
@@ -134,7 +141,7 @@
 
         ProjectGroup retrievedGroup = store.getProjectGroup( testProjectGroup2.getId() );
         assertProjectGroupEquals( copy, retrievedGroup );
-
+        assertLocalRepositoryEquals( testLocalRepository2, retrievedGroup.getLocalRepository() );
     }
 
     public void testUpdateUndetachedGroup()
@@ -172,11 +179,13 @@
             if ( group.getId() == testProjectGroup2.getId() )
             {
                 assertProjectGroupEquals( testProjectGroup2, group );
+                assertLocalRepositoryEquals( testLocalRepository2, group.getLocalRepository() );
                 assertTrue( "check no projects", projects.isEmpty() );
             }
             else if ( group.getId() == defaultProjectGroup.getId() )
             {
                 assertProjectGroupEquals( defaultProjectGroup, group );
+                assertLocalRepositoryEquals( testLocalRepository1, group.getLocalRepository() );
                 assertEquals( "Check number of projects", 2, projects.size() );
                 assertTrue( "Check existence of project 1", projects.contains( testProject1 ) );
                 assertTrue( "Check existence of project 2", projects.contains( testProject2 ) );
@@ -1096,6 +1105,132 @@
         assertEquals( 1, store.getAllBuildDefinitionTemplate().size() );
     }
     
+    public void testAddLocalRepository()
+        throws Exception
+    {
+        String name = "testAddLocalRepository";
+        String directory = "testAddLocalRepositoryDirectory";
+        String layout = "default";
+        
+        LocalRepository repository = createTestLocalRepository( name, directory, layout );
+    
+        LocalRepository copy = createTestLocalRepository( repository );
+        store.addLocalRepository( repository );
+        copy.setId( repository.getId() );
+    
+        LocalRepository retrievedRepository = store.getLocalRepository( repository.getId() );
+        assertLocalRepositoryEquals( copy, retrievedRepository );
+    }
+    
+    public void testRemoveLocalRepository()
+        throws Exception
+    {
+        LocalRepository repository = store.getLocalRepositoryByName( testLocalRepository2.getName() );
+
+        ProjectGroup projectGroup = store.getProjectGroupByGroupId( testProjectGroup2.getGroupId() );
+        assertLocalRepositoryEquals( testLocalRepository2, projectGroup.getLocalRepository() );
+        projectGroup.setLocalRepository( null );
+    
+        ProjectGroup copy = createTestProjectGroup( projectGroup );
+        store.updateProjectGroup( projectGroup );
+    
+        projectGroup = store.getProjectGroup( testProjectGroup2.getId() );
+        assertNull( "check local repository" , projectGroup.getLocalRepository() );
+        
+        List<RepositoryPurgeConfiguration> repoPurgeList = 
+            store.getRepositoryPurgeConfigurationsByLocalRepository( repository.getId() );
+        
+        assertEquals( "check # repo purge config", 1, repoPurgeList.size() );
+        store.removeRepositoryPurgeConfiguration( repoPurgeList.get( 0 ) );
+        store.removeLocalRepository( repository );
+    
+        List<LocalRepository> localRepositories = store.getAllLocalRepositories();
+        assertEquals( "check # local repositories", 2, localRepositories.size() );
+        assertFalse( "check not there", localRepositories.contains( repository ) );
+    }
+    
+    public void testGetAllLocalRepositories()
+        throws Exception
+    {
+        List<LocalRepository> localRepositories = store.getAllLocalRepositories();
+    
+        assertEquals( "check # local repositories", 3, localRepositories.size() );
+        assertLocalRepositoryEquals( testLocalRepository1, localRepositories.get( 0 ) );
+        assertLocalRepositoryEquals( testLocalRepository2, localRepositories.get( 1 ) );
+        assertLocalRepositoryEquals( testLocalRepository3, localRepositories.get( 2 ) );
+    }
+    
+    public void testAddRepositoryPurgeConfiguration()
+        throws Exception
+    {
+        LocalRepository repository = store.getLocalRepository( testLocalRepository3.getId() );
+        Schedule schedule = store.getSchedule( testSchedule1.getId() );
+        
+        RepositoryPurgeConfiguration repoPurge = createTestRepositoryPurgeConfiguration( true, 2, 100, false, schedule, true, repository );
+        
+        RepositoryPurgeConfiguration copy = createTestRepositoryPurgeConfiguration( repoPurge );
+        store.addRepositoryPurgeConfiguration( repoPurge );
+        copy.setId( repoPurge.getId() );
+        
+        RepositoryPurgeConfiguration retrieved = store.getRepositoryPurgeConfiguration( repoPurge.getId() );
+        assertRepositoryPurgeConfigurationEquals( copy, retrieved );
+        assertLocalRepositoryEquals( testLocalRepository3, retrieved.getRepository() );
+        assertScheduleEquals( testSchedule1, retrieved.getSchedule() );
+    }
+    
+    public void testRemoveRepositoryPurgeConfiguration()
+        throws Exception
+    {
+        RepositoryPurgeConfiguration repoPurge = store.getRepositoryPurgeConfiguration( testRepoPurgeConfiguration2.getId() );
+        store.removeRepositoryPurgeConfiguration( repoPurge );
+        
+        List<RepositoryPurgeConfiguration> repoPurgeList = store.getAllRepositoryPurgeConfigurations();
+        assertEquals( "check # repo purge configurations", 2, repoPurgeList.size() );
+        assertFalse( "check not there", repoPurgeList.contains( repoPurge ) );
+    }
+    
+    public void testAddDirectoryPurgeConfiguration()
+        throws Exception
+    {
+        String location = "release-directory";
+        String directoryType = "release";
+        
+        Schedule schedule = store.getSchedule( testSchedule1.getId() );
+        DirectoryPurgeConfiguration dirPurge = createTestDirectoryPurgeConfiguration( location, directoryType, false, 2, 100, schedule, true );
+        
+        DirectoryPurgeConfiguration copy = createTestDirectoryPurgeConfiguration( dirPurge );
+        store.addDirectoryPurgeConfiguration( dirPurge );
+        copy.setId( dirPurge.getId() );
+        
+        DirectoryPurgeConfiguration retrieved = store.getDirectoryPurgeConfiguration( dirPurge.getId() );
+        assertDirectoryPurgeConfigurationEquals( copy, retrieved );
+        assertScheduleEquals( testSchedule1, retrieved.getSchedule() );
+    }
+    
+    public void testRemoveDirectoryPurgeConfiguration()
+        throws Exception
+    {
+        DirectoryPurgeConfiguration dirPurge = store.getDirectoryPurgeConfiguration( testDirectoryPurgeConfig.getId() );
+        store.removeDirectoryPurgeConfiguration( dirPurge );
+        
+        List<DirectoryPurgeConfiguration> dirPurgeList = store.getAllDirectoryPurgeConfigurations();
+        assertEquals( "check #  dir purge configurations", 0, dirPurgeList.size() );
+    }
+    
+    public void testGetPurgeConfigurationsBySchedule()
+        throws Exception
+    {
+        List<RepositoryPurgeConfiguration> repoPurgeList = store.getRepositoryPurgeConfigurationsBySchedule( testSchedule2.getId() );
+        List<DirectoryPurgeConfiguration> dirPurgeList = store.getDirectoryPurgeConfigurationsBySchedule( testSchedule2.getId() );
+        
+        assertEquals( "check # repo purge configurations", 2, repoPurgeList.size() );
+        assertEquals( "check # dir purge configurations", 1, dirPurgeList.size() );
+        
+        assertRepositoryPurgeConfigurationEquals( testRepoPurgeConfiguration1, repoPurgeList.get( 0 ) );
+        assertRepositoryPurgeConfigurationEquals( testRepoPurgeConfiguration3, repoPurgeList.get( 1 ) );
+        assertDirectoryPurgeConfigurationEquals( testDirectoryPurgeConfig, dirPurgeList.get( 0 ) );
+    }
+    
     // ----------------------------------------------------------------------
     //  HELPER METHODS
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java Thu Jul 31 14:02:48 2008
@@ -75,6 +75,9 @@
 
         TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
             .buildSpringId( TaskQueueExecutor.class, "rollback-release" ) );        
+        
+        TaskQueueExecutor purge = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
+            .buildSpringId( TaskQueueExecutor.class, "purge" ) );
     }
 
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java Thu Jul 31 14:02:48 2008
@@ -20,7 +20,10 @@
  */
 
 import java.util.Iterator;
+import java.util.List;
 
+import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.repository.RepositoryServiceException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
@@ -40,6 +43,10 @@
     private String groupId;
 
     private String description;
+    
+    private int repositoryId;
+    
+    private List<LocalRepository> repositories;
 
     public void validate()
     {
@@ -109,6 +116,21 @@
         projectGroup.setGroupId( groupId );
 
         projectGroup.setDescription( description );
+        
+        try
+        {
+            if ( repositoryId > 0 )
+            {
+                LocalRepository repository = getContinuum().getRepositoryService().getLocalRepository( repositoryId );
+                projectGroup.setLocalRepository( repository );
+            }
+        }
+        catch ( RepositoryServiceException e )
+        {
+            getLogger().error( "Error adding project group" + e.getLocalizedMessage() );
+            
+            return ERROR;
+        }
 
         try
         {
@@ -130,6 +152,8 @@
         {
             checkAddProjectGroupAuthorization();
 
+            repositories = getContinuum().getRepositoryService().getAllLocalRepositories();
+            
             return INPUT;
         }
         catch ( AuthorizationRequiredException authzE )
@@ -168,4 +192,24 @@
     {
         this.name = name;
     }
+    
+    public int getRepositoryId()
+    {
+        return repositoryId;
+    }
+    
+    public void setRepositoryId( int repositoryId )
+    {
+        this.repositoryId = repositoryId;
+    }
+    
+    public List<LocalRepository> getRepositories()
+    {
+        return repositories;
+    }
+    
+    public void setRepositories( List<LocalRepository> repositories )
+    {
+        this.repositories = repositories;
+    }
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java Thu Jul 31 14:02:48 2008
@@ -21,7 +21,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.continuum.ContinuumException;
@@ -61,6 +60,12 @@
                 groupModel.setGroupId( projectGroup.getGroupId() );
                 groupModel.setName( projectGroup.getName() );
                 groupModel.setDescription( projectGroup.getDescription() );
+                
+                if ( projectGroup.getLocalRepository() != null )
+                {
+                    groupModel.setRepositoryId( projectGroup.getLocalRepository().getId() );
+                    groupModel.setRepositoryName( projectGroup.getLocalRepository().getName() );
+                }
 
                 //TODO: Create a summary jpox request so code will be more simple and performance will be better
                 Collection<Project> projects = projectGroup.getProjects();

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java Thu Jul 31 14:02:48 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -114,6 +115,10 @@
     
     private String url;
 
+    private int repositoryId;
+    
+    private List<LocalRepository> repositories;
+    
     public String summary()
         throws ContinuumException
     {
@@ -291,7 +296,7 @@
         name = projectGroup.getName();
 
         description = projectGroup.getDescription();
-
+        
         projectList = projectGroup.getProjects();
 
         if ( projectList != null )
@@ -316,11 +321,22 @@
             projectGroups.put( new Integer( pg.getId() ), pg.getName() );
         }
 
+        if ( projectGroup.getLocalRepository() != null)
+        {
+            repositoryId = projectGroup.getLocalRepository().getId();
+        }
+        else
+        {
+            repositoryId = -1;
+        }
+        
+        repositories = getContinuum().getRepositoryService().getAllLocalRepositories();
+        
         return SUCCESS;
     }
 
     public String save()
-        throws ContinuumException
+        throws Exception
     {
         try
         {
@@ -384,7 +400,17 @@
         }
 
         projectGroup.setDescription( description );
-
+        
+        if ( repositoryId > 0 )
+        {
+            LocalRepository repository = getContinuum().getRepositoryService().getLocalRepository( repositoryId );
+            projectGroup.setLocalRepository( repository );
+        }
+        else
+        {
+            projectGroup.setLocalRepository( null );
+        }
+        
         getContinuum().updateProjectGroup( projectGroup );
 
         Iterator keys = projects.keySet().iterator();
@@ -864,4 +890,24 @@
 	{
 		this.url = url;
 	}
+	
+	public int getRepositoryId()
+	{
+	    return repositoryId;
+	}
+	
+	public void setRepositoryId( int repositoryId )
+	{
+	    this.repositoryId = repositoryId;
+	}
+	
+	public List<LocalRepository> getRepositories()
+	{
+	    return repositories;
+	}
+	
+	public void setRepositories( List<LocalRepository> repositories )
+	{
+	    this.repositories = repositories;
+	}
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java Thu Jul 31 14:02:48 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
@@ -112,12 +113,16 @@
 
         ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
 
+        Project project = getContinuum().getProject( projectId );
+
         //todo should be configurable
         File performDirectory = new File( getContinuum().getConfiguration().getWorkingDirectory(),
                                           "releases-" + System.currentTimeMillis() );
         performDirectory.mkdirs();
-
-        releaseManager.perform( releaseId, performDirectory, goals, useReleaseProfile, listener );
+        
+        LocalRepository repository = project.getProjectGroup().getLocalRepository();
+        
+        releaseManager.perform( releaseId, performDirectory, goals, useReleaseProfile, listener, repository );
 
         return SUCCESS;
     }

Modified: continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo (original)
+++ continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo Thu Jul 31 14:02:48 2008
@@ -254,6 +254,21 @@
           <type>int</type>
           <defaultValue>-1</defaultValue>
         </field>
+        <field>
+          <name>repositoryId</name>
+          <version>1.0.0</version>
+          <required>false</required>
+          <description>local repository id of the project group</description>
+          <type>int</type>
+          <defaultValue>-1</defaultValue>
+        </field>
+        <field>
+          <name>repositoryName</name>
+          <version>1.0.0</version>
+          <required>false</required>
+          <description>local repository name of the project group</description>
+          <type>String</type>
+        </field>
       </fields>
     </class>
     <class>

Modified: continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Thu Jul 31 14:02:48 2008
@@ -331,6 +331,11 @@
             <name>org.jpox.rdbms.stringDefaultLength</name>
             <value>255</value>
           </property>
+          <property>
+            <name>org.jpox.autoCreateColumns</name>
+            <value>true</value>
+          </property>
+			
 <!--
           <property>
             <name>org.jpox.identifier.case</name>

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Thu Jul 31 14:02:48 2008
@@ -46,6 +46,7 @@
 unselectAll = Unselect All
 sort.descending = Sort Descending
 sort.ascending = Sort Ascending
+purge = Purge
 
 # ----------------------------------------------------------------------
 # Page: Top
@@ -79,6 +80,8 @@
 menu.account.options = My account
 user.edit.account = Edit user info
 menu.administration.queues = Queues
+menu.administration.repositories = Local Repositories
+menu.administration.purge = Purge Configurations
 
 # ----------------------------------------------------------------------
 # Page: error
@@ -144,6 +147,7 @@
 groups.section.title = Project Group:
 groups.manage.label = Manage Group
 groups.confirmation.message = Are you sure you want to delete the project group "{0}"?
+groups.table.repositoryName = Local Repository
 
 # ----------------------------------------------------------------------
 # Page: Project Group
@@ -174,6 +178,7 @@
 projectGroup.buildsStatut.success = Success
 projectGroup.buildDefinition.label = Default Build Definition
 projectGroup.addProject.label = Add New Project
+projectGroup.repository.label = Local Repository
 
 # ----------------------------------------------------------------------
 # Page: Project Group - Members
@@ -818,3 +823,70 @@
 deleteBuildEnv.page.title = Continuum - Delete Build Environment
 deleteBuildEnv.section.title = Delete Build Environment
 deleteBuildEnv.confirmation.message = Are you sure you want to delete Build Environment "{0}" ?
+
+#-----------------------------------------------------------------------
+# Page: Local Repositories
+#-----------------------------------------------------------------------
+repositories.page.title = Continuum - Local Repositories
+repositories.section.title = Local Repositories
+repositories.table.name = Name
+repositories.table.location = Location
+repositories.table.layout = Layout
+
+#-----------------------------------------------------------------------
+# Page: Add/Edit Local Repository
+#-----------------------------------------------------------------------
+repository.page.title = Continuum - Add/Edit Local Repository
+repository.section.title = Add/Edit Local Repository
+repository.name.label = Name
+repository.location.label = Location
+repository.layout.label = Layout
+repository.error.name.unique = Local repository name must be unique
+repository.error.name.cannot.be.spaces = Local repository name cannot be spaces
+repository.error.location.unique = Local repository location must be unique
+repository.error.location.cannot.be.spaces = Local repository location cannot be spaces
+repository.error.save.in.use = Unable to edit local repository because it is currently in use 
+repository.error.remove.in.use = Unable to remove local repository because it is currently in use
+repository.error.purge.in.use = Unable to purge local repository because it is currently in use
+repository.error.remove.default = Cannot remove default local repository.
+
+#-----------------------------------------------------------------------
+# Page: Delete Local Repository
+#-----------------------------------------------------------------------
+deleteRepository.page.title = Continuum - Delete Local Repository
+deleteRepository.section.title = Delete Local Repository
+deleteRepository.confirmation.message = Are you sure you want to delete Local Repository "{0}" ?
+
+#-----------------------------------------------------------------------
+# Page: Purge Configurations
+#-----------------------------------------------------------------------
+purgeConfigs.page.title = Continuum - Purge Configurations
+purgeConfigs.repo.section.title = Repository Purge Configurations
+purgeConfigs.dir.section.title = Directory Purge Configurations
+purgeConfigs.table.repository = Repository
+purgeConfigs.table.description = Description
+purgeConfigs.table.retentionCount = Retention Count
+purgeConfigs.table.schedule = Schedule
+purgeConfigs.table.daysOlder = Days Older
+purgeConfigs.table.deleteAll = Delete All
+purgeConfigs.table.directoryType = Directory Type
+purgeConfigs.table.default = Default
+purgeConfigs.table.enabled = Enabled
+purgeConfigs.table.deleteReleasedSnapshots = Delete Released Snapshots
+
+#-----------------------------------------------------------------------
+# Page: Add/Edit Purge Configuration
+#-----------------------------------------------------------------------
+purgeConfig.page.title = Continuum - Add/Edit Purge Configuration
+purgeConfig.section.title = Add/Edit Purge Configuration
+purgeConfig.repository.label = Repository
+purgeConfig.directoryType.label = Directory Type
+purgeConfig.retentionCount.label = Retention Count
+purgeConfig.daysOlder.label = Days Older
+purgeConfig.deleteAll.label = Delete All
+purgeConfig.deleteReleasedSnapshots.label = Delete Released Snapshots
+purgeConfig.defaultPurge.label = Is it Default?
+purgeConfig.schedule.label = Schedule
+purgeConfig.description.label = Description
+purgeConfig.enabled.label = Enabled
+purgeConfig.no.repositories = No repositories to purge
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Jul 31 14:02:48 2008
@@ -747,6 +747,84 @@
       </result>      
     </action>    
     
+    <!--
+    * Local Repository actions
+    -->
+    
+    <action name="repositoryList" class="localRepository" method="list">
+      <result name="success">/WEB-INF/jsp/admin/localRepositoriesList.jsp</result>
+    </action>
+    
+    <action name="editRepository" class="localRepository" method="input">
+      <result name="error">/WEB-INF/jsp/admin/editLocalRepository.jsp</result>
+      <result name="input">/WEB-INF/jsp/admin/editLocalRepository.jsp</result>
+    </action>
+    
+    <action name="saveRepository" class="localRepository" method="save">
+      <result name="error">/WEB-INF/jsp/admin/editLocalRepository.jsp</result>
+      <result name="input">/WEB-INF/jsp/admin/editLocalRepository.jsp</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">repositoryList</param>
+      </result>
+    </action>
+    
+    <action name="removeRepository" class="localRepository" method="remove">
+      <result name="error" type="redirect-action">
+        <param name="actionName">repositoryList</param>
+        <param name="errorMessage">${message}</param>
+      </result>
+      <result name="confirm">/WEB-INF/jsp/admin/confirmDeleteLocalRepository.jsp</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">repositoryList</param>
+      </result>
+    </action>
+    
+    <action name="purgeRepository" class="localRepository" method="doPurge">
+      <result name="success" type="redirect-action">
+        <param name="actionName">repositoryList</param>
+      </result>
+      <result name="error" type="redirect-action">
+        <param name="actionName">repositoryList</param>
+        <param name="errorMessage">${message}</param>
+      </result>
+    </action>
+    
+    <!--
+    * Purge actions
+    -->
+    
+    <action name="purgeConfigList" class="purgeConfiguration" method="list">
+      <result name="success">/WEB-INF/jsp/admin/purgeConfigurationsList.jsp</result>
+    </action>
+    
+    <action name="editPurgeConfig" class="purgeConfiguration" method="input">
+      <result name="error">/WEB-INF/jsp/admin/editPurgeConfiguration.jsp</result>
+      <result name="input">/WEB-INF/jsp/admin/editPurgeConfiguration.jsp</result>
+    </action>
+    
+    <action name="savePurgeConfig" class="purgeConfiguration" method="save">
+      <result name="input">/WEB-INF/jsp/admin/editPurgeConfiguration.jsp</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">purgeConfigList</param>
+      </result>
+    </action>
+    
+    <action name="removePurgeConfig" class="purgeConfiguration" method="remove">
+      <result name="success" type="redirect-action">
+        <param name="actionName">purgeConfigList</param>
+      </result>
+    </action>
+    
+    <action name="doPurge" class="purgeConfiguration" method="purge">
+      <result name="success" type="redirect-action">
+        <param name="actionName">purgeConfigList</param>
+      </result>
+      <result name="error" type="redirect-action">
+        <param name="actionName">purgeConfigList</param>
+        <param name="errorMessage">${message}</param>
+      </result>
+    </action>
+    
   </package>
 
   <package name="component" extends="default">
@@ -934,6 +1012,6 @@
       <result name="input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
       <result name="success" type="chain">projectGroupNotifier</result>
     </action>
-
+    
   </package>
 </xwork>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/groupSummary.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/groupSummary.jsp?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/groupSummary.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/groupSummary.jsp Thu Jul 31 14:02:48 2008
@@ -57,6 +57,17 @@
           <a href="<ww:url  action="projectGroupSummary" namespace="/"><ww:param name="projectGroupId" value="%{'${group.id}'}"/></ww:url>">${group.name}</a>
         </ec:column>
         <ec:column property="groupId" title="groups.table.groupId" width="20%"/>
+        <ec:column property="repositoryName" title="groups.table.repositoryName" width="20%">
+          <redback:ifAuthorized permission="continuum-manage-repositories">
+            <ww:url id="editRepositoryUrl" action="editRepository" namespace="/admin" includeParams="none">
+              <ww:param name="repository.id">${pageScope.group.repositoryId}</ww:param>
+            </ww:url>
+            <ww:a href="%{editRepositoryUrl}">${pageScope.group.repositoryName}</ww:a> 
+          </redback:ifAuthorized>
+          <redback:elseAuthorized>
+            ${pageScope.group.repositoryName}
+          </redback:elseAuthorized>
+        </ec:column>
         <ec:column property="numSuccesses" title="&nbsp;" format="0" width="2%" style="text-align: right" headerClass="calcHeaderSucces" calc="total" calcTitle="groups.table.summary"/>
         <ec:column property="numFailures" title="&nbsp;" format="0" width="2%" style="text-align: right" headerClass="calcHeaderFailure" calc="total" />
         <ec:column property="numErrors" title="&nbsp;" format="0" width="2%" style="text-align: right" headerClass="calcHeaderError" calc="total"/>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp Thu Jul 31 14:02:48 2008
@@ -82,12 +82,28 @@
   </redback:ifAuthorized>
 
 
-  <redback:ifAnyAuthorized permissions="continuum-manage-build-templates,continuum-manage-schedules,continuum-manage-configuration,continuum-manage-users,continuum-manage-installations,continuum-manage-profiles,continuum-view-queues">
+  <redback:ifAnyAuthorized permissions="continuum-manage-build-templates,continuum-manage-schedules,continuum-manage-configuration,continuum-manage-users,continuum-manage-installations,continuum-manage-profiles,continuum-view-queues,continuum-manage-repositories,continuum-manage-purging">
     <div id="projectmenu" class="toolgroup">
       <div class="label">
         <ww:text name="menu.administration"/>
       </div>
       <div>
+        <redback:ifAuthorized permission="continuum-manage-repositories">
+          <ww:url id="repositoryListUrl" action="repositoryList" namespace="/admin" includeParams="none"/>
+          <div class="body">
+            <ww:a href="%{repositoryListUrl}">
+              <ww:text name="menu.administration.repositories"/>
+            </ww:a>
+          </div>
+        </redback:ifAuthorized>
+        <redback:ifAuthorized permission="continuum-manage-purging">
+          <ww:url id="purgeConfigListUrl" action="purgeConfigList" namespace="/admin" includeParams="none"/>
+          <div class="body">
+            <ww:a href="%{purgeConfigListUrl}">
+              <ww:text name="menu.administration.purge"/>
+            </ww:a>
+          </div>
+        </redback:ifAuthorized>
         <redback:ifAuthorized permission="continuum-manage-schedules">
           <ww:url id="scheduleUrl" namespace="/" action="schedules" includeParams="none"/>
           <div class="body">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupAdd.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupAdd.jsp?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupAdd.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupAdd.jsp Thu Jul 31 14:02:48 2008
@@ -44,6 +44,8 @@
                 <ww:textfield label="%{getText('projectGroup.name.label')}" name="name"  required="true"/>
                 <ww:textfield label="%{getText('projectGroup.groupId.label')}" name="groupId" required="true"/>
                 <ww:textfield label="%{getText('projectGroup.description.label')}" name="description"/>
+                <ww:select label="%{getText('projectGroup.repository.label')}" name="repositoryId" list="repositories"
+                		   listKey="id" listValue="name"/>
               </tbody>
             </table>
             <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupEdit.jsp?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupEdit.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupEdit.jsp Thu Jul 31 14:02:48 2008
@@ -50,6 +50,8 @@
                 <ww:textfield label="%{getText('projectGroup.name.label')}" name="name" required="true" disabled="%{projectInCOQueue}"/>
                 <c1:data label="%{getText('projectGroup.groupId.label')}" name="projectGroup.groupId"/>
                 <ww:textfield label="%{getText('projectGroup.description.label')}" name="description" disabled="%{projectInCOQueue}"/>
+                <ww:select label="%{getText('projectGroup.repository.label')}" name="repositoryId" list="repositories" 
+                           listKey="id" listValue="name"/> 
               </tbody>
             </table>
             

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp Thu Jul 31 14:02:48 2008
@@ -88,6 +88,7 @@
         <c1:data label="%{getText('projectGroup.name.label')}" name="projectGroup.name"/>
         <c1:data label="%{getText('projectGroup.groupId.label')}" name="projectGroup.groupId"/>
         <c1:data label="%{getText('projectGroup.description.label')}" name="projectGroup.description"/>
+        <c1:data label="%{getText('projectGroup.repository.label')}" name="projectGroup.localRepository.name"/>
         <c:if test="${url != null}">
             <ww:url id="projectHomepageUrl" value="${url}" includeContext="false" includeParams="none"/>
         	<c1:data label="%{getText('projectGroup.url.label')}" name="url" valueLink="%{'${projectHomepageUrl}'}"/>  

Modified: continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=681492&r1=681491&r2=681492&view=diff
==============================================================================
--- continuum/trunk/pom.xml (original)
+++ continuum/trunk/pom.xml Thu Jul 31 14:02:48 2008
@@ -200,6 +200,7 @@
     <module>maven-continuum-plugin</module>
     <module>continuum-docs</module>
     <module>continuum-jetty</module>
+    <module>continuum-purge</module>
   </modules>
   <!-- TODO: confirm whether these are needed -->
   <repositories>
@@ -955,6 +956,21 @@
         <artifactId>spring-web</artifactId>
         <version>${spring.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.continuum</groupId>
+        <artifactId>continuum-purge</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.archiva</groupId>
+	<artifactId>archiva-common</artifactId>
+        <version>${archiva.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.archiva</groupId>
+        <artifactId>archiva-repository-layer</artifactId>
+        <version>${archiva.version}</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
@@ -1004,5 +1020,6 @@
     <maven-scm.version>1.1-SNAPSHOT</maven-scm.version>
     <redback.version>1.0.2</redback.version>
     <mail-sender.version>1.0-alpha-7</mail-sender.version>
+    <archiva.version>1.1</archiva.version>
   </properties>
 </project>



Mime
View raw message