diff --git a/Dockerfile b/Dockerfile index fc3bf31d..91c73281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,11 @@ RUN cd /nexus-repository-helm/; sed -i "s/3.13.0-01/${NEXUS_VERSION}-${NEXUS_BUI FROM sonatype/nexus3:$NEXUS_VERSION ARG NEXUS_VERSION=3.13.0 ARG NEXUS_BUILD=01 -ARG HELM_VERSION=0.0.3 +ARG HELM_VERSION=0.0.4 ARG TARGET_DIR=/opt/sonatype/nexus/system/org/sonatype/nexus/plugins/nexus-repository-helm/${HELM_VERSION}/ USER root RUN mkdir -p ${TARGET_DIR}; \ sed -i 's@nexus-repository-maven@nexus-repository-maven\n nexus-repository-helm@g' /opt/sonatype/nexus/system/org/sonatype/nexus/assemblies/nexus-core-feature/${NEXUS_VERSION}-${NEXUS_BUILD}/nexus-core-feature-${NEXUS_VERSION}-${NEXUS_BUILD}-features.xml; \ - sed -i 's@\n
org.sonatype.nexus.plugins:nexus-repository-helm
\n mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.3\n mvn:org.apache.commons/commons-compress/1.16.1\n
\n \n
org.sonatype.nexus.plugins:nexus-repository-helm
\n mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.4\n mvn:org.apache.commons/commons-compress/1.11\n
\n /bin $ ./nexus run - > bundle:install file:///tmp/nexus-repository-helm-0.0.3.jar + > bundle:install file:///tmp/nexus-repository-helm-0.0.4.jar > bundle:list ``` (look for org.sonatype.nexus.plugins:nexus-repository-helm ID, should be the last one) @@ -93,7 +93,7 @@ good installation path if you are just testing or doing development on the plugi For more permanent installs of the nexus-repository-helm plugin, follow these instructions: -* Copy the bundle (nexus-repository-helm-0.0.3.jar) into /deploy +* Copy the bundle (nexus-repository-helm-0.0.4.jar) into /deploy This will cause the plugin to be loaded with each restart of Nexus Repository. As well, this folder is monitored by Nexus Repository and the plugin should load within 60 seconds of being copied there if Nexus Repository @@ -103,7 +103,7 @@ is running. You will still need to start the bundle using the karaf commands men If you are trying to use the Helm plugin permanently, it likely makes more sense to do the following: -* Copy the bundle into `/system/org/sonatype/nexus/plugins/nexus-repository-helm/0.0.3/nexus-repository-helm-0.0.3.jar` +* Copy the bundle into `/system/org/sonatype/nexus/plugins/nexus-repository-helm/0.0.4/nexus-repository-helm-0.0.4.jar` * Make the following additions marked with + to `/system/org/sonatype/nexus/assemblies/nexus-core-feature/3.x.y/nexus-core-feature-3.x.y-features.xml` ``` @@ -114,9 +114,9 @@ If you are trying to use the Helm plugin permanently, it likely makes more sense ``` And ``` - + + + +
org.sonatype.nexus.plugins:nexus-repository-helm
- + mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.3 + + mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.4 +
``` diff --git a/pom.xml b/pom.xml index 0b54cd0c..f16a7284 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.sonatype.repository nexus-repository-helm ${project.groupId}:${project.artifactId} - 0.0.3 + 0.0.4 2018 bundle diff --git a/src/main/java/org/sonatype/repository/helm/internal/HelmRecipeSupport.groovy b/src/main/java/org/sonatype/repository/helm/internal/HelmRecipeSupport.groovy index f08e00d3..f82cf9a0 100644 --- a/src/main/java/org/sonatype/repository/helm/internal/HelmRecipeSupport.groovy +++ b/src/main/java/org/sonatype/repository/helm/internal/HelmRecipeSupport.groovy @@ -107,12 +107,6 @@ abstract class HelmRecipeSupport @Inject Provider purgeUnusedFacet - @Inject - Provider negativeCacheFacet - - @Inject - NegativeCacheHandler negativeCacheHandler - protected HelmRecipeSupport(final Type type, final Format format) { super(type, format) } diff --git a/src/main/java/org/sonatype/repository/helm/internal/hosted/HelmHostedRecipe.groovy b/src/main/java/org/sonatype/repository/helm/internal/hosted/HelmHostedRecipe.groovy index e971e6d8..fc879e02 100644 --- a/src/main/java/org/sonatype/repository/helm/internal/hosted/HelmHostedRecipe.groovy +++ b/src/main/java/org/sonatype/repository/helm/internal/hosted/HelmHostedRecipe.groovy @@ -73,7 +73,6 @@ class HelmHostedRecipe repository.attach(configure(viewFacet.get())) repository.attach(httpClientFacet.get()) repository.attach(componentMaintenanceFacet.get()) - repository.attach(negativeCacheFacet.get()) repository.attach(storageFacet.get()) repository.attach(hostedFacet.get()) repository.attach(createIndexFacet.get()) @@ -93,7 +92,6 @@ class HelmHostedRecipe .handler(securityHandler) .handler(exceptionHandler) .handler(handlerContributor) - .handler(negativeCacheHandler) .handler(partialFetchHandler) .handler(contentHeadersHandler) .handler(unitOfWorkHandler) diff --git a/src/main/java/org/sonatype/repository/helm/internal/proxy/HelmProxyRecipe.groovy b/src/main/java/org/sonatype/repository/helm/internal/proxy/HelmProxyRecipe.groovy index 3842ee9c..0fda3642 100644 --- a/src/main/java/org/sonatype/repository/helm/internal/proxy/HelmProxyRecipe.groovy +++ b/src/main/java/org/sonatype/repository/helm/internal/proxy/HelmProxyRecipe.groovy @@ -21,6 +21,8 @@ import javax.inject.Singleton import org.sonatype.nexus.repository.Format import org.sonatype.nexus.repository.Repository import org.sonatype.nexus.repository.Type +import org.sonatype.nexus.repository.cache.NegativeCacheFacet +import org.sonatype.nexus.repository.cache.NegativeCacheHandler import org.sonatype.nexus.repository.http.HttpHandlers import org.sonatype.nexus.repository.proxy.ProxyHandler import org.sonatype.nexus.repository.types.ProxyType @@ -50,6 +52,12 @@ class HelmProxyRecipe @Inject ProxyHandler proxyHandler + @Inject + NegativeCacheHandler negativeCacheHandler + + @Inject + Provider negativeCacheFacet + @Inject HelmProxyRecipe(@Named(ProxyType.NAME) final Type type, @Named(HelmFormat.NAME) final Format format) {