clojars

2025-04-22T17:54:10.217159Z

@tcrawley I tried to deploy project that have multiple platform artifacts. mvn deploy reported success, listing the jars as uploaded, but the I can't see them in the http://repo.clojars.org. https://github.com/clojars/clojars-web/issues/902 Am I missing something (in which case, where should I look for the details and manuals), or this is something mysterious?

phronmophobic 2025-04-22T17:56:10.063529Z

mvn is a separate repository from clojars. Are these the artifacts you uploaded? https://clojars.org/org.uncomplicate/accelerate

2025-04-22T17:59:35.831149Z

I am not sure what you are referring as mvn as a separate repository from clojars. mvn in this case is a program (maven) that does the deploying to clojars, which was configured as the repository to be deployed to.

phronmophobic 2025-04-22T18:00:21.057219Z

> but the I can't see them in the http://repo.maven.org.

2025-04-22T18:01:25.102589Z

The link you posted is correct, but the underlying folder contains only generic jars, and not the accelerate-etc-macos-arm64.jar https://repo.clojars.org/org/uncomplicate/accelerate/0.1.0-1.5.12-SNAPSHOT/

2025-04-22T18:02:19.909629Z

neither do I. In fact, none of the jars from that particular deploy (5) are there, despite the success report.

2025-04-22T18:03:39.569769Z

That was a typo. It's http://repo.clojars.org

phronmophobic 2025-04-22T18:14:41.071699Z

Are you trying publish multiple artifacts for the same artifact id? I'm no expert, but I don't think that's a thing.

2025-04-22T18:29:19.325019Z

The other artifacts are classifiers. Technically, they should work similarly to how myproject-version-javadoc.jar or myproject-version-test.jar work. That's how JavaCPP works. What bugs me is that Clojars doesn't complain during mvn deploy. It reports "uploading", then "uploaded", then build successful, but then the artifacts are not in the repository...

👍 1
phronmophobic 2025-04-22T18:30:21.874859Z

Ah ok. I've never messed with classifiers. I've always just created separate artifact ids for each native dependency.

2025-04-22T18:31:43.884819Z

That's not possible here due to automated JavaCPP build process. I mean, I would happily do whatever manual raindance works with Clojars, I just need to know what is possible.

2025-04-22T18:33:05.652639Z

From looking on the server, it looks like mvn is using separate http sessions for the main jar and the classified versions, so clojars doesn't see them as a single deploy. Deploys go to a tmp dir, and the upload of the project-level maven-metadata.xml file triggers uploading the tmp files to the s3 repository (this is how we do atomic deploys). But since the classified jars are in other sessions, they don't get uploaded.

2025-04-22T18:34:00.243919Z

So you could build all the jars, then use an mvn step that deploys them directly all in ne call.

2025-04-22T18:35:31.298319Z

At least I assume mvn would let you do that; I haven't done it.

2025-04-22T18:35:45.781909Z

I am not sure how I trigger that, because it's literally one mvn -Dthis-and-that-property clean deploy

2025-04-22T18:37:15.563309Z

An in the 5-th try, not even the main jars were deployed. Literally none. The last I see is one of the previous tries (4)

2025-04-22T18:38:08.701719Z

The main jar succeeded; I can see it in the repo:

2025-04-22T18:39:53.858289Z

I think you could do it with this, but as a separate mvn call: https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html

2025-04-22T18:42:56.989979Z

I can't see it, neither from chromium nor from firefox! Can you please paste the direct link here, so I can check whether I'm looking at the right place (https://repo.clojars.org/org/uncomplicate/accelerate/0.1.0-1.5.12-SNAPSHOT/)

2025-04-22T18:44:43.361259Z

That's the URL where I see it. It may be the case that you are seeing a stale index.html file, depending on the fastly node you hit. I can try purging; one sec.

phronmophobic 2025-04-22T18:48:31.517659Z

I also see the jar.

2025-04-22T18:49:02.096119Z

I just purged the index from fastly.

2025-04-22T18:49:08.874109Z

now I see it too

2025-04-22T18:49:14.442459Z

Good deal.

2025-04-22T18:50:56.554779Z

OK. So, the issue is the separate session and you think that Clojars is not doing anything esspecially different from maven central to prevent the classifier to be uploaded? I'll try the link you posted tomorrow, and I hope that'll work...

2025-04-22T18:51:19.350679Z

Thanks for helping with this!

2025-04-22T18:55:25.644409Z

Maven central does behave differently; deploys go to a staging repo based on the GAV, then you have to manually release that staging repo. What we have is a compromise to have that release happen automatically. It's odd this hasn't come up before, I think we've had this system for 9 years or so. But it may be that no one reported it? Or something in mvn changed? I don't know. I can see if Clojars could do something different (maybe looking for existing tmp repos for the GAV instead of relying in the session?), but I wouldn't be able to get to it for a couple of weeks. And my pleasure, sorry it's a pain!

2025-04-22T18:57:05.885549Z

I can wait a few weeks for sure!

2025-04-22T18:57:49.002739Z

I don't have to make the release immediately. I can work on other things, and make the release when Clojars is ready.

2025-04-22T18:58:21.725639Z

Ok, I'll update that issue with some more details and take a look when I get a chance.

2025-04-22T18:58:31.282869Z

Thank you!

2025-04-22T18:58:40.677099Z

My pleasure!

1
2025-05-05T05:41:08.040499Z

Yes, you have to be on linux to get macos binaries (due to macos headers etc.). I'll have to try again, maybe the nexus staging bit was the issue then.

2025-05-05T05:41:24.446319Z

Thank you for looking into this.

2025-05-03T18:55:27.035469Z

@blueberry I've looked in to this a bit, and can't recreate it using https://github.com/uncomplicate/apple-presets - do you have local changes that aren't pushed? To be able to deploy that to a locally running version of clojars, I had to: • manually install javacpp • comment out the nexus-staging-maven-plugin config from the pom.xml, as that doesn't work with clojars With that, I was able to mvn deploy locally and get all of the classified artifacts (`sources`, linux-x86_64`) in the repo. It didn't build macos for me, maybe because I'm on linux?

2025-05-05T08:26:56.055119Z

I've tried it and it works. The problem was in my pom.xml indeed, not in Clojars! Thanks!

2025-05-05T10:48:43.404509Z

My pleasure! For me, the deploy failed completely with the nexus plugin, as it would upload the maven-metadata.xml before the pom.xml, and the maven-metadata.xml upload triggers validations on the Clojars side, one of which is the requirement of a pom.xml. The file order when using the nexus plugin may be non-deterministic (but stable, based on the files to upload or maybe even platform?), so it happened to deploy in an order that "worked" for you. I'm glad we got it figured out!

2025-07-01T18:22:05.470069Z

@tcrawley Today I've deployed the default, macosx-arm64 only, build of org.uncomplicate/accelerate. However, when I tried to upload an additional jar for macosx-x86_64 with mvn's deploy-file, Clojars rejected it with error 401. (I've used the same credentials as during the successful deploy). Am I missing some technical detail again?

2025-07-01T18:33:51.734859Z

@blueberry Are you trying to deploy it to an existing version, or part of a deploy of a new version?

2025-07-01T18:36:05.518909Z

I see a failure in the log with "redeploying non-snapshots is not allowed. See https://bit.ly/3EYzhwT" (for accelerate version 0.1.0-1.5.12)

2025-07-01T18:46:40.931229Z

Yes, a fresh version, but the one that I've just deployed. I don't know how to push both these tech-specific files at once...

2025-07-01T18:47:11.491999Z

0.1.0-1.5.12...

2025-07-01T18:47:49.355209Z

But it doesn't replace any jar. It ADDS another tech-specific jar.

2025-07-01T18:56:38.600839Z

Clojars currently requires that all of the artifacts be uploaded in the same http session, so it won't support what you are trying to do currently. When we looked at this last time, I started down the path of implementing multi-session deploys, but abandoned that when we discovered that it was an issue with the nexus-staging-maven-plugin.

2025-07-01T18:57:18.093439Z

I feel like there is a way to build & deploy all of your artifacts in a single go with maven, but I don't know enough about maven to give any guidance.

2025-07-01T19:04:21.302769Z

I can pre-build all artifacts, but I don't know a way to instruct maven to deploy them in the same session.

2025-07-01T19:05:56.294729Z

Thanks for looking into this. I'll try to find a way to do it in one session.

2025-07-01T19:06:24.665119Z

Let me know what you find. I'll think about how to solve this on the clojars side if you can't find anything