From: Martin Stockhammer Date: Sat, 25 May 2019 08:31:48 +0000 (+0200) Subject: Reducing capabilities for repository group X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=922d543915514edccdf74ad9e0060a351b8823ac;p=archiva.git Reducing capabilities for repository group --- diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryGroup.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryGroup.java index e9845ba99..24c0b958d 100644 --- a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryGroup.java +++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryGroup.java @@ -22,13 +22,11 @@ package org.apache.archiva.repository.maven2; import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.repository.*; import org.apache.archiva.repository.content.FilesystemStorage; -import org.apache.archiva.repository.features.ArtifactCleanupFeature; -import org.apache.archiva.repository.features.IndexCreationFeature; -import org.apache.archiva.repository.features.StagingRepositoryFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; import java.util.Locale; @@ -38,12 +36,11 @@ public class MavenRepositoryGroup extends AbstractRepositoryGroup implements Edi new ReleaseScheme[] { ReleaseScheme.RELEASE, ReleaseScheme.SNAPSHOT }, new String[] { MavenManagedRepository.DEFAULT_LAYOUT, MavenManagedRepository.LEGACY_LAYOUT}, new String[] {}, - new String[] {ArtifactCleanupFeature.class.getName(), IndexCreationFeature.class.getName(), - StagingRepositoryFeature.class.getName()}, - true, - true, - true, - true, + new String[] {}, + false, + false, + false, + false, false ); @@ -71,6 +68,10 @@ public class MavenRepositoryGroup extends AbstractRepositoryGroup implements Edi private void init() { setCapabilities(CAPABILITIES); try { + Path repoPath = getRepositoryPath(); + if (!Files.exists(repoPath)) { + Files.createDirectories(repoPath); + } fsStorage = new FilesystemStorage(getRepositoryPath(), lockManager); } catch (IOException e) { log.error("IOException while initializing repository group with path {}",getRepositoryBase());