summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorskygo <skygo@unknown>2013-06-01 14:40:42 +0000
committerskygo <skygo@unknown>2013-06-01 14:40:42 +0000
commit0c9c688ea99d35a1d474f535110d27a80dc6bbfb (patch)
tree6acef2127f1ae5b4097f6aacc647fd446e9eb011 /archiva-modules
parentad2961ba667e1760f924191b751ec93d3fcc8aca (diff)
downloadarchiva-0c9c688ea99d35a1d474f535110d27a80dc6bbfb.tar.gz
archiva-0c9c688ea99d35a1d474f535110d27a80dc6bbfb.zip
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-MRM-1756@1488531 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-artifact-converter/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-common/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo8
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-converter/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/DefaultIndexMerger.java17
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMerger.java12
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMergerRequest.java16
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java13
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java2
-rw-r--r--archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java2
-rw-r--r--archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml3
-rw-r--r--archiva-modules/archiva-base/archiva-maven2-model/pom.xml3
-rwxr-xr-xarchiva-modules/archiva-base/archiva-model/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-policies/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-proxy-api/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-proxy-common/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java26
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java10
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/group/RepositoryGroupAdminTest.java87
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-security-common/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-test-utils/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-transaction/pom.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-xml-tools/pom.xml2
-rw-r--r--archiva-modules/archiva-base/pom.xml2
-rw-r--r--archiva-modules/archiva-karaf/archiva-features/pom.xml2
-rw-r--r--archiva-modules/archiva-karaf/pom.xml2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml2
-rw-r--r--archiva-modules/archiva-scheduler/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml5
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java11
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoryGroupServiceTest.java4
-rw-r--r--archiva-modules/archiva-web/archiva-rest/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-rss/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java2
-rw-r--r--archiva-modules/archiva-web/archiva-security/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-test-mocks/pom.xml3
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties1
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/pom.xml3
-rw-r--r--[-rwxr-xr-x]archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/jqueryFileTree.css180
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html7
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java9
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java2
-rw-r--r--archiva-modules/archiva-web/pom.xml2
-rw-r--r--archiva-modules/metadata/metadata-model-maven2/pom.xml5
-rw-r--r--archiva-modules/metadata/metadata-model/pom.xml11
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java6
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java4
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java6
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java4
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java4
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java6
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectMetadata.java10
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java3
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java6
-rw-r--r--archiva-modules/metadata/metadata-repository-api/pom.xml2
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java27
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java82
-rw-r--r--archiva-modules/metadata/pom.xml2
-rw-r--r--archiva-modules/metadata/test-repository/pom.xml2
-rw-r--r--archiva-modules/plugins/audit/pom.xml2
-rw-r--r--archiva-modules/plugins/generic-metadata-support/pom.xml2
-rw-r--r--archiva-modules/plugins/maven1-repository/pom.xml2
-rw-r--r--archiva-modules/plugins/maven2-repository/pom.xml2
-rw-r--r--archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java12
-rw-r--r--archiva-modules/plugins/metadata-store-file/pom.xml2
-rw-r--r--archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java2
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/pom.xml2
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java4
-rw-r--r--archiva-modules/plugins/npanday-support/pom.xml2
-rw-r--r--archiva-modules/plugins/pom.xml2
-rw-r--r--archiva-modules/plugins/problem-reports/pom.xml2
-rw-r--r--archiva-modules/plugins/repository-statistics/pom.xml2
-rw-r--r--archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java4
-rw-r--r--archiva-modules/plugins/stage-repository-merge/pom.xml2
-rw-r--r--archiva-modules/pom.xml2
104 files changed, 484 insertions, 266 deletions
diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml
index b1ce59a85..9268570f0 100644
--- a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml
+++ b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-artifact-converter</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-checksum/pom.xml b/archiva-modules/archiva-base/archiva-checksum/pom.xml
index 2d481976a..a85ccb0a2 100644
--- a/archiva-modules/archiva-base/archiva-checksum/pom.xml
+++ b/archiva-modules/archiva-base/archiva-checksum/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-checksum</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-common/pom.xml b/archiva-modules/archiva-base/archiva-common/pom.xml
index b9d57c263..ddfb44350 100644
--- a/archiva-modules/archiva-base/archiva-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-common</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml
index 3068537d9..d253c77e4 100644
--- a/archiva-modules/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-configuration</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
index 43b383819..209e62b58 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
@@ -849,6 +849,14 @@
<description>The path of the merged index.</description>
</field>
<field>
+ <name>mergedIndexTtl</name>
+ <version>1.4.0+</version>
+ <type>int</type>
+ <required>false</required>
+ <defaultValue>30</defaultValue>
+ <description>The time to live of the merged index of the repository group.</description>
+ </field>
+ <field>
<name>repositories</name>
<version>1.2.0+</version>
<association>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
index bdceddfa2..92f8d12d9 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumers</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-consumer-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
index dd8cbd0e6..0e86f8263 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumers</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-consumer-archetype</artifactId>
<packaging>maven-archetype</packaging>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
index 5f3c2f63f..03e675077 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumers</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-core-consumers</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
index 00cd4d241..1426cab8f 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
@@ -173,7 +173,7 @@ public class TestMetadataRepository
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null;
}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
index c07595bf9..c66af5f2d 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumers</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-lucene-consumers</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
index 9b7d1bc02..6a2fab9f1 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>archiva-consumers</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-metadata-consumer</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
index b11a0e0a6..97d2da298 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumers</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-signature-consumers</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/pom.xml
index 2de964ed6..de25d15e6 100644
--- a/archiva-modules/archiva-base/archiva-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-consumers</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-converter/pom.xml b/archiva-modules/archiva-base/archiva-converter/pom.xml
index 180955a9e..098a46f9f 100644
--- a/archiva-modules/archiva-base/archiva-converter/pom.xml
+++ b/archiva-modules/archiva-base/archiva-converter/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-converter</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml
index 4070eb73c..f5e34fe98 100644
--- a/archiva-modules/archiva-base/archiva-indexer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-indexer</artifactId>
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 77618be8b..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<TemporaryGroupIndex> temporaryGroupIndexes = new CopyOnWriteArrayList<TemporaryGroupIndex>();
- 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
{
@@ -122,7 +114,7 @@ public class DefaultIndexMerger
indexPacker.packIndex( request );
}
temporaryGroupIndexes.add(
- new TemporaryGroupIndex( tempRepoFile, tempRepoId, indexMergerRequest.getGroupId() ) );
+ new TemporaryGroupIndex( tempRepoFile, tempRepoId, indexMergerRequest.getGroupId(), indexMergerRequest.getMergedIndexTtl() ) );
stopWatch.stop();
log.info( "merged index for repos {} in {} s", indexMergerRequest.getRepositoriesIds(),
stopWatch.getTime() );
@@ -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<TemporaryGroupIndex> getTemporaryGroupIndexes();
-
- /**
- * @return ttl of temporay group index
- */
- int getGroupMergedIndexTtl();
-
}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMergerRequest.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMergerRequest.java
index 76d238fd2..a7a3b656f 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMergerRequest.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/IndexMergerRequest.java
@@ -42,6 +42,8 @@ public class IndexMergerRequest
private String mergedIndexPath = "/.indexer";
+ private int mergedIndexTtl;
+
public IndexMergerRequest( Collection<String> repositoriesIds, boolean packIndex, String groupId )
{
this.repositoriesIds = repositoriesIds;
@@ -52,13 +54,14 @@ public class IndexMergerRequest
/**
* @since 1.4-M4
*/
- public IndexMergerRequest( Collection<String> repositoriesIds, boolean packIndex, String groupId,
- String mergedIndexPath )
+ public IndexMergerRequest(Collection<String> repositoriesIds, boolean packIndex, String groupId,
+ String mergedIndexPath, int mergedIndexTtl)
{
this.repositoriesIds = repositoriesIds;
this.packIndex = packIndex;
this.groupId = groupId;
this.mergedIndexPath = mergedIndexPath;
+ this.mergedIndexTtl = mergedIndexTtl;
}
public Collection<String> getRepositoriesIds()
@@ -101,6 +104,14 @@ public class IndexMergerRequest
this.mergedIndexPath = mergedIndexPath;
}
+ public int getMergedIndexTtl() {
+ return mergedIndexTtl;
+ }
+
+ public void setMergedIndexTtl(int mergedIndexTtl) {
+ this.mergedIndexTtl = mergedIndexTtl;
+ }
+
@Override
public String toString()
{
@@ -109,6 +120,7 @@ public class IndexMergerRequest
sb.append( ", packIndex=" ).append( packIndex );
sb.append( ", groupId='" ).append( groupId ).append( '\'' );
sb.append( ", mergedIndexPath='" ).append( mergedIndexPath ).append( '\'' );
+ sb.append( ", mergedIndexTtl='" ).append( mergedIndexTtl ).append( '\'' );
sb.append( '}' );
return sb.toString();
}
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java
index 9152160b0..9ab06d647 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndex.java
@@ -36,11 +36,14 @@ public class TemporaryGroupIndex
private String groupId;
- public TemporaryGroupIndex( File directory, String indexId, String groupId )
+ private int mergedIndexTtl;
+
+ public TemporaryGroupIndex(File directory, String indexId, String groupId, int mergedIndexTtl)
{
this.directory = directory;
this.indexId = indexId;
this.groupId = groupId;
+ this.mergedIndexTtl = mergedIndexTtl;
}
public long getCreationTime()
@@ -86,6 +89,14 @@ public class TemporaryGroupIndex
this.groupId = groupId;
}
+ public int getMergedIndexTtl() {
+ return mergedIndexTtl;
+ }
+
+ public void setMergedIndexTtl(int mergedIndexTtl) {
+ this.mergedIndexTtl = mergedIndexTtl;
+ }
+
@Override
public int hashCode()
{
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java
index e34b24991..322d82e06 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java
@@ -58,7 +58,7 @@ public class TemporaryGroupIndexCleaner
for ( TemporaryGroupIndex temporaryGroupIndex : indexMerger.getTemporaryGroupIndexes() )
{
// cleanup files older than the ttl
- if ( new Date().getTime() - temporaryGroupIndex.getCreationTime() > indexMerger.getGroupMergedIndexTtl() )
+ if ( new Date().getTime() - temporaryGroupIndex.getCreationTime() > temporaryGroupIndex.getMergedIndexTtl() )
{
log.info( "cleanTemporaryIndex for groupId {}", temporaryGroupIndex.getGroupId() );
indexMerger.cleanTemporaryGroupIndex( temporaryGroupIndex );
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java
index 66838594b..2acbcb57c 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java
@@ -256,7 +256,7 @@ public class MockRepositorySessionFactory
return false; //To change body of implemented methods use File | Settings | File Templates.
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
diff --git a/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml b/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
index 5584d802d..bc322bc03 100644
--- a/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
+++ b/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
@@ -22,11 +22,10 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-maven2-metadata</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Archiva Base :: Maven 2 Metadata</name>
diff --git a/archiva-modules/archiva-base/archiva-maven2-model/pom.xml b/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
index 6c5e17662..f97271731 100644
--- a/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
+++ b/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
@@ -22,11 +22,10 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-maven2-model</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Archiva Base :: Maven 2 Model</name>
diff --git a/archiva-modules/archiva-base/archiva-model/pom.xml b/archiva-modules/archiva-base/archiva-model/pom.xml
index a13aec642..dad15c4b8 100755
--- a/archiva-modules/archiva-base/archiva-model/pom.xml
+++ b/archiva-modules/archiva-base/archiva-model/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-model</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml b/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
index 339c95c70..8acffe4cc 100644
--- a/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
+++ b/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-plexus-bridge</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml
index 4716fb244..919b140ac 100644
--- a/archiva-modules/archiva-base/archiva-policies/pom.xml
+++ b/archiva-modules/archiva-base/archiva-policies/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-policies</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-proxy-api/pom.xml b/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
index f729a3946..52ee68c2e 100644
--- a/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-base</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-proxy-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-proxy-common/pom.xml b/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
index cc3285a0e..62c957399 100644
--- a/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-base</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-proxy-common</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index 2c0b46998..fd661ac1c 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-proxy</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
index d7c52cea3..533951968 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
@@ -178,7 +178,7 @@ public class TestMetadataRepository
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
index 8ecfc6ffd..66a0b7fda 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-admin</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-repository-admin-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
index 371e7d488..047724dbe 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RepositoryGroup.java
@@ -46,6 +46,11 @@ public class RepositoryGroup
*/
private String mergedIndexPath = "/.indexer";
+ /**
+ * The TTL (time to live) of the repo group's merged index.
+ */
+ private int mergedIndexTtl = 30;
+
public RepositoryGroup()
{
// no op
@@ -132,12 +137,29 @@ public class RepositoryGroup
this.mergedIndexPath = mergedIndexPath;
}
- public RepositoryGroup mergedIndexPath( String mergedIndexPath )
- {
+ public int getMergedIndexTtl() {
+ return mergedIndexTtl;
+ }
+
+ /**
+ * Set the TTL of the repo group's merged index.
+ *
+ * @param mergedIndexTtl
+ */
+ public void setMergedIndexTtl(int mergedIndexTtl) {
+ this.mergedIndexTtl = mergedIndexTtl;
+ }
+
+ public RepositoryGroup mergedIndexPath( String mergedIndexPath ) {
this.mergedIndexPath = mergedIndexPath;
return this;
}
+ public RepositoryGroup mergedIndexTtl( int mergedIndexTtl ) {
+ this.mergedIndexTtl = mergedIndexTtl;
+ return this;
+ }
+
public boolean equals( Object other )
{
if ( this == other )
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
index 168b02209..ee4b42c67 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-admin</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-repository-admin-default</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java
index 047b8494b..ef43c1042 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java
@@ -68,7 +68,7 @@ public class DefaultRepositoryGroupAdmin
{
repositoriesGroups.add( new RepositoryGroup( repositoryGroupConfiguration.getId(), new ArrayList<String>(
repositoryGroupConfiguration.getRepositories() ) ).mergedIndexPath(
- repositoryGroupConfiguration.getMergedIndexPath() ) );
+ repositoryGroupConfiguration.getMergedIndexPath() ).mergedIndexTtl( repositoryGroupConfiguration.getMergedIndexTtl() ) );
}
return repositoriesGroups;
@@ -93,10 +93,12 @@ public class DefaultRepositoryGroupAdmin
{
validateRepositoryGroup( repositoryGroup, false );
validateManagedRepositoriesExists( repositoryGroup.getRepositories() );
+
RepositoryGroupConfiguration repositoryGroupConfiguration = new RepositoryGroupConfiguration();
repositoryGroupConfiguration.setId( repositoryGroup.getId() );
repositoryGroupConfiguration.setRepositories( repositoryGroup.getRepositories() );
repositoryGroupConfiguration.setMergedIndexPath( repositoryGroup.getMergedIndexPath() );
+ repositoryGroupConfiguration.setMergedIndexTtl( repositoryGroup.getMergedIndexTtl() );
Configuration configuration = getArchivaConfiguration().getConfiguration();
configuration.addRepositoryGroup( repositoryGroupConfiguration );
saveConfiguration( configuration );
@@ -141,6 +143,7 @@ public class DefaultRepositoryGroupAdmin
repositoryGroupConfiguration.setRepositories( repositoryGroup.getRepositories() );
repositoryGroupConfiguration.setMergedIndexPath( repositoryGroup.getMergedIndexPath() );
+ repositoryGroupConfiguration.setMergedIndexTtl( repositoryGroup.getMergedIndexTtl() );
configuration.addRepositoryGroup( repositoryGroupConfiguration );
saveConfiguration( configuration );
@@ -282,6 +285,11 @@ public class DefaultRepositoryGroupAdmin
"Invalid character(s) found in identifier. Only the following characters are allowed: alphanumeric, '.', '-' and '_'" );
}
+ if ( repositoryGroup.getMergedIndexTtl() <= 0)
+ {
+ throw new RepositoryAdminException( "Merged Index TTL must be greater than 0." );
+ }
+
Configuration configuration = getArchivaConfiguration().getConfiguration();
if ( configuration.getRepositoryGroupsAsMap().containsKey( repoGroupId ) )
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java
index c594a9e75..7be9d6cb7 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java
@@ -256,7 +256,7 @@ public class MockRepositorySessionFactory
return false; //To change body of implemented methods use File | Settings | File Templates.
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/group/RepositoryGroupAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/group/RepositoryGroupAdminTest.java
index 84135d4d8..a79d724d0 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/group/RepositoryGroupAdminTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/group/RepositoryGroupAdminTest.java
@@ -18,6 +18,7 @@ package org.apache.archiva.admin.repository.group;
* under the License.
*/
+import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.admin.model.beans.RepositoryGroup;
import org.apache.archiva.admin.model.group.RepositoryGroupAdmin;
@@ -67,6 +68,10 @@ public class RepositoryGroupAdminTest
assertEquals( Arrays.asList( "test-new-one", "test-new-two" ),
repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getRepositories() );
+ // verify if default values were saved
+ assertEquals(30, repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexTtl() );
+ assertEquals("/.indexer", repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexPath() );
+
repositoryGroupAdmin.deleteRepositoryGroup( "repo-group-one", getFakeAuditInformation() );
assertEquals( 0, repositoryGroupAdmin.getRepositoriesGroups().size() );
@@ -100,7 +105,8 @@ public class RepositoryGroupAdminTest
managedRepositoryAdmin.addManagedRepository( managedRepositoryTwo, false, getFakeAuditInformation() );
- RepositoryGroup repositoryGroup = new RepositoryGroup( "repo-group-one", Arrays.asList( "test-new-one" ) );
+ RepositoryGroup repositoryGroup = new RepositoryGroup( "repo-group-one", Arrays.asList( "test-new-one" ) )
+ .mergedIndexTtl( 20 ).mergedIndexPath( "/.nonDefaultPath" );
mockAuditListener.clearEvents();
@@ -111,6 +117,8 @@ public class RepositoryGroupAdminTest
assertEquals( 1, repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getRepositories().size() );
assertEquals( Arrays.asList( "test-new-one" ),
repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getRepositories() );
+ assertEquals( 20, repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexTtl() );
+ assertEquals( "/.nonDefaultPath", repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexPath() );
repositoryGroup = repositoryGroupAdmin.getRepositoryGroup( "repo-group-one" );
assertNotNull( repositoryGroup );
@@ -143,9 +151,8 @@ public class RepositoryGroupAdminTest
}
}
-
@Test
- public void addAndDeleteGroupWithRemowingManagedRepo()
+ public void addAndDeleteGroupWithRemovedManagedRepo()
throws Exception
{
try
@@ -199,4 +206,78 @@ public class RepositoryGroupAdminTest
managedRepositoryAdmin.deleteManagedRepository( "test-new-two", getFakeAuditInformation(), true );
}
}
+
+ @Test( expected = RepositoryAdminException.class )
+ public void testAddGroupWithInvalidMergedIndexTtl() throws Exception {
+ try {
+ ManagedRepository managedRepositoryOne =
+ getTestManagedRepository( "test-new-one", APPSERVER_BASE_PATH + File.separator + "test-new-one" );
+
+ ManagedRepository managedRepositoryTwo =
+ getTestManagedRepository( "test-new-two", APPSERVER_BASE_PATH + File.separator + "test-new-two" );
+
+ managedRepositoryAdmin.addManagedRepository( managedRepositoryOne, false, getFakeAuditInformation() );
+
+ managedRepositoryAdmin.addManagedRepository( managedRepositoryTwo, false, getFakeAuditInformation() );
+
+ RepositoryGroup repositoryGroup =
+ new RepositoryGroup( "repo-group-one", Arrays.asList( "test-new-one", "test-new-two" ) )
+ .mergedIndexTtl( -1 );
+
+ mockAuditListener.clearEvents();
+
+ repositoryGroupAdmin.addRepositoryGroup( repositoryGroup, getFakeAuditInformation() );
+ }
+ finally
+ {
+ mockAuditListener.clearEvents();
+ managedRepositoryAdmin.deleteManagedRepository( "test-new-one", getFakeAuditInformation(), true );
+ managedRepositoryAdmin.deleteManagedRepository( "test-new-two", getFakeAuditInformation(), true );
+ }
+ }
+
+ @Test( expected = RepositoryAdminException.class )
+ public void testAddAndUpdateGroupWithInvalidMergedIndexTtl() throws Exception {
+ try {
+ ManagedRepository managedRepositoryOne =
+ getTestManagedRepository( "test-new-one", APPSERVER_BASE_PATH + File.separator + "test-new-one" );
+
+ ManagedRepository managedRepositoryTwo =
+ getTestManagedRepository( "test-new-two", APPSERVER_BASE_PATH + File.separator + "test-new-two" );
+
+ managedRepositoryAdmin.addManagedRepository( managedRepositoryOne, false, getFakeAuditInformation() );
+
+ managedRepositoryAdmin.addManagedRepository( managedRepositoryTwo, false, getFakeAuditInformation() );
+
+ RepositoryGroup repositoryGroup =
+ new RepositoryGroup( "repo-group-one", Arrays.asList( "test-new-one", "test-new-two" ) );
+
+ mockAuditListener.clearEvents();
+
+ repositoryGroupAdmin.addRepositoryGroup( repositoryGroup, getFakeAuditInformation() );
+
+ assertEquals( 1, repositoryGroupAdmin.getRepositoriesGroups().size() );
+ assertEquals( "repo-group-one", repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getId() );
+ assertEquals( 2, repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getRepositories().size() );
+ assertEquals( Arrays.asList( "test-new-one", "test-new-two" ),
+ repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getRepositories() );
+
+ // verify if default values were saved
+ assertEquals(30, repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexTtl() );
+ assertEquals("/.indexer", repositoryGroupAdmin.getRepositoriesGroups().get( 0 ).getMergedIndexPath() );
+
+ repositoryGroup = repositoryGroupAdmin.getRepositoryGroup( "repo-group-one" );
+ assertNotNull( repositoryGroup );
+
+ repositoryGroup.mergedIndexTtl( -1 );
+
+ repositoryGroupAdmin.updateRepositoryGroup( repositoryGroup, getFakeAuditInformation() );
+ }
+ finally
+ {
+ mockAuditListener.clearEvents();
+ managedRepositoryAdmin.deleteManagedRepository( "test-new-one", getFakeAuditInformation(), true );
+ managedRepositoryAdmin.deleteManagedRepository( "test-new-two", getFakeAuditInformation(), true );
+ }
+ }
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
index c92cae4e6..c531fd05b 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-repository-admin</artifactId>
<name>Archiva Base :: Repository Admin</name>
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
index 7571ad42c..46c6dc6c7 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-repository-layer</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
index 48c45607c..a33e050ca 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>archiva-base</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-repository-scanner</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-security-common/pom.xml b/archiva-modules/archiva-base/archiva-security-common/pom.xml
index 5381565c3..b5428aaf1 100644
--- a/archiva-modules/archiva-base/archiva-security-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-security-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-base</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-security-common</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-test-utils/pom.xml b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
index 5f8b149b2..78f221ee4 100644
--- a/archiva-modules/archiva-base/archiva-test-utils/pom.xml
+++ b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-base</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-test-utils</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-transaction/pom.xml b/archiva-modules/archiva-base/archiva-transaction/pom.xml
index 832b7610b..6b40cb60d 100644
--- a/archiva-modules/archiva-base/archiva-transaction/pom.xml
+++ b/archiva-modules/archiva-base/archiva-transaction/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-transaction</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-base/archiva-xml-tools/pom.xml b/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
index 1b726e4e6..67ffd959c 100644
--- a/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
+++ b/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-base</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-xml-tools</artifactId>
diff --git a/archiva-modules/archiva-base/pom.xml b/archiva-modules/archiva-base/pom.xml
index 10b001b7c..a9ce3f587 100644
--- a/archiva-modules/archiva-base/pom.xml
+++ b/archiva-modules/archiva-base/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-modules</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-base</artifactId>
diff --git a/archiva-modules/archiva-karaf/archiva-features/pom.xml b/archiva-modules/archiva-karaf/archiva-features/pom.xml
index e27bbe350..f3b0b1155 100644
--- a/archiva-modules/archiva-karaf/archiva-features/pom.xml
+++ b/archiva-modules/archiva-karaf/archiva-features/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-karaf</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.archiva.karaf</groupId>
diff --git a/archiva-modules/archiva-karaf/pom.xml b/archiva-modules/archiva-karaf/pom.xml
index 754ad00a9..81bcd589f 100644
--- a/archiva-modules/archiva-karaf/pom.xml
+++ b/archiva-modules/archiva-karaf/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-modules</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-karaf</artifactId>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
index 2208c0920..13befbf6e 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-scheduler</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-scheduler-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
index 986217a75..4cbdfb7a4 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-scheduler</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-scheduler-indexing</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java
index a42b6aeda..85c01299a 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java
@@ -256,7 +256,7 @@ public class MockRepositorySessionFactory
return false; //To change body of implemented methods use File | Settings | File Templates.
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
index 989c4d180..eee6c4170 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-scheduler</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-scheduler-repository-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
index 4ddd92dd0..e93e553a0 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-scheduler</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-scheduler-repository</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-scheduler/pom.xml b/archiva-modules/archiva-scheduler/pom.xml
index df0fe7289..95ea815dd 100644
--- a/archiva-modules/archiva-scheduler/pom.xml
+++ b/archiva-modules/archiva-scheduler/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-modules</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-scheduler</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
index effc430c0..84091a80c 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
@@ -17,13 +17,12 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>archiva-rest</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-rest-api</artifactId>
<!-- DO NOT USE bundle packaging generated documentation is not included in the jar !!! -->
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index a89d66cbe..9c47799b2 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rest</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-rest-services</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
index 4b1882bb4..1b5759101 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoryGroupService.java
@@ -52,7 +52,8 @@ public class DefaultRepositoryGroupService
for ( org.apache.archiva.admin.model.beans.RepositoryGroup repoGroup : repositoryGroupAdmin.getRepositoriesGroups() )
{
repositoriesGroups.add( new RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
- repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ) );
+ repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() )
+ .mergedIndexTtl( repoGroup.getMergedIndexTtl() ) );
}
return repositoriesGroups;
}
@@ -82,8 +83,8 @@ public class DefaultRepositoryGroupService
{
return repositoryGroupAdmin.addRepositoryGroup(
new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
- repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ),
- getAuditInformation() );
+ repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() )
+ .mergedIndexTtl( repoGroup.getMergedIndexTtl() ), getAuditInformation() );
}
catch ( RepositoryAdminException e )
{
@@ -98,8 +99,8 @@ public class DefaultRepositoryGroupService
{
return repositoryGroupAdmin.updateRepositoryGroup(
new org.apache.archiva.admin.model.beans.RepositoryGroup( repoGroup.getId(), new ArrayList<String>(
- repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() ),
- getAuditInformation() );
+ repoGroup.getRepositories() ) ).mergedIndexPath( repoGroup.getMergedIndexPath() )
+ .mergedIndexTtl( repoGroup.getMergedIndexTtl() ), getAuditInformation() );
}
catch ( RepositoryAdminException e )
{
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoryGroupServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoryGroupServiceTest.java
index c872d8268..017505859 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoryGroupServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoryGroupServiceTest.java
@@ -51,11 +51,13 @@ public class RepositoryGroupServiceTest
managedRepositoriesService.addManagedRepository( managedRepository );
- RepositoryGroup repositoryGroup = new RepositoryGroup( "one", Arrays.asList( managedRepository.getId() ) );
+ RepositoryGroup repositoryGroup = new RepositoryGroup( "one", Arrays.asList( managedRepository.getId() ) )
+ .mergedIndexTtl( 40 );
service.addRepositoryGroup( repositoryGroup );
assertFalse( service.getRepositoriesGroups().isEmpty() );
assertEquals( 1, service.getRepositoriesGroups().size() );
+ assertEquals( 40, service.getRepositoriesGroups().get(0).getMergedIndexTtl() );
service.deleteRepositoryGroup( "one" );
diff --git a/archiva-modules/archiva-web/archiva-rest/pom.xml b/archiva-modules/archiva-web/archiva-rest/pom.xml
index 42a2ad366..d442f3c97 100644
--- a/archiva-modules/archiva-web/archiva-rest/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-rest</artifactId>
<name>Archiva Web :: REST support</name>
diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml
index c5381d524..cb020f532 100644
--- a/archiva-modules/archiva-web/archiva-rss/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rss/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-web</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-rss</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
index b6f25bec5..a83f38301 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java
@@ -250,7 +250,7 @@ public class NewArtifactsRssFeedProcessorTest
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
throw new UnsupportedOperationException();
}
diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml
index 7e7ecfe1e..ccb2f31d2 100644
--- a/archiva-modules/archiva-web/archiva-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-security/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-security</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
index 47efd89f9..41e92218c 100644
--- a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
+++ b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
@@ -22,11 +22,10 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-test-mocks</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
<name>Archiva Web :: Tests Mocks</name>
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index 5ef279dd2..aff3b8f71 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-web-common</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
index c528c028b..c2f9f35b7 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
@@ -312,6 +312,7 @@ repository.groups.list=Repository Groups
repository-groups.grid.tab.title=Repository Groups
repository.group.delete.confirm=Are you sure to delete Repository Group {0} ?
repository.group.mergedIndexPath=Merged Index Path
+repository.group.mergedIndexTtl=Merged Index Time to Live (in Minutes)
#roles
roles.bulk.save.confirm=Are you sure to update {0} Role(s)
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
index 02d428515..8f9fc13bd 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java
@@ -220,7 +220,7 @@ public class TestMetadataRepository
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null;
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index a4a54e996..4e6192d4a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-webapp-test</artifactId>
<packaging>pom</packaging>
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 7707630fe..614ad32a1 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-webapp</artifactId>
<packaging>war</packaging>
@@ -1014,7 +1014,6 @@
<archiva.devMode>${archiva.devMode}</archiva.devMode>
<archiva.javascriptLog>${archiva.javascriptLog}</archiva.javascriptLog>
<archiva.logMissingI18n>${archiva.logMissingI18n}</archiva.logMissingI18n>
- <archiva.tmp.group.index.ttl>${archiva.groupIndexTtl}</archiva.tmp.group.index.ttl>
<!--
not needed as we use asyncLogger in configuration
<Log4jContextSelector>org.apache.logging.log4j.core.async.AsyncLoggerContextSelector</Log4jContextSelector>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/jqueryFileTree.css b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/jqueryFileTree.css
index 073d1fdec..b28dfc08e 100755..100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/jqueryFileTree.css
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/css/jqueryFileTree.css
@@ -1,91 +1,91 @@
-UL.jqueryFileTree {
- font-family: Verdana, sans-serif;
- font-size: 11px;
- line-height: 18px;
- padding: 0px;
- margin: 0px;
-}
-
-UL.jqueryFileTree LI {
- list-style: none;
- padding: 0px;
- padding-left: 20px;
- margin: 0px;
- white-space: nowrap;
-}
-
-UL.jqueryFileTree A {
- color: #333;
- text-decoration: none;
- display: block;
- padding: 0px 2px;
-}
-
-UL.jqueryFileTree A:hover {
- background: #BDF;
-}
-
-/* Core Styles */
-.jqueryFileTree LI.directory { background: url(images/folder-closed.gif) left top no-repeat; }
-.jqueryFileTree LI.expanded { background: url(images/folder.gif) left top no-repeat; }
-.jqueryFileTree LI.file { background: url(images/file.png) left top no-repeat; }
-.jqueryFileTree LI.wait { background: url(images/spinner.gif) left top no-repeat; }
-/* File Extensions*/
-.jqueryFileTree LI.ext_3gp { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_afp { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_afpa { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_asp { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_aspx { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_avi { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_bat { background: url(images/application.png) left top no-repeat; }
-.jqueryFileTree LI.ext_bmp { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_c { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_cfm { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_cgi { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_com { background: url(images/application.png) left top no-repeat; }
-.jqueryFileTree LI.ext_cpp { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_css { background: url(images/css.png) left top no-repeat; }
-.jqueryFileTree LI.ext_doc { background: url(images/doc.png) left top no-repeat; }
-.jqueryFileTree LI.ext_exe { background: url(images/application.png) left top no-repeat; }
-.jqueryFileTree LI.ext_gif { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_fla { background: url(images/flash.png) left top no-repeat; }
-.jqueryFileTree LI.ext_h { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_htm { background: url(images/html.png) left top no-repeat; }
-.jqueryFileTree LI.ext_html { background: url(images/html.png) left top no-repeat; }
-.jqueryFileTree LI.ext_jar { background: url(images/java.png) left top no-repeat; }
-.jqueryFileTree LI.ext_jpg { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_jpeg { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_js { background: url(images/script.png) left top no-repeat; }
-.jqueryFileTree LI.ext_lasso { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_log { background: url(images/txt.png) left top no-repeat; }
-.jqueryFileTree LI.ext_m4p { background: url(images/music.png) left top no-repeat; }
-.jqueryFileTree LI.ext_mov { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_mp3 { background: url(images/music.png) left top no-repeat; }
-.jqueryFileTree LI.ext_mp4 { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_mpg { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_mpeg { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_ogg { background: url(images/music.png) left top no-repeat; }
-.jqueryFileTree LI.ext_pcx { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_pdf { background: url(images/pdf.png) left top no-repeat; }
-.jqueryFileTree LI.ext_php { background: url(images/php.png) left top no-repeat; }
-.jqueryFileTree LI.ext_png { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_ppt { background: url(images/ppt.png) left top no-repeat; }
-.jqueryFileTree LI.ext_psd { background: url(images/psd.png) left top no-repeat; }
-.jqueryFileTree LI.ext_pl { background: url(images/script.png) left top no-repeat; }
-.jqueryFileTree LI.ext_py { background: url(images/script.png) left top no-repeat; }
-.jqueryFileTree LI.ext_rb { background: url(images/ruby.png) left top no-repeat; }
-.jqueryFileTree LI.ext_rbx { background: url(images/ruby.png) left top no-repeat; }
-.jqueryFileTree LI.ext_rhtml { background: url(images/ruby.png) left top no-repeat; }
-.jqueryFileTree LI.ext_rpm { background: url(images/linux.png) left top no-repeat; }
-.jqueryFileTree LI.ext_ruby { background: url(images/ruby.png) left top no-repeat; }
-.jqueryFileTree LI.ext_sql { background: url(images/db.png) left top no-repeat; }
-.jqueryFileTree LI.ext_swf { background: url(images/flash.png) left top no-repeat; }
-.jqueryFileTree LI.ext_tif { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_tiff { background: url(images/picture.png) left top no-repeat; }
-.jqueryFileTree LI.ext_txt { background: url(images/txt.png) left top no-repeat; }
-.jqueryFileTree LI.ext_vb { background: url(images/code.png) left top no-repeat; }
-.jqueryFileTree LI.ext_wav { background: url(images/music.png) left top no-repeat; }
-.jqueryFileTree LI.ext_wmv { background: url(images/film.png) left top no-repeat; }
-.jqueryFileTree LI.ext_xls { background: url(images/xls.png) left top no-repeat; }
-.jqueryFileTree LI.ext_xml { background: url(images/code.png) left top no-repeat; }
+UL.jqueryFileTree {
+ font-family: Verdana, sans-serif;
+ font-size: 11px;
+ line-height: 18px;
+ padding: 0px;
+ margin: 0px;
+}
+
+UL.jqueryFileTree LI {
+ list-style: none;
+ padding: 0px;
+ padding-left: 20px;
+ margin: 0px;
+ white-space: nowrap;
+}
+
+UL.jqueryFileTree A {
+ color: #333;
+ text-decoration: none;
+ display: block;
+ padding: 0px 2px;
+}
+
+UL.jqueryFileTree A:hover {
+ background: #BDF;
+}
+
+/* Core Styles */
+.jqueryFileTree LI.directory { background: url(images/folder-closed.gif) left top no-repeat; }
+.jqueryFileTree LI.expanded { background: url(images/folder.gif) left top no-repeat; }
+.jqueryFileTree LI.file { background: url(images/file.png) left top no-repeat; }
+.jqueryFileTree LI.wait { background: url(images/spinner.gif) left top no-repeat; }
+/* File Extensions*/
+.jqueryFileTree LI.ext_3gp { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_afp { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_afpa { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_asp { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_aspx { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_avi { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_bat { background: url(images/application.png) left top no-repeat; }
+.jqueryFileTree LI.ext_bmp { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_c { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_cfm { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_cgi { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_com { background: url(images/application.png) left top no-repeat; }
+.jqueryFileTree LI.ext_cpp { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_css { background: url(images/css.png) left top no-repeat; }
+.jqueryFileTree LI.ext_doc { background: url(images/doc.png) left top no-repeat; }
+.jqueryFileTree LI.ext_exe { background: url(images/application.png) left top no-repeat; }
+.jqueryFileTree LI.ext_gif { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_fla { background: url(images/flash.png) left top no-repeat; }
+.jqueryFileTree LI.ext_h { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_htm { background: url(images/html.png) left top no-repeat; }
+.jqueryFileTree LI.ext_html { background: url(images/html.png) left top no-repeat; }
+.jqueryFileTree LI.ext_jar { background: url(images/java.png) left top no-repeat; }
+.jqueryFileTree LI.ext_jpg { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_jpeg { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_js { background: url(images/script.png) left top no-repeat; }
+.jqueryFileTree LI.ext_lasso { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_log { background: url(images/txt.png) left top no-repeat; }
+.jqueryFileTree LI.ext_m4p { background: url(images/music.png) left top no-repeat; }
+.jqueryFileTree LI.ext_mov { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_mp3 { background: url(images/music.png) left top no-repeat; }
+.jqueryFileTree LI.ext_mp4 { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_mpg { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_mpeg { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_ogg { background: url(images/music.png) left top no-repeat; }
+.jqueryFileTree LI.ext_pcx { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_pdf { background: url(images/pdf.png) left top no-repeat; }
+.jqueryFileTree LI.ext_php { background: url(images/php.png) left top no-repeat; }
+.jqueryFileTree LI.ext_png { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_ppt { background: url(images/ppt.png) left top no-repeat; }
+.jqueryFileTree LI.ext_psd { background: url(images/psd.png) left top no-repeat; }
+.jqueryFileTree LI.ext_pl { background: url(images/script.png) left top no-repeat; }
+.jqueryFileTree LI.ext_py { background: url(images/script.png) left top no-repeat; }
+.jqueryFileTree LI.ext_rb { background: url(images/ruby.png) left top no-repeat; }
+.jqueryFileTree LI.ext_rbx { background: url(images/ruby.png) left top no-repeat; }
+.jqueryFileTree LI.ext_rhtml { background: url(images/ruby.png) left top no-repeat; }
+.jqueryFileTree LI.ext_rpm { background: url(images/linux.png) left top no-repeat; }
+.jqueryFileTree LI.ext_ruby { background: url(images/ruby.png) left top no-repeat; }
+.jqueryFileTree LI.ext_sql { background: url(images/db.png) left top no-repeat; }
+.jqueryFileTree LI.ext_swf { background: url(images/flash.png) left top no-repeat; }
+.jqueryFileTree LI.ext_tif { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_tiff { background: url(images/picture.png) left top no-repeat; }
+.jqueryFileTree LI.ext_txt { background: url(images/txt.png) left top no-repeat; }
+.jqueryFileTree LI.ext_vb { background: url(images/code.png) left top no-repeat; }
+.jqueryFileTree LI.ext_wav { background: url(images/music.png) left top no-repeat; }
+.jqueryFileTree LI.ext_wmv { background: url(images/film.png) left top no-repeat; }
+.jqueryFileTree LI.ext_xls { background: url(images/xls.png) left top no-repeat; }
+.jqueryFileTree LI.ext_xml { background: url(images/code.png) left top no-repeat; }
.jqueryFileTree LI.ext_zip { background: url(images/zip.png) left top no-repeat; } \ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
index 9435f207b..1f73a0dca 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
@@ -1442,6 +1442,13 @@
data-bind="value: repositoryGroup.mergedIndexPath"/>
</div>
</div>
+ <div class="control-group">
+ <label class="control-label" for="mergedIndexPath">${$.i18n.prop('repository.group.mergedIndexTtl')}</label>
+ <div class="controls">
+ <input type="text" class="input-large required" id="mergedIndexTtl" name="mergedIndexTtl"
+ data-bind="value: repositoryGroup.mergedIndexTtl"/>
+ </div>
+ </div>
<div>
<a href="${window.archivaRuntimeInfo.baseUrl}/repository/${repositoryGroup.id()}" target="_blank">
{{if repositoryGroup.id()}}
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index 8477ed45c..d5df9742a 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-webdav</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
index 954e8039c..d9d1754e8 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
@@ -1202,8 +1202,7 @@ public class ArchivaDavResourceFactory
if ( tmp != null && tmp.getDirectory() != null && tmp.getDirectory().exists() )
{
- if ( System.currentTimeMillis() - tmp.getCreationTime() > ( indexMerger.getGroupMergedIndexTtl() * 60
- * 1000 ) )
+ if ( System.currentTimeMillis() - tmp.getCreationTime() > ( repositoryGroupConfiguration.getMergedIndexTtl() * 60 * 1000 ) )
{
log.debug( MarkerFactory.getMarker( "group.merged.index" ),
"tmp group index '{}' is too old so delete it", repositoryGroupConfiguration.getId() );
@@ -1241,11 +1240,11 @@ public class ArchivaDavResourceFactory
repositoryGroupConfiguration.getId(), authzRepos );
IndexingContext indexingContext = indexMerger.buildMergedIndex(
new IndexMergerRequest( authzRepos, true, repositoryGroupConfiguration.getId(),
- repositoryGroupConfiguration.getMergedIndexPath() ) );
+ repositoryGroupConfiguration.getMergedIndexPath(), repositoryGroupConfiguration.getMergedIndexTtl() ) );
File mergedRepoDir = indexingContext.getIndexDirectoryFile();
TemporaryGroupIndex temporaryGroupIndex = new TemporaryGroupIndex( mergedRepoDir, indexingContext.getId(),
- repositoryGroupConfiguration.getId() ).setCreationTime(
- new Date().getTime() );
+ repositoryGroupConfiguration.getId(),repositoryGroupConfiguration.getMergedIndexTtl() )
+ .setCreationTime(new Date().getTime() );
temporaryGroupIndexMap.put( repositoryGroupConfiguration.getId(), temporaryGroupIndex );
session.setAttribute( TemporaryGroupIndexSessionCleaner.TEMPORARY_INDEX_SESSION_KEY,
temporaryGroupIndexMap );
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
index b07884a74..8fe7a6c29 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
@@ -174,7 +174,7 @@ public class TestMetadataRepository
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
return null;
}
diff --git a/archiva-modules/archiva-web/pom.xml b/archiva-modules/archiva-web/pom.xml
index d644536ca..46bbbd090 100644
--- a/archiva-modules/archiva-web/pom.xml
+++ b/archiva-modules/archiva-web/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-modules</artifactId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>archiva-web</artifactId>
diff --git a/archiva-modules/metadata/metadata-model-maven2/pom.xml b/archiva-modules/metadata/metadata-model-maven2/pom.xml
index 6c47c1a69..ba5b79c39 100644
--- a/archiva-modules/metadata/metadata-model-maven2/pom.xml
+++ b/archiva-modules/metadata/metadata-model-maven2/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata-model-maven2</artifactId>
<packaging>bundle</packaging>
@@ -53,7 +53,8 @@
</Export-Package>
<Import-Package>
javax.xml.bind.annotation,
- org.apache.commons.lang
+ org.apache.commons.lang,
+ javax.persistence
</Import-Package>
</instructions>
</configuration>
diff --git a/archiva-modules/metadata/metadata-model/pom.xml b/archiva-modules/metadata/metadata-model/pom.xml
index dbaa8eb7f..8c6fee915 100644
--- a/archiva-modules/metadata/metadata-model/pom.xml
+++ b/archiva-modules/metadata/metadata-model/pom.xml
@@ -22,12 +22,19 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata-model</artifactId>
<packaging>bundle</packaging>
<name>Archiva Metadata :: Model</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
@@ -41,7 +48,7 @@
org.apache.archiva.metadata.model;version=${project.version};-split-package:=merge-first
</Export-Package>
<Import-Package>
- javax.xml.bind.annotation
+ javax.xml.bind.annotation,javax.persistence
</Import-Package>
</instructions>
</configuration>
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java
index d58936d77..c52d6c258 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java
@@ -19,15 +19,19 @@ package org.apache.archiva.metadata.model;
* under the License.
*/
+import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
/**
* Information about the CI system used by the project.
*
* @todo considering moving this to a facet - avoid referring to it externally
*/
-@XmlRootElement( name = "ciManagement" )
+@XmlRootElement(name = "ciManagement")
+@Entity
public class CiManagement
+ implements Serializable
{
/**
* A simple identifier for the type of CI server used, eg <tt>continuum</tt>, <tt>bamboo</tt>, <tt>hudson</tt>, etc.
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java
index 14f9defe2..bf2a5b80e 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java
@@ -20,14 +20,16 @@ package org.apache.archiva.metadata.model;
*/
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
/**
* Information about a dependency that this project has on another project or artifact.
*
* @todo will be reviewing what is appropriate for the base here - rest should be in a maven dependency facet - avoid details on it externally
*/
-@XmlRootElement( name = "dependency" )
+@XmlRootElement(name = "dependency")
public class Dependency
+ implements Serializable
{
/**
* The Maven classifier of the dependency.
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java
index 12137ba43..4d304afaa 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java
@@ -19,15 +19,19 @@ package org.apache.archiva.metadata.model;
* under the License.
*/
+import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
/**
* Information about the issue management system used by the project.
*
* @todo considering moving this to a facet - avoid referring to it externally
*/
-@XmlRootElement( name = "issueManagement" )
+@XmlRootElement(name = "issueManagement")
+@Entity
public class IssueManagement
+ implements Serializable
{
/**
* A simple identifier for the type of issue management server used, eg <tt>jira</tt>, <tt>bugzilla</tt>, etc.
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
index 5fbb28015..e079690ad 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
@@ -20,12 +20,14 @@ package org.apache.archiva.metadata.model;
*/
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
/**
* A description of a particular license used by a project.
*/
-@XmlRootElement( name = "license" )
+@XmlRootElement(name = "license")
public class License
+ implements Serializable
{
/**
* The name of the license.
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java
index 922e2d5d8..ee35302d2 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java
@@ -1,6 +1,7 @@
package org.apache.archiva.metadata.model;
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
import java.util.List;
/*
@@ -27,8 +28,9 @@ import java.util.List;
*
* @todo considering moving this to a facet - avoid referring to it externally
*/
-@XmlRootElement( name = "mailingList" )
+@XmlRootElement(name = "mailingList")
public class MailingList
+ implements Serializable
{
/**
* The primary archive URL for this mailing list.
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java
index 23048cbed..9b8961399 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java
@@ -19,10 +19,14 @@ package org.apache.archiva.metadata.model;
* under the License.
*/
+import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
-@XmlRootElement( name = "organization" )
+@XmlRootElement(name = "organization")
+@Entity
public class Organization
+ implements Serializable
{
private String name;
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectMetadata.java
index 8db1f0116..c795bb5db 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectMetadata.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectMetadata.java
@@ -44,4 +44,14 @@ public class ProjectMetadata
{
this.namespace = namespace;
}
+
+ @Override
+ public String toString()
+ {
+ final StringBuilder sb = new StringBuilder( "ProjectMetadata{" );
+ sb.append( "namespace='" ).append( namespace ).append( '\'' );
+ sb.append( ", id='" ).append( id ).append( '\'' );
+ sb.append( '}' );
+ return sb.toString();
+ }
}
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
index d614bc990..015c10d05 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
@@ -27,6 +27,9 @@ import java.util.List;
public class ProjectVersionMetadata
extends FacetedMetadata
{
+ /**
+ * id is the version
+ */
private String id;
private String url;
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java
index 5e45e931f..ff9f704cd 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java
@@ -19,10 +19,14 @@ package org.apache.archiva.metadata.model;
* under the License.
*/
+import javax.persistence.Entity;
import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
-@XmlRootElement( name = "scm" )
+@XmlRootElement(name = "scm")
+@Entity
public class Scm
+ implements Serializable
{
private String connection;
diff --git a/archiva-modules/metadata/metadata-repository-api/pom.xml b/archiva-modules/metadata/metadata-repository-api/pom.xml
index f6a362315..370c9e6be 100644
--- a/archiva-modules/metadata/metadata-repository-api/pom.xml
+++ b/archiva-modules/metadata/metadata-repository-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata-repository-api</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
index 0a913c4bb..c4696f7e2 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
@@ -48,6 +48,12 @@ public interface MetadataRepository
ProjectVersionMetadata versionMetadata )
throws MetadataRepositoryException;
+ /**
+ * create the namespace in the repository. (if not exist)
+ * @param repositoryId
+ * @param namespace
+ * @throws MetadataRepositoryException
+ */
void updateNamespace( String repositoryId, String namespace )
throws MetadataRepositoryException;
@@ -77,6 +83,14 @@ public interface MetadataRepository
void removeMetadataFacet( String repositoryId, String facetId, String name )
throws MetadataRepositoryException;
+ /**
+ * if startTime or endTime are <code>null</code> they are not used for search
+ * @param repositoryId
+ * @param startTime can be <code>null</code>
+ * @param endTime can be <code>null</code>
+ * @return
+ * @throws MetadataRepositoryException
+ */
List<ArtifactMetadata> getArtifactsByDateRange( String repositoryId, Date startTime, Date endTime )
throws MetadataRepositoryException;
@@ -102,11 +116,12 @@ public interface MetadataRepository
throws MetadataRepositoryException;
/**
+ * Only remove {@link MetadataFacet} for the artifact
* @param repositoryId
* @param namespace
* @param project
* @param version
- * @param metadataFacet will remove artifacts which have this {@link MetadataFacet} using equals
+ * @param metadataFacet
* @throws MetadataRepositoryException
* @since 1.4-M3
*/
@@ -134,6 +149,14 @@ public interface MetadataRepository
List<ArtifactMetadata> getArtifacts( String repositoryId )
throws MetadataRepositoryException;
+ /**
+ * basically just checking it exists not complete data returned
+ * @param repoId
+ * @param namespace
+ * @param projectId
+ * @return
+ * @throws MetadataResolutionException
+ */
ProjectMetadata getProject( String repoId, String namespace, String projectId )
throws MetadataResolutionException;
@@ -213,6 +236,6 @@ public interface MetadataRepository
boolean canObtainAccess( Class<?> aClass );
- Object obtainAccess( Class<?> aClass )
+ <T>T obtainAccess( Class<T> aClass )
throws MetadataRepositoryException;
}
diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
index 285548d4e..201a8fe82 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java
@@ -164,8 +164,9 @@ public abstract class AbstractMetadataRepositoryTest
// test that namespace is also constructed
- Assertions.assertThat( repository.getRootNamespaces( TEST_REPO_ID ) ).isNotNull().isNotEmpty().contains(
- TEST_NAMESPACE ).hasSize( 1 );
+ Collection<String> namespaces = repository.getRootNamespaces( TEST_REPO_ID );
+
+ Assertions.assertThat( namespaces ).isNotNull().isNotEmpty().contains( TEST_NAMESPACE ).hasSize( 1 );
}
@Test
@@ -187,6 +188,7 @@ public abstract class AbstractMetadataRepositoryTest
// test that namespace and project is also constructed
assertEquals( Collections.singletonList( TEST_NAMESPACE ), repository.getRootNamespaces( TEST_REPO_ID ) );
ProjectMetadata projectMetadata = repository.getProject( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT );
+ assertNotNull( projectMetadata );
assertEquals( TEST_PROJECT, projectMetadata.getId() );
assertEquals( TEST_NAMESPACE, projectMetadata.getNamespace() );
}
@@ -348,9 +350,10 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateNamespace( TEST_REPO_ID, "namespace" );
repository.updateNamespace( OTHER_REPO_ID, "namespace" );
- assertEquals( "repository.getRepositories() -> " + repository.getRepositories(),
- Arrays.asList( TEST_REPO_ID, OTHER_REPO_ID ),
- new ArrayList<String>( repository.getRepositories() ) );
+ Collection<String> repositories = repository.getRepositories();
+
+ assertEquals( "repository.getRepositories() -> " + repositories, Arrays.asList( TEST_REPO_ID, OTHER_REPO_ID ),
+ new ArrayList<String>( repositories ) );
}
@Test
@@ -573,8 +576,10 @@ public abstract class AbstractMetadataRepositoryTest
{
repository.addMetadataFacet( TEST_REPO_ID, new TestMetadataFacet( TEST_VALUE ) );
- assertEquals( new TestMetadataFacet( TEST_VALUE ),
- repository.getMetadataFacet( TEST_REPO_ID, TEST_FACET_ID, TEST_NAME ) );
+ TestMetadataFacet test =
+ (TestMetadataFacet) repository.getMetadataFacet( TEST_REPO_ID, TEST_FACET_ID, TEST_NAME );
+
+ assertEquals( new TestMetadataFacet( TEST_VALUE ), test );
}
@Test
@@ -806,9 +811,10 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact1 );
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact2 );
- assertEquals( Collections.singleton( TEST_PROJECT_VERSION ),
- repository.getArtifactVersions( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT,
- TEST_PROJECT_VERSION ) );
+ Collection<String> versions =
+ repository.getArtifactVersions( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
+
+ assertEquals( Collections.singleton( TEST_PROJECT_VERSION ), versions );
}
@Test
@@ -819,8 +825,9 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
repository.save();
- assertEquals( Collections.singletonList( artifact ),
- repository.getArtifactsByDateRange( TEST_REPO_ID, null, null ) );
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, null, null );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -833,8 +840,9 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, namespace, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
repository.save();
- assertEquals( Collections.singletonList( artifact ),
- repository.getArtifactsByDateRange( TEST_REPO_ID, null, null ) );
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, null, null );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -846,8 +854,10 @@ public abstract class AbstractMetadataRepositoryTest
repository.save();
Date date = new Date( artifact.getWhenGathered().getTime() - 10000 );
- assertEquals( Collections.singletonList( artifact ),
- repository.getArtifactsByDateRange( TEST_REPO_ID, date, null ) );
+
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, date, null );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -858,7 +868,10 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
Date date = new Date( artifact.getWhenGathered().getTime() + 10000 );
- assertTrue( repository.getArtifactsByDateRange( TEST_REPO_ID, date, null ).isEmpty() );
+
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, date, null );
+
+ Assertions.assertThat( artifacts ).isNotNull().isEmpty();
}
@Test
@@ -871,8 +884,10 @@ public abstract class AbstractMetadataRepositoryTest
Date lower = new Date( artifact.getWhenGathered().getTime() - 10000 );
Date upper = new Date( artifact.getWhenGathered().getTime() + 10000 );
- assertEquals( Collections.singletonList( artifact ),
- repository.getArtifactsByDateRange( TEST_REPO_ID, lower, upper ) );
+
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, lower, upper );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -884,8 +899,10 @@ public abstract class AbstractMetadataRepositoryTest
repository.save();
Date upper = new Date( artifact.getWhenGathered().getTime() + 10000 );
- assertEquals( Collections.singletonList( artifact ),
- repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper ) );
+
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -897,7 +914,12 @@ public abstract class AbstractMetadataRepositoryTest
repository.save();
Date upper = new Date( artifact.getWhenGathered().getTime() - 10000 );
- assertTrue( repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper ).isEmpty() );
+
+ List<ArtifactMetadata> artifacts = repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper );
+
+ //assertTrue( .isEmpty() );
+
+ Assertions.assertThat( artifacts ).isNotNull().isEmpty();
}
@Test
@@ -908,7 +930,9 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
repository.save();
- assertEquals( Collections.singletonList( artifact ), repository.getArtifacts( TEST_REPO_ID ) );
+ List<ArtifactMetadata> artifacts = repository.getArtifacts( TEST_REPO_ID );
+
+ assertEquals( Collections.singletonList( artifact ), artifacts );
}
@Test
@@ -1191,13 +1215,17 @@ public abstract class AbstractMetadataRepositoryTest
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
- assertEquals( Collections.singletonList( artifact ), new ArrayList<ArtifactMetadata>(
- repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ) ) );
+ Collection<ArtifactMetadata> artifacts =
+ repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
+
+ assertEquals( Collections.singletonList( artifact ), new ArrayList<ArtifactMetadata>( artifacts ) );
repository.removeArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact.getId() );
- assertTrue(
- repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ).isEmpty() );
+ artifacts =
+ repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
+
+ Assertions.assertThat( artifacts ).isNotNull().isEmpty();
}
@Test
diff --git a/archiva-modules/metadata/pom.xml b/archiva-modules/metadata/pom.xml
index f6f41c9b4..12162d584 100644
--- a/archiva-modules/metadata/pom.xml
+++ b/archiva-modules/metadata/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-modules</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata</artifactId>
<name>Archiva :: Metadata</name>
diff --git a/archiva-modules/metadata/test-repository/pom.xml b/archiva-modules/metadata/test-repository/pom.xml
index 0e476ec6d..7e7ab4f58 100644
--- a/archiva-modules/metadata/test-repository/pom.xml
+++ b/archiva-modules/metadata/test-repository/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>test-repository</artifactId>
<name>Archiva Metadata :: Repository for Testing</name>
diff --git a/archiva-modules/plugins/audit/pom.xml b/archiva-modules/plugins/audit/pom.xml
index 99f131d1a..83ba0f3f6 100644
--- a/archiva-modules/plugins/audit/pom.xml
+++ b/archiva-modules/plugins/audit/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>audit</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/generic-metadata-support/pom.xml b/archiva-modules/plugins/generic-metadata-support/pom.xml
index e3fb3368f..83a839dd3 100644
--- a/archiva-modules/plugins/generic-metadata-support/pom.xml
+++ b/archiva-modules/plugins/generic-metadata-support/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>generic-metadata-support</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/maven1-repository/pom.xml b/archiva-modules/plugins/maven1-repository/pom.xml
index 71075b3c5..29911ce7f 100644
--- a/archiva-modules/plugins/maven1-repository/pom.xml
+++ b/archiva-modules/plugins/maven1-repository/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>maven1-repository</artifactId>
<name>Archiva Core Plugins :: Maven 1.x Repository Support</name>
diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml
index 94384eb85..f04751d44 100644
--- a/archiva-modules/plugins/maven2-repository/pom.xml
+++ b/archiva-modules/plugins/maven2-repository/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>maven2-repository</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
index ba4cc6952..251232738 100644
--- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
+++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java
@@ -176,27 +176,27 @@ public class TestMetadataRepository
public void save()
{
- //To change body of implemented methods use File | Settings | File Templates.
+ //
}
public void close()
{
- //To change body of implemented methods use File | Settings | File Templates.
+ //
}
public void revert()
{
- //To change body of implemented methods use File | Settings | File Templates.
+ //
}
public boolean canObtainAccess( Class<?> aClass )
{
- return false; //To change body of implemented methods use File | Settings | File Templates.
+ return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return null;
}
public void removeArtifact( String repositoryId, String namespace, String project, String version,
diff --git a/archiva-modules/plugins/metadata-store-file/pom.xml b/archiva-modules/plugins/metadata-store-file/pom.xml
index 1d4f1b572..def7ddb9e 100644
--- a/archiva-modules/plugins/metadata-store-file/pom.xml
+++ b/archiva-modules/plugins/metadata-store-file/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata-store-file</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
index f0a3abc33..7bc605f67 100644
--- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
@@ -559,7 +559,7 @@ public class FileMetadataRepository
return false;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
{
throw new IllegalArgumentException(
"Access using " + aClass + " is not supported on the file metadata storage" );
diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml
index a359bd35b..e24916fce 100644
--- a/archiva-modules/plugins/metadata-store-jcr/pom.xml
+++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>metadata-store-jcr</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
index 764387ee7..9336a0fcc 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
@@ -1256,14 +1256,14 @@ public class JcrMetadataRepository
return aClass == Session.class;
}
- public Object obtainAccess( Class<?> aClass )
+ public <T>T obtainAccess( Class<T> aClass )
throws MetadataRepositoryException
{
if ( aClass == Session.class )
{
try
{
- return getJcrSession();
+ return (T) getJcrSession();
}
catch ( RepositoryException e )
{
diff --git a/archiva-modules/plugins/npanday-support/pom.xml b/archiva-modules/plugins/npanday-support/pom.xml
index 67aa3bbaf..8bb1b13cb 100644
--- a/archiva-modules/plugins/npanday-support/pom.xml
+++ b/archiva-modules/plugins/npanday-support/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>npanday-support</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/pom.xml b/archiva-modules/plugins/pom.xml
index 3e8dd4698..cfe0c2c0d 100644
--- a/archiva-modules/plugins/pom.xml
+++ b/archiva-modules/plugins/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-modules</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>plugins</artifactId>
<name>Archiva :: Core Plugins</name>
diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml
index d649292d8..b51b72cf0 100644
--- a/archiva-modules/plugins/problem-reports/pom.xml
+++ b/archiva-modules/plugins/problem-reports/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>problem-reports</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/repository-statistics/pom.xml b/archiva-modules/plugins/repository-statistics/pom.xml
index 000cdb411..11c6ceba6 100644
--- a/archiva-modules/plugins/repository-statistics/pom.xml
+++ b/archiva-modules/plugins/repository-statistics/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<artifactId>repository-statistics</artifactId>
<packaging>bundle</packaging>
diff --git a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java
index c0ed85a16..e93405b55 100644
--- a/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java
+++ b/archiva-modules/plugins/repository-statistics/src/main/java/org/apache/archiva/metadata/repository/stats/DefaultRepositoryStatisticsManager.java
@@ -151,6 +151,8 @@ public class DefaultRepositoryStatisticsManager
long startGather = System.currentTimeMillis();
+ // FIXME what about other implementations ?
+
if ( metadataRepository.canObtainAccess( Session.class ) )
{
// TODO: this is currently very raw and susceptible to changes in content structure. Should we instead
@@ -168,7 +170,7 @@ public class DefaultRepositoryStatisticsManager
populateStatisticsFromRepositoryWalk( metadataRepository, repositoryId, repositoryStatistics );
}
- log.info( "Gathering statistics executed in " + ( System.currentTimeMillis() - startGather ) + "ms" );
+ log.info( "Gathering statistics executed in {} ms", ( System.currentTimeMillis() - startGather ) );
metadataRepository.addMetadataFacet( repositoryId, repositoryStatistics );
}
diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml
index a649a6b1f..38607efc2 100644
--- a/archiva-modules/plugins/stage-repository-merge/pom.xml
+++ b/archiva-modules/plugins/stage-repository-merge/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<groupId>org.apache.archiva</groupId>
<artifactId>stage-repository-merge</artifactId>
diff --git a/archiva-modules/pom.xml b/archiva-modules/pom.xml
index d6ac47991..a7997bd7e 100644
--- a/archiva-modules/pom.xml
+++ b/archiva-modules/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>archiva</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.4-M4-SNAPSHOT</version>
+ <version>1.4-M5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-modules</artifactId>