-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploying jars with classifiers using maven-deploy-plugin fails #515
Comments
This is related to the recent changes to support atomic deploys (https://groups.google.com/d/msg/clojure/ThU2hZ3Y3FM/cdGn1Ka2CgAJ), and there are two different failures here:
I suspect 2 will be fixed when I fix #514, since I'll probably remove an internal deploy step (see #514 (comment) for details) and just copy the contents of the temp repo to the actual repo, which would take care of the classified artifacts as well. I'll see if I can recreate both issues locally now. |
Thank you. I think I solved the problem by walking around it: I decided to introduce a repackaging step that puts all classified jars into one "superjar" and it seems to work. There is some problem with identifying the snapshot timestamp, but I hope that the release will work properly. Not an ideal solution, but a solution :) |
Glad you have a workaround at the moment - the snapshot timestamp I've been able to recreate here, and don't yet have a solution, but For (1) above, the issue is we are returning a For (2), the issue is more complicated: we currently use the upload of This is actually a big problem for atomic deploys, since if we can't |
This causes 400's to be returned for those files.
Thank you for working on this. I will probably stay with workaround as a permanent solution for other reasons, but some libraries (usually the ones that are using native binaries) critically depend on classifiers, and require custom deployment steps. |
Maven will upload *any* classified artifact after uploading maven-metadata.xml. We use maven-metadata.xml as a trigger to know when to finalize the deploy, moving the contents to the actual repo and to cloudfiles. Before this change, we essentially ignored any files that came in after the finalization. Now, any files that come in after finalization go straight to the actual repo and to cloudfiles. This means that deployments with classified artifacts is no longer atomic - the primary artifact, pom, and maven-metadata.xml will be consistent, but any classified artifacts won't be part of that atomic unit. This commit also switches us from clj-http-lite to clj-http for testing, since we need cookie support to properly test this change, since we need to control the order of deployment, so can't use aether.
This is now fixed in production. Closing, but please reopen if you see any issues. |
Hi,
I am trying to deploy a new version of project https://clojars.org/repo/uncomplicate/neanderthal-atlas/
My setup is a bit exotic, since it contains native libraries. I first use maven-nar-plugin to build all artifacts, but, since it produces nar files instead of jar files (only the classifir-ed file) I have to first rename it to jar, and then attach it with build-helper-maven-plugin, and then use maven-deployment-plugin with command line arguments to deploy it to Clojars.
Seems complicated, but it worked. If you look at 0.1.0 in Clojars, both .lar and .jar are there.
However, at some point the classifier-ed library stopped being uploaded. I can see the main jar and pom in Clojars, but there seems to be some issue with maven-metadata.xml.sha1 and maven-metadata.md5 that breaks the upload of other artifacts.
Here is how it looks like in the console, and both pom.xml and dep-pom.xml can be found at http://github.com/uncomplicate/neanderthal-atlas
------------ This is my command:
mvn -e org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Durl=https://clojars.org/repo/ -DrepositoryId=clojars -Dfile=target/neanderthal-atlas-0.2.1-SNAPSHOT.jar -DpomFile=pom-dep.xml -Dfiles=target/neanderthal-atlas-0.2.1-SNAPSHOT-amd64-Linux-gpp-jni.jar -Dclassifiers=amd64-Linux-gpp-jni -Dtypes=jar
------------- This is console output:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Neanderthal JNI ATLAS Bindings 0.2.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.8.2:deploy-file (default-cli) @ neanderthal-atlas ---
Downloading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml (782 B at 1.0 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11.jar
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11.jar (9 KB at 4.2 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11.pom
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11.pom (5 KB at 2.2 KB/sec)
Downloading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml
Downloaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml (460 B at 1.7 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml (782 B at 0.4 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml
[WARNING] Failed to upload checksum uncomplicate/neanderthal-atlas/maven-metadata.xml.sha1: Failed to transfer file: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml.sha1. Return code is: 400, ReasonPhrase: Bad Request.
[WARNING] Failed to upload checksum uncomplicate/neanderthal-atlas/maven-metadata.xml.md5: Failed to transfer file: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml.md5. Return code is: 400, ReasonPhrase: Bad Request.
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/maven-metadata.xml (460 B at 0.2 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11-amd64-Linux-gpp-jni.jar
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/neanderthal-atlas-0.2.1-20160315.033430-11-amd64-Linux-gpp-jni.jar (12 KB at 4.7 KB/sec)
Uploading: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml
Uploaded: https://clojars.org/repo/uncomplicate/neanderthal-atlas/0.2.1-SNAPSHOT/maven-metadata.xml (1009 B at 0.5 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.267 s
[INFO] Finished at: 2016-03-15T04:34:43+01:00
[INFO] Final Memory: 13M/365M
[INFO] ------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered: