Reducing capabilities for repository group
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;
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 @@ private Path getRepositoryPath() {
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());
