From fbc8c429967bf62e8bbcdd6d148b2712c46d3d05 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Mon, 20 May 2013 10:28:30 +0000 Subject: [PATCH] [MRM-1751] removed unused methods and config + update docs git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1484418 13f79535-47bb-0310-9956-ffa450edef68 --- .../site/apt/userguide/virtual-repositories.apt | 4 ++-- archiva-jetty/pom.xml | 1 - .../indexer/merger/DefaultIndexMerger.java | 15 +-------------- .../archiva/indexer/merger/IndexMerger.java | 12 ------------ .../archiva-web/archiva-webapp/pom.xml | 1 - 5 files changed, 3 insertions(+), 30 deletions(-) diff --git a/archiva-docs/src/site/apt/userguide/virtual-repositories.apt b/archiva-docs/src/site/apt/userguide/virtual-repositories.apt index e0e3dfdff..dcd76279a 100644 --- a/archiva-docs/src/site/apt/userguide/virtual-repositories.apt +++ b/archiva-docs/src/site/apt/userguide/virtual-repositories.apt @@ -140,7 +140,7 @@ Virtual Repositories merging repositories index for which the current user has karma. This merged index is available in the path .indexer . - To not generate this merged index on each request, there is a ttl value for build merged index. - This ttl has a default value of 30 minutes. You can change it with modifying the sys props value <<>> (see your <<>> file) + To not generate this merged index on each request, there is a ttl (time to live) value for build merged index. It can be configured + in the repository group configuration. This ttl has a default value of 30 minutes. diff --git a/archiva-jetty/pom.xml b/archiva-jetty/pom.xml index d54deb81a..4c589fcf1 100644 --- a/archiva-jetty/pom.xml +++ b/archiva-jetty/pom.xml @@ -171,7 +171,6 @@ --> jetty.logs=%ARCHIVA_BASE%/logs java.io.tmpdir=%ARCHIVA_BASE%/temp - archiva.tmp.group.index.ttl=30 AsyncLogger.WaitStrategy=Sleep diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/DefaultIndexMerger.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/DefaultIndexMerger.java index e97de6ff8..4a53182f8 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/DefaultIndexMerger.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/DefaultIndexMerger.java @@ -19,6 +19,7 @@ package org.apache.archiva.indexer.merger; */ import com.google.common.io.Files; + import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.common.plexusbridge.MavenIndexerUtils; import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; @@ -35,7 +36,6 @@ import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; import javax.inject.Inject; import java.io.File; import java.io.IOException; @@ -70,8 +70,6 @@ public class DefaultIndexMerger private List temporaryGroupIndexes = new CopyOnWriteArrayList(); - private int groupMergedIndexTtl; - @Inject public DefaultIndexMerger( PlexusSisuBridge plexusSisuBridge, MavenIndexerUtils mavenIndexerUtils ) throws PlexusSisuBridgeException @@ -81,12 +79,6 @@ public class DefaultIndexMerger indexPacker = plexusSisuBridge.lookup( IndexPacker.class, "default" ); } - @PostConstruct - public void intialize() - { - this.groupMergedIndexTtl = Integer.getInteger( IndexMerger.TMP_GROUP_INDEX_SYS_KEY, DEFAULT_GROUP_INDEX_TTL ); - } - public IndexingContext buildMergedIndex( IndexMergerRequest indexMergerRequest ) throws IndexMergerException { @@ -170,9 +162,4 @@ public class DefaultIndexMerger { return this.temporaryGroupIndexes; } - - public int getGroupMergedIndexTtl() - { - return this.groupMergedIndexTtl; - } } diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMerger.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMerger.java index 462c3e4a1..756819e4f 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMerger.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMerger.java @@ -28,12 +28,6 @@ import java.util.Collection; */ public interface IndexMerger { - - /** - * system property which contains the value in s for ttl of temporary index groups - */ - String TMP_GROUP_INDEX_SYS_KEY = "archiva.tmp.group.index.ttl"; - /** * @param indexMergerRequest * @return a temporary directory with a merge index (directory marked deleteOnExit) @@ -45,10 +39,4 @@ public interface IndexMerger void cleanTemporaryGroupIndex( TemporaryGroupIndex temporaryGroupIndex ); Collection getTemporaryGroupIndexes(); - - /** - * @return ttl of temporay group index - */ - int getGroupMergedIndexTtl(); - } diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index 4e201b764..8d54be18d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -1013,7 +1013,6 @@ ${archiva.devMode} ${archiva.javascriptLog} ${archiva.logMissingI18n} - ${archiva.groupIndexTtl}