summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-13 12:12:39 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-13 12:12:39 +0000
commit919a5ac3eb725dc676e81fcbf868f3cc165598a4 (patch)
tree9aecd4829e214ecbb256dbd0ec5f13f428016ab3 /archiva-modules/plugins
parent5c067f2a4deaa775213a3b5c2ca44ce62f4ba914 (diff)
downloadarchiva-919a5ac3eb725dc676e81fcbf868f3cc165598a4.tar.gz
archiva-919a5ac3eb725dc676e81fcbf868f3cc165598a4.zip
[MRM-1504] Add a new module for repository administration management
split the repo admin in two modules : api and default implementation (to be able to more easily change the impl). Use the repo admin api consumers and indexing modules. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1170135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/problem-reports/pom.xml9
-rw-r--r--archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java6
-rw-r--r--archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java5
3 files changed, 15 insertions, 5 deletions
diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml
index 697cab1a7..241f317f2 100644
--- a/archiva-modules/plugins/problem-reports/pom.xml
+++ b/archiva-modules/plugins/problem-reports/pom.xml
@@ -32,6 +32,15 @@
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-repository-api</artifactId>
</dependency>
+ <!-- FIXME this deps must be removed -->
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-configuration</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-admin-api</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-checksum</artifactId>
diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
index bb033fd28..235094dd7 100644
--- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
+++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
@@ -19,6 +19,7 @@ package org.apache.archiva.reports.consumers;
* under the License.
*/
+import org.apache.archiva.admin.model.managed.ManagedRepository;
import org.apache.archiva.checksum.ChecksumAlgorithm;
import org.apache.archiva.checksum.ChecksummedFile;
import org.apache.archiva.metadata.model.ArtifactMetadata;
@@ -32,7 +33,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.FileTypes;
-import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
@@ -138,7 +138,7 @@ public class DuplicateArtifactsConsumer
return Collections.emptyList();
}
- public void beginScan( ManagedRepositoryConfiguration repo, Date whenGathered )
+ public void beginScan( ManagedRepository repo, Date whenGathered )
throws ConsumerException
{
repoId = repo.getId();
@@ -146,7 +146,7 @@ public class DuplicateArtifactsConsumer
repositorySession = repositorySessionFactory.createSession();
}
- public void beginScan( ManagedRepositoryConfiguration repo, Date whenGathered, boolean executeOnEntireRepo )
+ public void beginScan( ManagedRepository repo, Date whenGathered, boolean executeOnEntireRepo )
throws ConsumerException
{
beginScan( repo, whenGathered );
diff --git a/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java b/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java
index 359f7a499..fb1cc6bb0 100644
--- a/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java
+++ b/archiva-modules/plugins/problem-reports/src/test/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumerTest.java
@@ -20,6 +20,7 @@ package org.apache.archiva.reports.consumers;
*/
import junit.framework.TestCase;
+import org.apache.archiva.admin.model.managed.ManagedRepository;
import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.model.MetadataFacet;
import org.apache.archiva.metadata.repository.MetadataRepository;
@@ -57,7 +58,7 @@ public class DuplicateArtifactsConsumerTest
@Named( value = "knownRepositoryContentConsumer#duplicate-artifacts" )
private DuplicateArtifactsConsumer consumer;
- private ManagedRepositoryConfiguration config;
+ private ManagedRepository config;
private MetadataRepository metadataRepository;
@@ -92,7 +93,7 @@ public class DuplicateArtifactsConsumerTest
assertNotNull( consumer );
- config = new ManagedRepositoryConfiguration();
+ config = new ManagedRepository();
config.setId( TEST_REPO );
config.setLocation( new File( "target/test-repository" ).getAbsolutePath() );