Search in sources :

Example 96 with StorageAsset

use of org.apache.archiva.repository.storage.StorageAsset in project archiva by apache.

the class Maven2RepositoryStorage method readProjectVersionMetadata.

@Override
public ProjectVersionMetadata readProjectVersionMetadata(ReadMetadataRequest readMetadataRequest) throws RepositoryStorageMetadataNotFoundException, RepositoryStorageMetadataInvalidException, RepositoryStorageRuntimeException {
    ManagedRepository managedRepository = repositoryRegistry.getManagedRepository(readMetadataRequest.getRepositoryId());
    boolean isReleases = managedRepository.getActiveReleaseSchemes().contains(ReleaseScheme.RELEASE);
    boolean isSnapshots = managedRepository.getActiveReleaseSchemes().contains(ReleaseScheme.SNAPSHOT);
    String artifactVersion = readMetadataRequest.getProjectVersion();
    // olamy: in case of browsing via the ui we can mix repos (parent of a SNAPSHOT can come from release repo)
    if (!readMetadataRequest.isBrowsingRequest()) {
        if (VersionUtil.isSnapshot(artifactVersion)) {
            // skygo trying to improve speed by honoring managed configuration MRM-1658
            if (isReleases && !isSnapshots) {
                throw new RepositoryStorageRuntimeException("lookforsnaponreleaseonly", "managed repo is configured for release only");
            }
        } else {
            if (!isReleases && isSnapshots) {
                throw new RepositoryStorageRuntimeException("lookforsreleaseonsneponly", "managed repo is configured for snapshot only");
            }
        }
    }
    StorageAsset basedir = managedRepository.getRoot();
    if (VersionUtil.isSnapshot(artifactVersion)) {
        StorageAsset metadataFile = pathTranslator.toFile(basedir, readMetadataRequest.getNamespace(), readMetadataRequest.getProjectId(), artifactVersion, METADATA_FILENAME);
        try {
            ArchivaRepositoryMetadata metadata = metadataReader.read(metadataFile);
            // re-adjust to timestamp if present, otherwise retain the original -SNAPSHOT filename
            SnapshotVersion snapshotVersion = metadata.getSnapshotVersion();
            if (snapshotVersion != null) {
                artifactVersion = // remove SNAPSHOT from end
                artifactVersion.substring(0, artifactVersion.length() - 8);
                artifactVersion = artifactVersion + snapshotVersion.getTimestamp() + "-" + snapshotVersion.getBuildNumber();
            }
        } catch (RepositoryMetadataException e) {
            // unable to parse metadata - LOGGER it, and continue with the version as the original SNAPSHOT version
            log.warn("Invalid metadata: {} - {}", metadataFile, e.getMessage());
        }
    }
    // TODO: won't work well with some other layouts, might need to convert artifact parts to ID by path translator
    String id = readMetadataRequest.getProjectId() + "-" + artifactVersion + ".pom";
    StorageAsset file = pathTranslator.toFile(basedir, readMetadataRequest.getNamespace(), readMetadataRequest.getProjectId(), readMetadataRequest.getProjectVersion(), id);
    if (!file.exists()) {
        // metadata could not be resolved
        throw new RepositoryStorageMetadataNotFoundException("The artifact's POM file '" + file.getPath() + "' was missing");
    }
    // TODO: this is a workaround until we can properly resolve using proxies as well - this doesn't cache
    // anything locally!
    List<RemoteRepository> remoteRepositories = new ArrayList<>();
    Map<String, NetworkProxy> networkProxies = new HashMap<>();
    Map<String, List<ProxyConnector>> proxyConnectorsMap = proxyRegistry.getProxyConnectorAsMap();
    List<ProxyConnector> proxyConnectors = proxyConnectorsMap.get(readMetadataRequest.getRepositoryId());
    if (proxyConnectors != null) {
        for (ProxyConnector proxyConnector : proxyConnectors) {
            RemoteRepository remoteRepoConfig = repositoryRegistry.getRemoteRepository(proxyConnector.getTargetRepository().getId());
            if (remoteRepoConfig != null) {
                remoteRepositories.add(remoteRepoConfig);
                NetworkProxy networkProxyConfig = proxyRegistry.getNetworkProxy(proxyConnector.getProxyId());
                if (networkProxyConfig != null) {
                    // key/value: remote repo ID/proxy info
                    networkProxies.put(proxyConnector.getTargetRepository().getId(), networkProxyConfig);
                }
            }
        }
    }
    // can have released parent pom
    if (readMetadataRequest.isBrowsingRequest()) {
        remoteRepositories.addAll(repositoryRegistry.getRemoteRepositories());
    }
    ModelBuildingRequest req = new DefaultModelBuildingRequest().setProcessPlugins(false).setPomFile(file.getFilePath().toFile()).setTwoPhaseBuilding(false).setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);
    // MRM-1607. olamy this will resolve jdk profiles on the current running archiva jvm
    req.setSystemProperties(System.getProperties());
    // MRM-1411
    req.setModelResolver(new RepositoryModelResolver(managedRepository, pathTranslator, wagonFactory, remoteRepositories, networkProxies, managedRepository, mavenSystemManager, metadataReader));
    Model model;
    try {
        model = builder.build(req).getEffectiveModel();
    } catch (ModelBuildingException e) {
        String msg = "The artifact's POM file '" + file + "' was invalid: " + e.getMessage();
        List<ModelProblem> modelProblems = e.getProblems();
        for (ModelProblem problem : modelProblems) {
            // but setTwoPhaseBuilding(true) fix that
            if (((problem.getException() instanceof FileNotFoundException || problem.getException() instanceof NoSuchFileException) && e.getModelId() != null && !e.getModelId().equals(problem.getModelId()))) {
                log.warn("The artifact's parent POM file '{}' cannot be resolved. " + "Using defaults for project version metadata..", file);
                ProjectVersionMetadata metadata = new ProjectVersionMetadata();
                metadata.setId(readMetadataRequest.getProjectVersion());
                MavenProjectFacet facet = new MavenProjectFacet();
                facet.setGroupId(readMetadataRequest.getNamespace());
                facet.setArtifactId(readMetadataRequest.getProjectId());
                facet.setPackaging("jar");
                metadata.addFacet(facet);
                String errMsg = "Error in resolving artifact's parent POM file. " + (problem.getException() == null ? problem.getMessage() : problem.getException().getMessage());
                RepositoryProblemFacet repoProblemFacet = new RepositoryProblemFacet();
                repoProblemFacet.setRepositoryId(readMetadataRequest.getRepositoryId());
                repoProblemFacet.setId(readMetadataRequest.getRepositoryId());
                repoProblemFacet.setMessage(errMsg);
                repoProblemFacet.setProblem(errMsg);
                repoProblemFacet.setProject(readMetadataRequest.getProjectId());
                repoProblemFacet.setVersion(readMetadataRequest.getProjectVersion());
                repoProblemFacet.setNamespace(readMetadataRequest.getNamespace());
                metadata.addFacet(repoProblemFacet);
                return metadata;
            }
        }
        throw new RepositoryStorageMetadataInvalidException("invalid-pom", msg, e);
    }
    // Check if the POM is in the correct location
    boolean correctGroupId = readMetadataRequest.getNamespace().equals(model.getGroupId());
    boolean correctArtifactId = readMetadataRequest.getProjectId().equals(model.getArtifactId());
    boolean correctVersion = readMetadataRequest.getProjectVersion().equals(model.getVersion());
    if (!correctGroupId || !correctArtifactId || !correctVersion) {
        StringBuilder message = new StringBuilder("Incorrect POM coordinates in '" + file + "':");
        if (!correctGroupId) {
            message.append("\nIncorrect group ID: ").append(model.getGroupId());
        }
        if (!correctArtifactId) {
            message.append("\nIncorrect artifact ID: ").append(model.getArtifactId());
        }
        if (!correctVersion) {
            message.append("\nIncorrect version: ").append(model.getVersion());
        }
        throw new RepositoryStorageMetadataInvalidException("mislocated-pom", message.toString());
    }
    ProjectVersionMetadata metadata = new ProjectVersionMetadata();
    metadata.setCiManagement(convertCiManagement(model.getCiManagement()));
    metadata.setDescription(model.getDescription());
    metadata.setId(readMetadataRequest.getProjectVersion());
    metadata.setIssueManagement(convertIssueManagement(model.getIssueManagement()));
    metadata.setLicenses(convertLicenses(model.getLicenses()));
    metadata.setMailingLists(convertMailingLists(model.getMailingLists()));
    metadata.setDependencies(convertDependencies(model.getDependencies()));
    metadata.setName(model.getName());
    metadata.setOrganization(convertOrganization(model.getOrganization()));
    metadata.setScm(convertScm(model.getScm()));
    metadata.setUrl(model.getUrl());
    metadata.setProperties(new HashMap<String, String>((Map) model.getProperties()));
    MavenProjectFacet facet = new MavenProjectFacet();
    facet.setGroupId(model.getGroupId() != null ? model.getGroupId() : model.getParent().getGroupId());
    facet.setArtifactId(model.getArtifactId());
    facet.setPackaging(model.getPackaging());
    if (model.getParent() != null) {
        MavenProjectParent parent = new MavenProjectParent();
        parent.setGroupId(model.getParent().getGroupId());
        parent.setArtifactId(model.getParent().getArtifactId());
        parent.setVersion(model.getParent().getVersion());
        facet.setParent(parent);
    }
    metadata.addFacet(facet);
    return metadata;
}
Also used : ModelBuildingRequest(org.apache.maven.model.building.ModelBuildingRequest) DefaultModelBuildingRequest(org.apache.maven.model.building.DefaultModelBuildingRequest) RepositoryStorageRuntimeException(org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException) ManagedRepository(org.apache.archiva.repository.ManagedRepository) HashMap(java.util.HashMap) ProjectVersionMetadata(org.apache.archiva.metadata.model.ProjectVersionMetadata) ArrayList(java.util.ArrayList) FileNotFoundException(java.io.FileNotFoundException) NoSuchFileException(java.nio.file.NoSuchFileException) RemoteRepository(org.apache.archiva.repository.RemoteRepository) NetworkProxy(org.apache.archiva.proxy.model.NetworkProxy) RepositoryStorageMetadataInvalidException(org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataInvalidException) RepositoryStorageMetadataNotFoundException(org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException) RepositoryMetadataException(org.apache.archiva.repository.metadata.RepositoryMetadataException) SnapshotVersion(org.apache.archiva.model.SnapshotVersion) ModelBuildingException(org.apache.maven.model.building.ModelBuildingException) List(java.util.List) ArrayList(java.util.ArrayList) MailingList(org.apache.maven.model.MailingList) ModelProblem(org.apache.maven.model.building.ModelProblem) ProxyConnector(org.apache.archiva.proxy.model.ProxyConnector) RepositoryProblemFacet(org.apache.archiva.metadata.model.facets.RepositoryProblemFacet) DefaultModelBuildingRequest(org.apache.maven.model.building.DefaultModelBuildingRequest) StorageAsset(org.apache.archiva.repository.storage.StorageAsset) Model(org.apache.maven.model.Model) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata) Map(java.util.Map) HashMap(java.util.HashMap)

Example 97 with StorageAsset

use of org.apache.archiva.repository.storage.StorageAsset in project archiva by apache.

the class RepositoryModelResolver method findTimeStampedSnapshotPom.

protected Path findTimeStampedSnapshotPom(String groupId, String artifactId, String version, Path parentDirectory) {
    // reading metadata if there
    Path mavenMetadata = parentDirectory.resolve(METADATA_FILENAME);
    if (Files.exists(mavenMetadata)) {
        try {
            ArchivaRepositoryMetadata archivaRepositoryMetadata = metadataReader.read(mavenMetadata);
            SnapshotVersion snapshotVersion = archivaRepositoryMetadata.getSnapshotVersion();
            if (snapshotVersion != null) {
                String lastVersion = snapshotVersion.getTimestamp();
                int buildNumber = snapshotVersion.getBuildNumber();
                String snapshotPath = StringUtils.replaceChars(groupId, '.', '/') + '/' + artifactId + '/' + version + '/' + artifactId + '-' + StringUtils.remove(version, "-" + VersionUtil.SNAPSHOT) + '-' + lastVersion + '-' + buildNumber + ".pom";
                log.debug("use snapshot path {} for maven coordinate {}:{}:{}", snapshotPath, groupId, artifactId, version);
                StorageAsset model = basedir.resolve(snapshotPath);
                // model = pathTranslator.toFile( basedir, groupId, artifactId, lastVersion, filename );
                if (model.exists()) {
                    return model.getFilePath();
                }
            }
        } catch (RepositoryMetadataException e) {
            log.warn("fail to read {}, {}", mavenMetadata.toAbsolutePath(), e.getCause());
        }
    }
    return null;
}
Also used : Path(java.nio.file.Path) RepositoryMetadataException(org.apache.archiva.repository.metadata.RepositoryMetadataException) SnapshotVersion(org.apache.archiva.model.SnapshotVersion) StorageAsset(org.apache.archiva.repository.storage.StorageAsset) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata)

Example 98 with StorageAsset

use of org.apache.archiva.repository.storage.StorageAsset in project archiva by apache.

the class RepositoryModelResolver method resolveModel.

@Override
public ModelSource resolveModel(String groupId, String artifactId, String version) throws UnresolvableModelException {
    String filename = artifactId + "-" + version + ".pom";
    // TODO: we need to convert 1.0-20091120.112233-1 type paths to baseVersion for the below call - add a test
    StorageAsset model = pathTranslator.toFile(basedir, groupId, artifactId, version, filename);
    if (!model.exists()) {
        // is a SNAPSHOT ? so we can try to find locally before asking remote repositories.
        if (StringUtils.contains(version, VersionUtil.SNAPSHOT)) {
            Path localSnapshotModel = findTimeStampedSnapshotPom(groupId, artifactId, version, model.getParent().getFilePath());
            if (localSnapshotModel != null) {
                return new FileModelSource(localSnapshotModel.toFile());
            }
        }
        for (RemoteRepository remoteRepository : remoteRepositories) {
            try {
                boolean success = getModelFromProxy(remoteRepository, groupId, artifactId, version, filename);
                if (success && model.exists()) {
                    log.info("Model '{}' successfully retrieved from remote repository '{}'", model.getPath(), remoteRepository.getId());
                    break;
                }
            } catch (ResourceDoesNotExistException e) {
                log.info("An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}", model.getPath(), remoteRepository.getId(), e.getMessage());
            } catch (Exception e) {
                log.warn("An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}", model.getPath(), remoteRepository.getId(), e.getMessage());
                continue;
            }
        }
    }
    return new FileModelSource(model.getFilePath().toFile());
}
Also used : Path(java.nio.file.Path) FileModelSource(org.apache.maven.model.building.FileModelSource) StorageAsset(org.apache.archiva.repository.storage.StorageAsset) RemoteRepository(org.apache.archiva.repository.RemoteRepository) ResourceDoesNotExistException(org.apache.maven.wagon.ResourceDoesNotExistException) AuthenticationException(org.apache.maven.wagon.authentication.AuthenticationException) InvalidRepositoryException(org.apache.maven.model.resolution.InvalidRepositoryException) UnresolvableModelException(org.apache.maven.model.resolution.UnresolvableModelException) VersionRangeResolutionException(org.eclipse.aether.resolution.VersionRangeResolutionException) RepositoryMetadataException(org.apache.archiva.repository.metadata.RepositoryMetadataException) TransferFailedException(org.apache.maven.wagon.TransferFailedException) ConnectionException(org.apache.maven.wagon.ConnectionException) AuthorizationException(org.apache.maven.wagon.authorization.AuthorizationException) IOException(java.io.IOException) ResourceDoesNotExistException(org.apache.maven.wagon.ResourceDoesNotExistException) WagonFactoryException(org.apache.archiva.maven.common.proxy.WagonFactoryException)

Example 99 with StorageAsset

use of org.apache.archiva.repository.storage.StorageAsset in project archiva by apache.

the class Maven2RepositoryStorage method isProjectVersion.

private boolean isProjectVersion(StorageAsset dir) {
    final String artifactId = dir.getParent().getName();
    final String projectVersion = dir.getName();
    // check if there is a POM artifact file to ensure it is a version directory
    Predicate<StorageAsset> filter;
    if (VersionUtil.isSnapshot(projectVersion)) {
        filter = new PomFilenameFilter(artifactId, projectVersion);
    } else {
        final String pomFile = artifactId + "-" + projectVersion + ".pom";
        filter = new PomFileFilter(pomFile);
    }
    if (dir.list().stream().filter(f -> !f.isContainer()).anyMatch(filter)) {
        return true;
    }
    // if a metadata file is present, check if this is the "version" directory, marking it as a project version
    ArchivaRepositoryMetadata metadata = readMetadata(dir);
    if (metadata != null && projectVersion.equals(metadata.getVersion())) {
        return true;
    }
    return false;
}
Also used : NoSuchFileException(java.nio.file.NoSuchFileException) Arrays(java.util.Arrays) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata) Filter(org.apache.archiva.filter.Filter) RepositoryStorageRuntimeException(org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException) StorageAsset(org.apache.archiva.repository.storage.StorageAsset) ZonedDateTime(java.time.ZonedDateTime) LoggerFactory(org.slf4j.LoggerFactory) DefaultModelBuilderFactory(org.apache.maven.model.building.DefaultModelBuilderFactory) RepositoryProblemFacet(org.apache.archiva.metadata.model.facets.RepositoryProblemFacet) StringUtils(org.apache.commons.lang3.StringUtils) ReleaseScheme(org.apache.archiva.repository.ReleaseScheme) MavenSystemManager(org.apache.archiva.maven.repository.MavenSystemManager) ModelBuilder(org.apache.maven.model.building.ModelBuilder) RepositoryProxyHandler(org.apache.archiva.proxy.model.RepositoryProxyHandler) Map(java.util.Map) ProjectMetadata(org.apache.archiva.metadata.model.ProjectMetadata) MavenMetadataReader(org.apache.archiva.maven.metadata.MavenMetadataReader) ItemSelector(org.apache.archiva.repository.content.ItemSelector) Try(org.apache.archiva.common.Try) ArtifactMetadata(org.apache.archiva.metadata.model.ArtifactMetadata) ContentItem(org.apache.archiva.repository.content.ContentItem) Predicate(java.util.function.Predicate) ProxyRegistry(org.apache.archiva.proxy.ProxyRegistry) Collection(java.util.Collection) RepositoryRegistry(org.apache.archiva.repository.RepositoryRegistry) ProxyDownloadException(org.apache.archiva.policies.ProxyDownloadException) ProxyConnector(org.apache.archiva.proxy.model.ProxyConnector) XmlPullParserException(org.codehaus.plexus.util.xml.pull.XmlPullParserException) Set(java.util.Set) NetworkProxy(org.apache.archiva.proxy.model.NetworkProxy) Reader(java.io.Reader) WagonFactory(org.apache.archiva.maven.common.proxy.WagonFactory) Collectors(java.util.stream.Collectors) Scm(org.apache.maven.model.Scm) FileNotFoundException(java.io.FileNotFoundException) ZoneId(java.time.ZoneId) ManagedRepository(org.apache.archiva.repository.ManagedRepository) Relocation(org.apache.maven.model.Relocation) Organization(org.apache.maven.model.Organization) List(java.util.List) DistributionManagement(org.apache.maven.model.DistributionManagement) ReadMetadataRequest(org.apache.archiva.metadata.repository.storage.ReadMetadataRequest) ModelBuildingRequest(org.apache.maven.model.building.ModelBuildingRequest) PostConstruct(javax.annotation.PostConstruct) BaseRepositoryContentLayout(org.apache.archiva.repository.content.BaseRepositoryContentLayout) MavenXpp3Reader(org.apache.maven.model.io.xpp3.MavenXpp3Reader) Model(org.apache.maven.model.Model) RepositoryStorageMetadataNotFoundException(org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException) Artifact(org.apache.archiva.repository.content.Artifact) CiManagement(org.apache.maven.model.CiManagement) RepositoryPathTranslator(org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator) RelocationException(org.apache.archiva.metadata.repository.storage.RelocationException) Dependency(org.apache.maven.model.Dependency) ArchivaItemSelector(org.apache.archiva.repository.content.base.ArchivaItemSelector) ArrayUtils(org.apache.commons.lang3.ArrayUtils) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ProjectVersionMetadata(org.apache.archiva.metadata.model.ProjectVersionMetadata) RemoteRepository(org.apache.archiva.repository.RemoteRepository) Charset(java.nio.charset.Charset) Service(org.springframework.stereotype.Service) ChecksumAlgorithm(org.apache.archiva.checksum.ChecksumAlgorithm) RepositoryMetadataException(org.apache.archiva.repository.metadata.RepositoryMetadataException) Named(javax.inject.Named) IssueManagement(org.apache.maven.model.IssueManagement) ManagedRepositoryContent(org.apache.archiva.repository.ManagedRepositoryContent) SnapshotVersion(org.apache.archiva.model.SnapshotVersion) Logger(org.slf4j.Logger) ModelBuildingException(org.apache.maven.model.building.ModelBuildingException) Channels(java.nio.channels.Channels) VersionUtil(org.apache.archiva.common.utils.VersionUtil) IOException(java.io.IOException) License(org.apache.maven.model.License) RepositoryType(org.apache.archiva.repository.RepositoryType) ApplicationContext(org.springframework.context.ApplicationContext) ChecksummedFile(org.apache.archiva.checksum.ChecksummedFile) ModelProblem(org.apache.maven.model.building.ModelProblem) RepositoryStorageMetadataInvalidException(org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataInvalidException) DefaultModelBuildingRequest(org.apache.maven.model.building.DefaultModelBuildingRequest) MailingList(org.apache.maven.model.MailingList) LayoutException(org.apache.archiva.repository.content.LayoutException) Collections(java.util.Collections) RepositoryStorage(org.apache.archiva.metadata.repository.storage.RepositoryStorage) StorageAsset(org.apache.archiva.repository.storage.StorageAsset) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata)

Example 100 with StorageAsset

use of org.apache.archiva.repository.storage.StorageAsset in project archiva by apache.

the class ManagedDefaultRepositoryContentTest method testGetNamespaceFromPath.

@Test
public void testGetNamespaceFromPath() throws LayoutException {
    StorageAsset path = repoContent.getRepository().getAsset("/org/apache/axis2");
    Namespace ns = repoContent.getNamespaceFromPath(path);
    assertNotNull(ns);
    assertEquals("org.apache.axis2", ns.getId());
}
Also used : StorageAsset(org.apache.archiva.repository.storage.StorageAsset) Namespace(org.apache.archiva.repository.content.Namespace) Test(org.junit.Test)

Aggregations

StorageAsset (org.apache.archiva.repository.storage.StorageAsset)191 Path (java.nio.file.Path)91 BaseRepositoryContentLayout (org.apache.archiva.repository.content.BaseRepositoryContentLayout)61 IOException (java.io.IOException)59 Test (org.junit.Test)59 Artifact (org.apache.archiva.repository.content.Artifact)54 ManagedRepository (org.apache.archiva.repository.ManagedRepository)27 ArchivaIndexingContext (org.apache.archiva.indexer.ArchivaIndexingContext)22 ArchivaRepositoryMetadata (org.apache.archiva.model.ArchivaRepositoryMetadata)22 List (java.util.List)20 Inject (javax.inject.Inject)20 RepositoryMetadataException (org.apache.archiva.repository.metadata.RepositoryMetadataException)20 Collectors (java.util.stream.Collectors)19 RemoteRepository (org.apache.archiva.repository.RemoteRepository)19 IndexingContext (org.apache.maven.index.context.IndexingContext)19 FilesystemStorage (org.apache.archiva.repository.storage.fs.FilesystemStorage)18 StringUtils (org.apache.commons.lang3.StringUtils)18 Logger (org.slf4j.Logger)18 LoggerFactory (org.slf4j.LoggerFactory)18 Map (java.util.Map)17