diff options
author | Martin Stockhammer <martin_s@apache.org> | 2019-05-25 10:31:48 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2019-05-25 10:31:48 +0200 |
commit | 922d543915514edccdf74ad9e0060a351b8823ac (patch) | |
tree | f0f58152dd760ede49e0fcb551ee895774de8dd8 /archiva-modules | |
parent | 12c05a8d1ac41cac0b494dabac43790ade273ea4 (diff) | |
download | archiva-922d543915514edccdf74ad9e0060a351b8823ac.tar.gz archiva-922d543915514edccdf74ad9e0060a351b8823ac.zip |
Reducing capabilities for repository group
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryGroup.java | 19 |
1 files changed, 10 insertions, 9 deletions
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()); |