diff options
author | Maria Odea B. Ching <oching@apache.org> | 2007-10-21 17:30:07 +0000 |
---|---|---|
committer | Maria Odea B. Ching <oching@apache.org> | 2007-10-21 17:30:07 +0000 |
commit | 21a61ab5f9c0a139bb25a64c7d8136af6a00dc96 (patch) | |
tree | a461952e7cada7b45eca459e7089262f1121adc0 /archiva-web | |
parent | 1d6c1b9d0aab92bf85ec37dc24900bf890410838 (diff) | |
download | archiva-21a61ab5f9c0a139bb25a64c7d8136af6a00dc96.tar.gz archiva-21a61ab5f9c0a139bb25a64c7d8136af6a00dc96.zip |
[MRM-265]
- added method for deleting the artifacts in the db when a repo is deleted
- also deleted repo scan statistics when the repo is deleted
- created DAO that does retrieving, deleting and adding of RepositoryContentStatistics to the db
- added and updated tests
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@586919 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web')
7 files changed, 453 insertions, 18 deletions
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java index c61eeb4ac..8a6ab5688 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java @@ -24,18 +24,29 @@ import com.opensymphony.xwork.Preparable; import org.apache.commons.lang.StringUtils; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; + +import org.apache.maven.archiva.database.ArchivaDAO; +import org.apache.maven.archiva.database.ArchivaDatabaseException; +import org.apache.maven.archiva.database.Constraint; +import org.apache.maven.archiva.database.ObjectNotFoundException; +import org.apache.maven.archiva.database.constraints.ArtifactsByRepositoryConstraint; +import org.apache.maven.archiva.database.constraints.RepositoryContentStatisticsByRepositoryConstraint; +import org.apache.maven.archiva.model.ArchivaArtifact; +import org.apache.maven.archiva.model.ArchivaProjectModel; +import org.apache.maven.archiva.model.RepositoryContentStatistics; + import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; + import org.codehaus.plexus.redback.role.RoleManagerException; import java.io.IOException; import java.util.List; /** - * DeleteManagedRepositoryAction - * + * DeleteManagedRepositoryAction + * * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a> * @version $Id$ - * * @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteManagedRepositoryAction" */ public class DeleteManagedRepositoryAction @@ -46,6 +57,11 @@ public class DeleteManagedRepositoryAction private String repoid; + /** + * @plexus.requirement role-hint="jdo" + */ + private ArchivaDAO archivaDAO; + public void prepare() { if ( StringUtils.isNotBlank( repoid ) ) @@ -89,13 +105,12 @@ public class DeleteManagedRepositoryAction try { Configuration configuration = archivaConfiguration.getConfiguration(); + cleanupRepositoryData( existingRepository ); removeRepository( repoid, configuration ); result = saveConfiguration( configuration ); if ( result.equals( SUCCESS ) ) { - cleanupRepositoryData( existingRepository ); - if ( deleteContents ) { removeContents( existingRepository ); @@ -112,19 +127,26 @@ public class DeleteManagedRepositoryAction addActionError( "Unable to delete repository: " + e.getMessage() ); result = ERROR; } + catch ( ArchivaDatabaseException e ) + { + addActionError( "Unable to delete repositoy: " + e.getMessage() ); + result = ERROR; + } return result; } private void cleanupRepositoryData( ManagedRepositoryConfiguration cleanupRepository ) - throws RoleManagerException + throws RoleManagerException, ArchivaDatabaseException { removeRepositoryRoles( cleanupRepository ); // TODO: [MRM-382] Remove index from artifacts of deleted managed repositories. - // TODO: [MRM-265] After removing a managed repository - Browse/Search still see it - + // [MRM-265] After removing a managed repository - Browse/Search still see it + cleanupDatabase( cleanupRepository.getId() ); + cleanupScanStats( cleanupRepository.getId() ); + // [MRM-520] Proxy Connectors are not deleted with the deletion of a Repository. List<ProxyConnectorConfiguration> proxyConnectors = getProxyConnectors(); for ( ProxyConnectorConfiguration proxyConnector : proxyConnectors ) @@ -136,6 +158,52 @@ public class DeleteManagedRepositoryAction } } + private void cleanupDatabase( String repoId ) + throws ArchivaDatabaseException + { + Constraint constraint = new ArtifactsByRepositoryConstraint( repoId ); + + List<ArchivaArtifact> artifacts = archivaDAO.getArtifactDAO().queryArtifacts( constraint ); + + for ( ArchivaArtifact artifact : artifacts ) + { + getLogger().info( "Removing artifact " + artifact + " from the database." ); + try + { + archivaDAO.getArtifactDAO().deleteArtifact( artifact ); + + ArchivaProjectModel projectModel = + archivaDAO.getProjectModelDAO().getProjectModel( artifact.getGroupId(), artifact.getArtifactId(), + artifact.getVersion() ); + + archivaDAO.getProjectModelDAO().deleteProjectModel( projectModel ); + } + catch ( ObjectNotFoundException oe ) + { + getLogger().info( "Project model of artifact " + artifact + " does not exist in the database. " + + "Moving on to the next artifact." ); + } + catch ( ArchivaDatabaseException ae ) + { + getLogger().info( "Unable to delete artifact " + artifact + " from the database. " + + "Moving on to the next artifact." ); + } + } + } + + private void cleanupScanStats( String repoId ) + throws ArchivaDatabaseException + { + List<RepositoryContentStatistics> results = + archivaDAO.getRepositoryContentStatisticsDAO().queryRepositoryContentStatistics( + new RepositoryContentStatisticsByRepositoryConstraint( repoId ) ); + + for ( RepositoryContentStatistics stats : results ) + { + archivaDAO.getRepositoryContentStatisticsDAO().deleteRepositoryContentStatistics( stats ); + } + } + public ManagedRepositoryConfiguration getRepository() { return repository; @@ -155,4 +223,14 @@ public class DeleteManagedRepositoryAction { this.repoid = repoid; } + + public void setArchivaDAO( ArchivaDAO archivaDAO ) + { + this.archivaDAO = archivaDAO; + } + + public ArchivaDAO getArchivaDAO() + { + return archivaDAO; + } } diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java index 2c464c4f7..7141af57c 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaDAOStub.java @@ -4,6 +4,7 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.database.ArchivaDAO; import org.apache.maven.archiva.database.ArtifactDAO; import org.apache.maven.archiva.database.ProjectModelDAO; +import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO; import org.apache.maven.archiva.database.RepositoryProblemDAO; import org.apache.maven.archiva.database.SimpleConstraint; import org.apache.maven.archiva.model.RepositoryContentStatistics; @@ -46,6 +47,7 @@ public class ArchivaDAOStub public List query( SimpleConstraint constraint ) { Assert.assertEquals( RepositoryContentStatistics.class, constraint.getResultClass() ); + List<RepositoryContentStatistics> stats = new ArrayList<RepositoryContentStatistics>(); for ( String repo : configuration.getConfiguration().getManagedRepositoriesAsMap().keySet() ) @@ -64,16 +66,22 @@ public class ArchivaDAOStub public ArtifactDAO getArtifactDAO() { - throw new UnsupportedOperationException( "query not implemented for stub" ); + throw new UnsupportedOperationException( "method not implemented for stub" ); } public ProjectModelDAO getProjectModelDAO() { - throw new UnsupportedOperationException( "query not implemented for stub" ); + throw new UnsupportedOperationException( "method not implemented for stub" ); } public RepositoryProblemDAO getRepositoryProblemDAO() { - throw new UnsupportedOperationException( "query not implemented for stub" ); + throw new UnsupportedOperationException( "method not implemented for stub" ); + } + + public RepositoryContentStatisticsDAO getRepositoryContentStatisticsDAO() + { + throw new UnsupportedOperationException( "method not implemented for stub" ); } + } diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArtifactDAOStub.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArtifactDAOStub.java new file mode 100644 index 000000000..61e2f8bd3 --- /dev/null +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArtifactDAOStub.java @@ -0,0 +1,90 @@ +package org.apache.maven.archiva.web.action.admin.repositories; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.ArrayList; +import java.util.List; + +import org.apache.maven.archiva.database.ArchivaDatabaseException; +import org.apache.maven.archiva.database.ArtifactDAO; +import org.apache.maven.archiva.database.Constraint; +import org.apache.maven.archiva.database.ObjectNotFoundException; +import org.apache.maven.archiva.model.ArchivaArtifact; +import org.apache.maven.archiva.model.ArchivaArtifactModel; + +/** + * ArtifactDAOStub + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + * @version + */ +public class ArtifactDAOStub + implements ArtifactDAO +{ + + public ArchivaArtifact createArtifact( String groupId, String artifactId, String version, String classifier, + String type ) + { + // TODO Auto-generated method stub + return null; + } + + public void deleteArtifact( ArchivaArtifact artifact ) + throws ArchivaDatabaseException + { + // TODO Auto-generated method stub + + } + + public ArchivaArtifact getArtifact( String groupId, String artifactId, String version, String classifier, + String type ) + throws ObjectNotFoundException, ArchivaDatabaseException + { + // TODO Auto-generated method stub + return null; + } + + public List<ArchivaArtifact> queryArtifacts( Constraint constraint ) + throws ObjectNotFoundException, ArchivaDatabaseException + { + + List<ArchivaArtifact> artifacts = new ArrayList<ArchivaArtifact>(); + + ArchivaArtifactModel model = new ArchivaArtifactModel(); + model.setGroupId( "org.apache.maven.archiva" ); + model.setArtifactId( "test-artifact" ); + model.setVersion( "1.0" ); + model.setType( "jar" ); + model.setRepositoryId( "repo-ident" ); + + ArchivaArtifact artifact = new ArchivaArtifact( model ); + artifacts.add( artifact ); + + return artifacts; + } + + public ArchivaArtifact saveArtifact( ArchivaArtifact artifact ) + throws ArchivaDatabaseException + { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java index a9b2e4424..95f25df2b 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java @@ -25,8 +25,12 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.IndeterminateConfigurationException; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; + +import org.apache.maven.archiva.model.ArchivaProjectModel; + import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; + import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.redback.role.RoleManager; @@ -57,7 +61,7 @@ public class DeleteManagedRepositoryActionTest private MockControl archivaConfigurationControl; private ArchivaConfiguration archivaConfiguration; - + private static final String REPO_ID = "repo-ident"; private File location; @@ -68,7 +72,7 @@ public class DeleteManagedRepositoryActionTest super.setUp(); action = (DeleteManagedRepositoryAction) lookup( Action.class.getName(), "deleteManagedRepositoryAction" ); - + archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class ); archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); action.setArchivaConfiguration( archivaConfiguration ); @@ -76,7 +80,7 @@ public class DeleteManagedRepositoryActionTest roleManagerControl = MockControl.createControl( RoleManager.class ); roleManager = (RoleManager) roleManagerControl.getMock(); action.setRoleManager( roleManager ); - location = getTestFile( "target/test/location" ); + location = getTestFile( "target/test/location" ); } public void testSecureActionBundle() @@ -119,11 +123,13 @@ public class DeleteManagedRepositoryActionTest public void testDeleteRepositoryKeepContent() throws Exception - { + { prepareRoleManagerMock(); - Configuration configuration = prepDeletionTest( createRepository(), 3 ); - String status = action.deleteEntry(); + Configuration configuration = prepDeletionTest( createRepository(), 3 ); + + String status = action.deleteEntry(); + assertEquals( Action.SUCCESS, status ); assertTrue( configuration.getManagedRepositories().isEmpty() ); @@ -136,8 +142,10 @@ public class DeleteManagedRepositoryActionTest { prepareRoleManagerMock(); - Configuration configuration = prepDeletionTest( createRepository(), 3 ); + Configuration configuration = prepDeletionTest( createRepository(), 3 ); + String status = action.deleteContents(); + assertEquals( Action.SUCCESS, status ); assertTrue( configuration.getManagedRepositories().isEmpty() ); @@ -277,4 +285,14 @@ public class DeleteManagedRepositoryActionTest roleManager.removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID ); roleManagerControl.replay(); } + + protected ArchivaProjectModel createProjectModel( String groupId, String artifactId, String version ) + { + ArchivaProjectModel projectModel = new ArchivaProjectModel(); + projectModel.setGroupId( groupId ); + projectModel.setArtifactId( artifactId ); + projectModel.setVersion( version ); + + return projectModel; + } } diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java new file mode 100644 index 000000000..d48ccc455 --- /dev/null +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java @@ -0,0 +1,85 @@ +package org.apache.maven.archiva.web.action.admin.repositories; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.Serializable; +import java.util.List; + +import org.apache.maven.archiva.database.ArchivaDAO; +import org.apache.maven.archiva.database.ArtifactDAO; +import org.apache.maven.archiva.database.ProjectModelDAO; +import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO; +import org.apache.maven.archiva.database.RepositoryProblemDAO; +import org.apache.maven.archiva.database.SimpleConstraint; + +/** + * DeleteManagedRepositoryArchivaDAOStub + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + * @version + */ +public class DeleteManagedRepositoryArchivaDAOStub + implements ArchivaDAO +{ + /** + * @plexus.requirement role-hint="jdo" + */ + private ProjectModelDAO projectModelDAO; + + /** + * @plexus.requirement role-hint="jdo" + */ + private ArtifactDAO artifactDAO; + + /** + * @plexus.requirement role-hint="jdo" + */ + private RepositoryContentStatisticsDAO repoContentStatisticsDAO; + + public List query( SimpleConstraint constraint ) + { + return null; + } + + public Object save( Serializable obj ) + { + throw new UnsupportedOperationException( "query not implemented for stub" ); + } + + public ArtifactDAO getArtifactDAO() + { + return artifactDAO; + } + + public ProjectModelDAO getProjectModelDAO() + { + return projectModelDAO; + } + + public RepositoryProblemDAO getRepositoryProblemDAO() + { + throw new UnsupportedOperationException( "query not implemented for stub" ); + } + + public RepositoryContentStatisticsDAO getRepositoryContentStatisticsDAO() + { + return repoContentStatisticsDAO; + } +} diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ProjectModelDAOStub.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ProjectModelDAOStub.java new file mode 100644 index 000000000..7414ebd8c --- /dev/null +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ProjectModelDAOStub.java @@ -0,0 +1,78 @@ +package org.apache.maven.archiva.web.action.admin.repositories; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.List; + +import org.apache.maven.archiva.database.ArchivaDatabaseException; +import org.apache.maven.archiva.database.Constraint; +import org.apache.maven.archiva.database.ObjectNotFoundException; +import org.apache.maven.archiva.database.ProjectModelDAO; +import org.apache.maven.archiva.model.ArchivaProjectModel; + +/** + * ProjectModelDAOStub + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + * @version + */ +public class ProjectModelDAOStub + implements ProjectModelDAO +{ + + public ArchivaProjectModel createProjectModel( String groupId, String artifactId, String version ) + { + // TODO Auto-generated method stub + return null; + } + + public void deleteProjectModel( ArchivaProjectModel model ) + throws ArchivaDatabaseException + { + // TODO Auto-generated method stub + + } + + public ArchivaProjectModel getProjectModel( String groupId, String artifactId, String version ) + throws ObjectNotFoundException, ArchivaDatabaseException + { + ArchivaProjectModel projectModel = new ArchivaProjectModel(); + projectModel.setGroupId( groupId ); + projectModel.setArtifactId( artifactId ); + projectModel.setVersion( version ); + + return projectModel; + } + + public List queryProjectModels( Constraint constraint ) + throws ObjectNotFoundException, ArchivaDatabaseException + { + // TODO Auto-generated method stub + return null; + } + + public ArchivaProjectModel saveProjectModel( ArchivaProjectModel model ) + throws ArchivaDatabaseException + { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml new file mode 100644 index 000000000..c6e35788e --- /dev/null +++ b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml @@ -0,0 +1,78 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<plexus> + <components> + <component> + <role>org.codehaus.plexus.logging.LoggerManager</role> + <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation> + <lifecycle-handler>basic</lifecycle-handler> + </component> + <component> + <role>com.opensymphony.xwork.Action</role> + <role-hint>deleteManagedRepositoryAction</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryAction</implementation> + <instantiation-strategy>per-lookup</instantiation-strategy> + <requirements> + <requirement> + <role>org.apache.maven.archiva.database.ArchivaDAO</role> + <role-hint>jdo</role-hint> + <field-name>archivaDAO</field-name> + </requirement> + </requirements> + </component> + <component> + <role>org.apache.maven.archiva.database.ArchivaDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryArchivaDAOStub</implementation> + <requirements> + <requirement> + <role>org.apache.maven.archiva.database.ArtifactDAO</role> + <role-hint>jdo</role-hint> + <field-name>artifactDAO</field-name> + </requirement> + <requirement> + <role>org.apache.maven.archiva.database.ProjectModelDAO</role> + <role-hint>jdo</role-hint> + <field-name>projectModelDAO</field-name> + </requirement> + <requirement> + <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role> + <role-hint>jdo</role-hint> + <field-name>repoContentStatisticsDAO</field-name> + </requirement> + </requirements> + </component> + <component> + <role>org.apache.maven.archiva.database.ArtifactDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation> + </component> + <component> + <role>org.apache.maven.archiva.database.ProjectModelDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation> + </component> + <component> + <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub</implementation> + </component> + </components> +</plexus> |