sonatype-nexus-community / nexus-repository-apt

A Nexus Repository 3 plugin that allows usage of apt repositories
Eclipse Public License 1.0
105 stars 50 forks source link

commons-compress:jar:1.11 is missing in 3.11 / master #57

Closed derjohn closed 6 years ago

derjohn commented 6 years ago

When doing a docker build I get the following error on startup:

nexus_1  | 2018-05-12 08:04:01,340+0000 WARN  [pool-17-thread-6] *SYSTEM org.ops4j.pax.url.mvn.internal.AetherBasedResolver - Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]
nexus_1  | java.io.IOException: Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]
nexus_1  |      at org.ops

The ops4j.pax thingy wants commons-compress v 1.1, what we ship inside is v 1.16 (in file ./system/org/apache/commons/commons-compress/1.16.1/commons-compress-1.16.1.jar)

Edit: yes, I use nexus-public,

derjohn commented 6 years ago
$ git diff
diff --git a/Dockerfile b/Dockerfile
index 34d03d4..4c51172 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,4 +19,5 @@ RUN mkdir -p ${APT_TARGET}; \
     sed -i 's@nexus-repository-maven</feature>@nexus-repository-maven</feature>\n        <feature prerequisite="false" dependency="false" version="1.0.6">nexus-repository-apt</feature>@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@<feature name="nexus-repository-maven"@<feature name="nexus-repository-apt" description="net.staticsnow:nexus-repository-apt" version="1.0.6">\n        <details>net.staticsnow:nexus-repository-apt</details>\n        <bundle>mvn:net.staticsnow/nexus-repository-apt/1.0.6</bundle>\n        <bundle>mvn:org.apache.commons/commons-compress/1.11</bundle>\n    </feature>\n    <feature name="nexus-repository-maven"@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;
 COPY --from=build /nexus-repository-apt/target/nexus-repository-apt-${APT_VERSION}.jar ${APT_TARGET}
+RUN cd /tmp; curl https://archive.apache.org/dist/commons/compress/binaries/commons-compress-1.11-bin.tar.gz  | tar xzf -  commons-compress-1.11/commons-compress-1.11.jar; mkdir /opt/sonatype/nexus/system/org/apache/commons/commons-compress/1.11; mv commons-compress-1.11/commons-compress-1.11.jar /opt/sonatype/nexus/system/org/apache/commons/commons-compress/1.11/
 USER nexus

Manually downloading 1.11 in the docker build makes nexus with the plugin start again, but the issue with XZ ( https://github.com/sonatype-nexus-community/nexus-repository-apt/issues/52 ) is still unresolved. The good thing: The 500 error is now a lillte more verbose "The requested URL returned error: 400 Invalid Debian package supplied". Thanks so far.

I noticed, that the nexus 3.12 Snapshot switch from XZ 1.5 to 1.8.

"There is still hope, Darth!"

mpoindexter commented 6 years ago

Looks like 3.11 updated commons-compress to 1.16.1. I've updated the README already, and have a PR open that includes this along with some other changes to the Docker build.

derjohn commented 6 years ago

Awwww, the missing GUI Upload button will be there ? niiiiice :)

derjohn commented 6 years ago

https://github.com/sonatype-nexus-community/nexus-repository-apt/pull/59

DarthHater commented 6 years ago

Went ahead and merged #59 since it fixed this. Thanks @derjohn !