Search in sources :

Example 1 with CompressingTempFileStore

use of org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore in project nexus-public by sonatype.

the class AptHostedFacet method buildPackageIndexes.

private CompressingTempFileStore buildPackageIndexes(final List<AssetChange> changes) throws IOException {
    CompressingTempFileStore result = new CompressingTempFileStore();
    Map<String, Writer> streams = new HashMap<>();
    boolean ok = false;
    try {
        Set<String> architectures = changes.stream().map(change -> getArchitecture(change.getAsset())).collect(Collectors.toSet());
        final Continuation<FluentAsset> allAssets = getRepository().facet(ContentFacet.class).assets().byKind(DEB).browse(Integer.MAX_VALUE, null);
        allAssets.stream().map(this::getArchitecture).collect(Collectors.toCollection(() -> architectures));
        Map<String, List<FluentAsset>> assetsPerArch = new HashMap<>();
        for (String architecture : architectures) {
            List<FluentAsset> assets = allAssets.stream().filter(asset -> getArchitecture(asset).equals(architecture)).collect(Collectors.toList());
            assetsPerArch.put(architecture, assets);
        }
        for (List<FluentAsset> assets : assetsPerArch.values()) {
            Optional<AssetChange> removeAssetChange = changes.stream().filter(change -> change.getAsset().kind().equals(DEB)).filter(change -> change.getAction() == AssetAction.REMOVED).findAny();
            if (assets.isEmpty() && removeAssetChange.isPresent()) {
                createEmptyMetadataFile(result, streams, removeAssetChange.get());
            } else {
                createMetadataFileWithData(changes, result, streams, assets);
            }
        }
        ok = true;
    } finally {
        for (Writer writer : streams.values()) {
            IOUtils.closeQuietly(writer);
        }
        if (!ok) {
            result.close();
        }
    }
    return result;
}
Also used : GZ(org.sonatype.nexus.repository.apt.internal.AptProperties.GZ) Arrays(java.util.Arrays) ControlFile(org.sonatype.nexus.repository.apt.internal.debian.ControlFile) Date(java.util.Date) FluentAsset(org.sonatype.nexus.repository.content.fluent.FluentAsset) BytesPayload(org.sonatype.nexus.repository.view.payloads.BytesPayload) StringUtils(org.apache.commons.lang3.StringUtils) AptContentFacet(org.sonatype.nexus.repository.apt.datastore.AptContentFacet) RELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE) StreamPayload(org.sonatype.nexus.repository.view.payloads.StreamPayload) Map(java.util.Map) FormatAttributesUtils(org.sonatype.nexus.repository.content.utils.FormatAttributesUtils) AssetAction(org.sonatype.nexus.repository.apt.internal.hosted.AssetAction) TimeZone(java.util.TimeZone) Collection(java.util.Collection) FacetSupport(org.sonatype.nexus.repository.FacetSupport) Set(java.util.Set) Collectors(java.util.stream.Collectors) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) Writer(java.io.Writer) Optional(java.util.Optional) P_INDEX_SECTION(org.sonatype.nexus.repository.apt.internal.AptProperties.P_INDEX_SECTION) INRELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.INRELEASE) Continuation(org.sonatype.nexus.common.entity.Continuation) Paragraph(org.sonatype.nexus.repository.apt.internal.debian.ControlFile.Paragraph) MD5(org.sonatype.nexus.common.hash.HashAlgorithm.MD5) RELEASE_GPG(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE_GPG) HashMap(java.util.HashMap) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) BZ2(org.sonatype.nexus.repository.apt.internal.AptProperties.BZ2) Payload(org.sonatype.nexus.repository.view.Payload) DEB(org.sonatype.nexus.repository.apt.internal.AptProperties.DEB) Named(javax.inject.Named) PackageInfo(org.sonatype.nexus.repository.apt.internal.debian.PackageInfo) PATTERN_RFC1123(org.apache.http.protocol.HttpDateGenerator.PATTERN_RFC1123) Charsets(com.google.common.base.Charsets) ContentFacet(org.sonatype.nexus.repository.content.facet.ContentFacet) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) IOException(java.io.IOException) Facet(org.sonatype.nexus.repository.Facet) AptSigningFacet(org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet) SHA256(org.sonatype.nexus.common.hash.HashAlgorithm.SHA256) P_ARCHITECTURE(org.sonatype.nexus.repository.apt.internal.AptProperties.P_ARCHITECTURE) AptMimeTypes(org.sonatype.nexus.repository.apt.internal.AptMimeTypes) AssetBlob(org.sonatype.nexus.repository.content.AssetBlob) HashAlgorithm(org.sonatype.nexus.common.hash.HashAlgorithm) Collections(java.util.Collections) DateFormatUtils(org.apache.commons.lang3.time.DateFormatUtils) HashMap(java.util.HashMap) AptContentFacet(org.sonatype.nexus.repository.apt.datastore.AptContentFacet) ContentFacet(org.sonatype.nexus.repository.content.facet.ContentFacet) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) List(java.util.List) Writer(java.io.Writer) FluentAsset(org.sonatype.nexus.repository.content.fluent.FluentAsset)

Example 2 with CompressingTempFileStore

use of org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore in project nexus-public by sonatype.

the class OrientAptHostedFacet method buildPackageIndexes.

private CompressingTempFileStore buildPackageIndexes(final StorageTx tx, final Bucket bucket, final List<AssetChange> changes) throws IOException {
    CompressingTempFileStore result = new CompressingTempFileStore();
    Map<String, Writer> streams = new HashMap<>();
    boolean ok = false;
    try {
        Map<String, Object> sqlParams = new HashMap<>();
        sqlParams.put(P_BUCKET, AttachedEntityHelper.id(bucket));
        sqlParams.put(P_ASSET_KIND, "DEB");
        // NOTE:  We exclude added assets as well to account for the case where we are replacing an asset
        Set<String> excludeNames = changes.stream().map(change -> change.asset.name()).collect(Collectors.toSet());
        Iterable<ODocument> browse = tx.browse(SELECT_HOSTED_ASSETS, sqlParams);
        for (ODocument document : browse) {
            String name = document.field(P_NAME, String.class);
            String arch = document.field(P_ARCHITECTURE, String.class);
            Writer outWriter = streams.computeIfAbsent(arch, result::openOutput);
            if (!excludeNames.contains(name)) {
                String indexSection = document.field(P_INDEX_SECTION, String.class);
                outWriter.write(indexSection);
                outWriter.write("\n\n");
            }
        }
        List<Asset> addAssets = changes.stream().filter(change -> change.action == AssetAction.ADDED).map(change -> change.asset).collect(Collectors.toList());
        // HACK: tx.browse won't see changes in the current transaction, so we have to manually add these in here
        for (Asset asset : addAssets) {
            String arch = asset.formatAttributes().get(P_ARCHITECTURE, String.class);
            String indexSection = asset.formatAttributes().get(P_INDEX_SECTION, String.class);
            Writer outWriter = streams.computeIfAbsent(arch, result::openOutput);
            outWriter.write(indexSection);
            outWriter.write("\n\n");
        }
        ok = true;
    } finally {
        for (Writer writer : streams.values()) {
            IOUtils.closeQuietly(writer);
        }
        if (!ok) {
            result.close();
        }
    }
    return result;
}
Also used : StorageFacet(org.sonatype.nexus.repository.storage.StorageFacet) Arrays(java.util.Arrays) ControlFile(org.sonatype.nexus.repository.apt.internal.debian.ControlFile) Date(java.util.Date) AptPackageParser(org.sonatype.nexus.repository.apt.internal.AptPackageParser) BytesPayload(org.sonatype.nexus.repository.view.payloads.BytesPayload) Collections.singletonList(java.util.Collections.singletonList) RELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE) AttachedEntityHelper(org.sonatype.nexus.orient.entity.AttachedEntityHelper) SHA1(org.sonatype.nexus.common.hash.HashAlgorithm.SHA1) StreamPayload(org.sonatype.nexus.repository.view.payloads.StreamPayload) TempBlob(org.sonatype.nexus.repository.view.payloads.TempBlob) Map(java.util.Map) AssetAction(org.sonatype.nexus.repository.apt.internal.hosted.AssetAction) TimeZone(java.util.TimeZone) Collection(java.util.Collection) FacetSupport(org.sonatype.nexus.repository.FacetSupport) Set(java.util.Set) StorageTx(org.sonatype.nexus.repository.storage.StorageTx) Collectors(java.util.stream.Collectors) P_ASSET_KIND(org.sonatype.nexus.repository.storage.AssetEntityAdapter.P_ASSET_KIND) Asset(org.sonatype.nexus.repository.storage.Asset) Content(org.sonatype.nexus.repository.view.Content) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) Writer(java.io.Writer) P_BUCKET(org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.P_BUCKET) INRELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.INRELEASE) Paragraph(org.sonatype.nexus.repository.apt.internal.debian.ControlFile.Paragraph) MD5(org.sonatype.nexus.common.hash.HashAlgorithm.MD5) RELEASE_GPG(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE_GPG) HashMap(java.util.HashMap) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) OrientAptFacet(org.sonatype.nexus.repository.apt.orient.OrientAptFacet) UnitOfWork(org.sonatype.nexus.transaction.UnitOfWork) Payload(org.sonatype.nexus.repository.view.Payload) ODocument(com.orientechnologies.orient.core.record.impl.ODocument) Named(javax.inject.Named) TransactionalStoreBlob(org.sonatype.nexus.repository.transaction.TransactionalStoreBlob) PackageInfo(org.sonatype.nexus.repository.apt.internal.debian.PackageInfo) PATTERN_RFC1123(org.apache.http.protocol.HttpDateGenerator.PATTERN_RFC1123) Charsets(com.google.common.base.Charsets) HashCode(com.google.common.hash.HashCode) TransactionalStoreMetadata(org.sonatype.nexus.repository.transaction.TransactionalStoreMetadata) IOException(java.io.IOException) Facet(org.sonatype.nexus.repository.Facet) AptSigningFacet(org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet) SHA256(org.sonatype.nexus.common.hash.HashAlgorithm.SHA256) AptMimeTypes(org.sonatype.nexus.repository.apt.internal.AptMimeTypes) HashAlgorithm(org.sonatype.nexus.common.hash.HashAlgorithm) P_NAME(org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.P_NAME) AptFacetHelper(org.sonatype.nexus.repository.apt.internal.AptFacetHelper) Collections(java.util.Collections) IllegalOperationException(org.sonatype.nexus.repository.IllegalOperationException) Bucket(org.sonatype.nexus.repository.storage.Bucket) DateFormatUtils(org.apache.commons.lang3.time.DateFormatUtils) HashMap(java.util.HashMap) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) Asset(org.sonatype.nexus.repository.storage.Asset) Writer(java.io.Writer) ODocument(com.orientechnologies.orient.core.record.impl.ODocument)

Example 3 with CompressingTempFileStore

use of org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore in project nexus-public by sonatype.

the class OrientAptHostedFacet method rebuildIndexes.

@TransactionalStoreMetadata
public void rebuildIndexes(final List<AssetChange> changes) throws IOException {
    StorageTx tx = UnitOfWork.currentTx();
    OrientAptFacet aptFacet = getRepository().facet(OrientAptFacet.class);
    AptSigningFacet signingFacet = getRepository().facet(AptSigningFacet.class);
    Bucket bucket = tx.findBucket(getRepository());
    StringBuilder sha256Builder = new StringBuilder();
    StringBuilder md5Builder = new StringBuilder();
    String releaseFile;
    try (CompressingTempFileStore store = buildPackageIndexes(tx, bucket, changes)) {
        for (Map.Entry<String, CompressingTempFileStore.FileMetadata> entry : store.getFiles().entrySet()) {
            Content plainContent = aptFacet.put(packageIndexName(entry.getKey(), ""), new StreamPayload(entry.getValue().plainSupplier(), entry.getValue().plainSize(), AptMimeTypes.TEXT));
            addSignatureItem(md5Builder, MD5, plainContent, packageRelativeIndexName(entry.getKey(), ""));
            addSignatureItem(sha256Builder, SHA256, plainContent, packageRelativeIndexName(entry.getKey(), ""));
            Content gzContent = aptFacet.put(packageIndexName(entry.getKey(), ".gz"), new StreamPayload(entry.getValue().gzSupplier(), entry.getValue().bzSize(), AptMimeTypes.GZIP));
            addSignatureItem(md5Builder, MD5, gzContent, packageRelativeIndexName(entry.getKey(), ".gz"));
            addSignatureItem(sha256Builder, SHA256, gzContent, packageRelativeIndexName(entry.getKey(), ".gz"));
            Content bzContent = aptFacet.put(packageIndexName(entry.getKey(), ".bz2"), new StreamPayload(entry.getValue().bzSupplier(), entry.getValue().bzSize(), AptMimeTypes.BZIP));
            addSignatureItem(md5Builder, MD5, bzContent, packageRelativeIndexName(entry.getKey(), ".bz2"));
            addSignatureItem(sha256Builder, SHA256, bzContent, packageRelativeIndexName(entry.getKey(), ".bz2"));
        }
        releaseFile = buildReleaseFile(aptFacet.getDistribution(), store.getFiles().keySet(), md5Builder.toString(), sha256Builder.toString());
    }
    aptFacet.put(releaseIndexName(RELEASE), new BytesPayload(releaseFile.getBytes(Charsets.UTF_8), AptMimeTypes.TEXT));
    byte[] inRelease = signingFacet.signInline(releaseFile);
    aptFacet.put(releaseIndexName(INRELEASE), new BytesPayload(inRelease, AptMimeTypes.TEXT));
    byte[] releaseGpg = signingFacet.signExternal(releaseFile);
    aptFacet.put(releaseIndexName(RELEASE_GPG), new BytesPayload(releaseGpg, AptMimeTypes.SIGNATURE));
}
Also used : StreamPayload(org.sonatype.nexus.repository.view.payloads.StreamPayload) StorageTx(org.sonatype.nexus.repository.storage.StorageTx) BytesPayload(org.sonatype.nexus.repository.view.payloads.BytesPayload) OrientAptFacet(org.sonatype.nexus.repository.apt.orient.OrientAptFacet) Bucket(org.sonatype.nexus.repository.storage.Bucket) Content(org.sonatype.nexus.repository.view.Content) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) AptSigningFacet(org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet) Map(java.util.Map) HashMap(java.util.HashMap) TransactionalStoreMetadata(org.sonatype.nexus.repository.transaction.TransactionalStoreMetadata)

Example 4 with CompressingTempFileStore

use of org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore in project nexus-public by sonatype.

the class AptHostedFacet method rebuildMetadata.

/**
 * Method for triggering Apt metadata recalculation with possibility to specify what actually asset was changed
 */
public void rebuildMetadata(List<AssetChange> changeList) throws IOException {
    AptContentFacet aptFacet = getRepository().facet(AptContentFacet.class);
    AptSigningFacet signingFacet = getRepository().facet(AptSigningFacet.class);
    StringBuilder sha256Builder = new StringBuilder();
    StringBuilder md5Builder = new StringBuilder();
    String releaseFile;
    try (CompressingTempFileStore store = buildPackageIndexes(changeList)) {
        for (Map.Entry<String, CompressingTempFileStore.FileMetadata> entry : store.getFiles().entrySet()) {
            FluentAsset metadataAsset = aptFacet.put(packageIndexName(entry.getKey(), StringUtils.EMPTY), new StreamPayload(entry.getValue().plainSupplier(), entry.getValue().plainSize(), AptMimeTypes.TEXT));
            addSignatureItem(md5Builder, MD5, metadataAsset, packageRelativeIndexName(entry.getKey(), StringUtils.EMPTY));
            addSignatureItem(sha256Builder, SHA256, metadataAsset, packageRelativeIndexName(entry.getKey(), StringUtils.EMPTY));
            FluentAsset gzMetadataAsset = aptFacet.put(packageIndexName(entry.getKey(), GZ), new StreamPayload(entry.getValue().gzSupplier(), entry.getValue().bzSize(), AptMimeTypes.GZIP));
            addSignatureItem(md5Builder, MD5, gzMetadataAsset, packageRelativeIndexName(entry.getKey(), GZ));
            addSignatureItem(sha256Builder, SHA256, gzMetadataAsset, packageRelativeIndexName(entry.getKey(), GZ));
            FluentAsset bzMetadataAsset = aptFacet.put(packageIndexName(entry.getKey(), BZ2), new StreamPayload(entry.getValue().bzSupplier(), entry.getValue().bzSize(), AptMimeTypes.BZIP));
            addSignatureItem(md5Builder, MD5, bzMetadataAsset, packageRelativeIndexName(entry.getKey(), BZ2));
            addSignatureItem(sha256Builder, SHA256, bzMetadataAsset, packageRelativeIndexName(entry.getKey(), BZ2));
        }
        releaseFile = buildReleaseFile(aptFacet.getDistribution(), store.getFiles().keySet(), md5Builder.toString(), sha256Builder.toString());
    }
    aptFacet.put(releaseIndexName(RELEASE), new BytesPayload(releaseFile.getBytes(Charsets.UTF_8), AptMimeTypes.TEXT));
    byte[] inRelease = signingFacet.signInline(releaseFile);
    aptFacet.put(releaseIndexName(INRELEASE), new BytesPayload(inRelease, AptMimeTypes.TEXT));
    byte[] releaseGpg = signingFacet.signExternal(releaseFile);
    aptFacet.put(releaseIndexName(RELEASE_GPG), new BytesPayload(releaseGpg, AptMimeTypes.SIGNATURE));
}
Also used : StreamPayload(org.sonatype.nexus.repository.view.payloads.StreamPayload) BytesPayload(org.sonatype.nexus.repository.view.payloads.BytesPayload) AptContentFacet(org.sonatype.nexus.repository.apt.datastore.AptContentFacet) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) AptSigningFacet(org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet) Map(java.util.Map) HashMap(java.util.HashMap) FluentAsset(org.sonatype.nexus.repository.content.fluent.FluentAsset)

Example 5 with CompressingTempFileStore

use of org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore in project nexus-public by sonatype.

the class AptHostedFacet method createMetadataFileWithData.

private void createMetadataFileWithData(final List<AssetChange> changes, final CompressingTempFileStore result, final Map<String, Writer> streams, final List<FluentAsset> assets) throws IOException {
    // NOTE:  We exclude added assets as well to account for the case where we are replacing an asset
    Set<String> excludeNames = changes.stream().map(c -> c.getAsset().path()).collect(Collectors.toSet());
    for (FluentAsset asset : assets) {
        final String name = asset.path();
        final String arch = (String) FormatAttributesUtils.getFormatAttributes(asset).get(P_ARCHITECTURE);
        Writer outWriter = streams.computeIfAbsent(arch, result::openOutput);
        if (!excludeNames.contains(name)) {
            final String indexSection = (String) FormatAttributesUtils.getFormatAttributes(asset).get(P_INDEX_SECTION);
            outWriter.write(indexSection);
            outWriter.write("\n\n");
        }
    }
    List<FluentAsset> addAssets = changes.stream().filter(c -> c.getAction() == AssetAction.ADDED).map(AssetChange::getAsset).collect(Collectors.toList());
    // HACK: tx.browse won't see changes in the current transaction, so we have to manually add these in here
    for (FluentAsset asset : addAssets) {
        String arch = (String) FormatAttributesUtils.getFormatAttributes(asset).get(P_ARCHITECTURE);
        String indexSection = (String) FormatAttributesUtils.getFormatAttributes(asset).get(P_INDEX_SECTION);
        Writer outWriter = streams.computeIfAbsent(arch, result::openOutput);
        outWriter.write(indexSection);
        outWriter.write("\n\n");
    }
}
Also used : GZ(org.sonatype.nexus.repository.apt.internal.AptProperties.GZ) Arrays(java.util.Arrays) ControlFile(org.sonatype.nexus.repository.apt.internal.debian.ControlFile) Date(java.util.Date) FluentAsset(org.sonatype.nexus.repository.content.fluent.FluentAsset) BytesPayload(org.sonatype.nexus.repository.view.payloads.BytesPayload) StringUtils(org.apache.commons.lang3.StringUtils) AptContentFacet(org.sonatype.nexus.repository.apt.datastore.AptContentFacet) RELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE) StreamPayload(org.sonatype.nexus.repository.view.payloads.StreamPayload) Map(java.util.Map) FormatAttributesUtils(org.sonatype.nexus.repository.content.utils.FormatAttributesUtils) AssetAction(org.sonatype.nexus.repository.apt.internal.hosted.AssetAction) TimeZone(java.util.TimeZone) Collection(java.util.Collection) FacetSupport(org.sonatype.nexus.repository.FacetSupport) Set(java.util.Set) Collectors(java.util.stream.Collectors) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) Writer(java.io.Writer) Optional(java.util.Optional) P_INDEX_SECTION(org.sonatype.nexus.repository.apt.internal.AptProperties.P_INDEX_SECTION) INRELEASE(org.sonatype.nexus.repository.apt.internal.ReleaseName.INRELEASE) Continuation(org.sonatype.nexus.common.entity.Continuation) Paragraph(org.sonatype.nexus.repository.apt.internal.debian.ControlFile.Paragraph) MD5(org.sonatype.nexus.common.hash.HashAlgorithm.MD5) RELEASE_GPG(org.sonatype.nexus.repository.apt.internal.ReleaseName.RELEASE_GPG) HashMap(java.util.HashMap) CompressingTempFileStore(org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore) BZ2(org.sonatype.nexus.repository.apt.internal.AptProperties.BZ2) Payload(org.sonatype.nexus.repository.view.Payload) DEB(org.sonatype.nexus.repository.apt.internal.AptProperties.DEB) Named(javax.inject.Named) PackageInfo(org.sonatype.nexus.repository.apt.internal.debian.PackageInfo) PATTERN_RFC1123(org.apache.http.protocol.HttpDateGenerator.PATTERN_RFC1123) Charsets(com.google.common.base.Charsets) ContentFacet(org.sonatype.nexus.repository.content.facet.ContentFacet) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) IOException(java.io.IOException) Facet(org.sonatype.nexus.repository.Facet) AptSigningFacet(org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet) SHA256(org.sonatype.nexus.common.hash.HashAlgorithm.SHA256) P_ARCHITECTURE(org.sonatype.nexus.repository.apt.internal.AptProperties.P_ARCHITECTURE) AptMimeTypes(org.sonatype.nexus.repository.apt.internal.AptMimeTypes) AssetBlob(org.sonatype.nexus.repository.content.AssetBlob) HashAlgorithm(org.sonatype.nexus.common.hash.HashAlgorithm) Collections(java.util.Collections) DateFormatUtils(org.apache.commons.lang3.time.DateFormatUtils) Writer(java.io.Writer) FluentAsset(org.sonatype.nexus.repository.content.fluent.FluentAsset)

Aggregations

HashMap (java.util.HashMap)5 Map (java.util.Map)5 AptSigningFacet (org.sonatype.nexus.repository.apt.internal.gpg.AptSigningFacet)5 CompressingTempFileStore (org.sonatype.nexus.repository.apt.internal.hosted.CompressingTempFileStore)4 BytesPayload (org.sonatype.nexus.repository.view.payloads.BytesPayload)4 StreamPayload (org.sonatype.nexus.repository.view.payloads.StreamPayload)4 Charsets (com.google.common.base.Charsets)3 IOException (java.io.IOException)3 Writer (java.io.Writer)3 Arrays (java.util.Arrays)3 Collection (java.util.Collection)3 Collections (java.util.Collections)3 Date (java.util.Date)3 List (java.util.List)3 Set (java.util.Set)3 TimeZone (java.util.TimeZone)3 Collectors (java.util.stream.Collectors)3 Named (javax.inject.Named)3 IOUtils (org.apache.commons.io.IOUtils)3 DateFormatUtils (org.apache.commons.lang3.time.DateFormatUtils)3