From 6bfec56ad8fbcc703e0554db7b284390e43acfe0 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 25 May 2007 16:07:36 +0000 Subject: [PATCH] Fixing whoops in repository id handling git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541704 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/archiva/consumers/lucene/IndexContentConsumer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java b/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java index f65666dde..64c3e5603 100644 --- a/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java +++ b/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java @@ -90,6 +90,8 @@ public class IndexContentConsumer private RepositoryContentIndex index; private File repositoryDir; + + private String repositoryId; public String getId() { @@ -124,6 +126,7 @@ public class IndexContentConsumer throw new ConsumerException( "Consumer requires managed repository." ); } + this.repositoryId = repository.getId(); this.repositoryDir = new File( repository.getUrl().getPath() ); this.index = indexFactory.createFileContentIndex( repository ); } @@ -135,6 +138,7 @@ public class IndexContentConsumer try { File file = new File( repositoryDir, path ); + record.setRepositoryId( this.repositoryId ); record.setFilename( path ); record.setContents( FileUtils.readFileToString( file, null ) ); -- 2.39.5