slipset / deps-deploy

deploy your stuff
Eclipse Public License 1.0
149 stars 31 forks source link

Multiple artifacts with classifiers? #62

Open seancorfield opened 10 months ago

seancorfield commented 10 months ago

See https://github.com/clojure-doc/clojure-doc.github.io/issues/68 and this Slack thread: https://clojurians.slack.com/archives/C0H28NMAS/p1705364966218609

Per Alex: multiple artifacts with different classifiers all share the same pom and usually they are uploaded as part of the same deployment (with normal maven deploy plugin).

Is this something that deps-deploy might want to support?

If not, is validating the JAR name (to be artifact-version.jar) or renaming it to that during uploading something that deps-deploy might want to handle (to avoid the issue in the thread above)?

slipset commented 9 months ago

Initially, my thinking about deps-deploy was to do one thing, and one thing only - deploy your stuff to a repository. In deps-deploy, I use depstar to produce the jar, and one could (perhaps) argue that the verification step might live there, or even as a separate thing in-between depstar and deps-deploy.

So in short, I think I'd rather not, but I don't have very strong feelings either way.

seancorfield commented 9 months ago

Not sure what depstar has to do with anything here? I think you misunderstood what I'm asking here.

slipset commented 9 months ago

I might very well have misunderstood. Reading over it again, it seems to me that you're asking for two things:

  1. Uploading multiple artifacts under different classifiers in one go, using the same pom - Yes I think that's something that deps-deploy should support.
  2. Validating the nam of or renaming the artifact (which was what I answered to above), no I don't think that's something deps-deploy should support.

I hope that I managed to understand you better on my second reading through?

seancorfield commented 9 months ago

Alex says the Maven deploy plugin renames the JAR you give it to <artifact>(-<classifier>)?-<version>.jar which is what is required for Maven/Clojars etc to be able to server the artifact correctly so the validation/renaming question was intended to get parity in tooling support from deps-deploy.

The issue here is that if a user creates their JAR with a non-standard name, deps-deploy will happily upload it, but no one will be able to depend on it -- which is what happened in the referenced Slack thread.

The classifier/multiple artifacts question sort of falls out of that: if deps-deploy understands (and enforces) the artifact/classifier/version format, then it might be a reasonable enhancement to support multiple artifacts and classifiers.