summaryrefslogtreecommitdiffstats
path: root/archiva-reporting/archiva-artifact-reports/src/main
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-10-08 22:07:39 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-10-08 22:07:39 +0000
commit8af86cd884b34ecfa98c6a42d2975fdd45c48fff (patch)
tree3747df8c304e8c84090f325abab84775e961db6e /archiva-reporting/archiva-artifact-reports/src/main
parent4b9cf4b9298b9906ae4975146706e6a870349e43 (diff)
downloadarchiva-8af86cd884b34ecfa98c6a42d2975fdd45c48fff.tar.gz
archiva-8af86cd884b34ecfa98c6a42d2975fdd45c48fff.zip
Finishing the Repository split work that brett started.
ArchivaRepository has been removed from model. This work was needed before repository layout/detection proposal work is started. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@582987 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-reporting/archiva-artifact-reports/src/main')
-rw-r--r--archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java b/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java
index f461baf46..e9cc8416b 100644
--- a/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java
+++ b/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java
@@ -31,9 +31,7 @@ import org.apache.maven.archiva.database.ArchivaDAO;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArchivaProjectModel;
-import org.apache.maven.archiva.model.ArchivaRepository;
import org.apache.maven.archiva.model.RepositoryProblem;
-import org.apache.maven.archiva.repository.ArchivaConfigurationAdaptor;
import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout;
import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory;
import org.apache.maven.archiva.repository.layout.LayoutException;
@@ -142,9 +140,9 @@ public class LocationArtifactsConsumer
public void processArchivaArtifact( ArchivaArtifact artifact )
throws ConsumerException
{
- ArchivaRepository repository = findRepository( artifact );
+ ManagedRepositoryConfiguration repository = findRepository( artifact );
- File artifactFile = new File( repository.getUrl().toString(), toPath( artifact ) );
+ File artifactFile = new File( repository.getLocation(), toPath( artifact ) );
ArchivaProjectModel fsModel = readFilesystemModel( artifactFile );
ArchivaProjectModel embeddedModel = readEmbeddedModel( artifact, artifactFile );
@@ -287,9 +285,9 @@ public class LocationArtifactsConsumer
return new File( pomFilename );
}
- private ArchivaRepository findRepository( ArchivaArtifact artifact )
+ private ManagedRepositoryConfiguration findRepository( ArchivaArtifact artifact )
{
- return (ArchivaRepository) this.repositoryMap.get( artifact.getModel().getRepositoryId() );
+ return (ManagedRepositoryConfiguration) this.repositoryMap.get( artifact.getModel().getRepositoryId() );
}
private String toPath( ArchivaArtifact artifact )
@@ -337,12 +335,12 @@ public class LocationArtifactsConsumer
{
this.repositoryMap.clear();
- Map<String, ManagedRepositoryConfiguration> map =
+ Map<String, ManagedRepositoryConfiguration> map =
configuration.getConfiguration().getManagedRepositoriesAsMap();
+
for ( Map.Entry<String, ManagedRepositoryConfiguration> entry : map.entrySet() )
{
- ArchivaRepository repository = ArchivaConfigurationAdaptor.toArchivaRepository( entry.getValue() );
- this.repositoryMap.put( entry.getKey(), repository );
+ this.repositoryMap.put( entry.getKey(), entry.getValue() );
}
}
}